diff options
author | Lukas Joswiak <lukas@lukasjoswiak.com> | 2020-05-15 10:43:44 +0300 |
---|---|---|
committer | Lukas Joswiak <lukas@lukasjoswiak.com> | 2020-05-15 10:43:44 +0300 |
commit | 9e0a8f73d907b3e4c65970024db88fb181675588 (patch) | |
tree | 3b304c123be512ab14bcbfb03fcc5b8b63830ab2 | |
parent | 3e882d86e63cc8f6517ca2b382e92d675b549628 (diff) |
Add date to posts
-rw-r--r-- | layouts/_default/single.html | 5 | ||||
-rw-r--r-- | layouts/partials/css/main.css | 27 | ||||
-rw-r--r-- | layouts/partials/css/min770px.css | 6 |
3 files changed, 31 insertions, 7 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 4f3835e..4a75fa2 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,6 +1,9 @@ {{ define "main" }} <article> - <header id="post-title"><h1>{{ .Title }}</h1></header> + <header id="post-header"> + <h1>{{ .Title }}</h1> + <time>{{ .Date.Format "January 2, 2006" }}</time> + </header> {{- .Content -}} </article> {{ end }} diff --git a/layouts/partials/css/main.css b/layouts/partials/css/main.css index a28961d..6664ca4 100644 --- a/layouts/partials/css/main.css +++ b/layouts/partials/css/main.css @@ -109,6 +109,7 @@ main#content h4, main#content h5, main#content h6 { margin-bottom: 0; + line-height: 1.15; } main#content h1 + p, @@ -145,6 +146,12 @@ main#content ul#posts small { margin-left: 10px; } +@media (prefers-color-scheme: dark) { + main#content ul#posts small { + color: #a7a7a7; + } +} + main#content ul#posts li a { text-decoration: none; } @@ -164,9 +171,23 @@ main#content ul#posts li a:hover small { } /* single.html styles */ -main#content header#post-title { - font-size: 16px; - font-size: 1.6rem; +main#content header#post-header h1 { + display: block; + font-size: 23px; + font-size: 2.3rem; + line-height: 1.15; +} + +main#content header#post-header time { + display: block; + font-size: 0.85em; + color: #767676; +} + +@media (prefers-color-scheme: dark) { + main#content header#post-header time { + color: #a7a7a7; + } } main#content img { diff --git a/layouts/partials/css/min770px.css b/layouts/partials/css/min770px.css index c78b46d..32f0747 100644 --- a/layouts/partials/css/min770px.css +++ b/layouts/partials/css/min770px.css @@ -20,9 +20,9 @@ main#content ul#posts { } /* single.html styles */ -main#content header#post-title { - font-size: 20px; - font-size: 2rem; +main#content header#post-header h1 { + font-size: 26px; + font-size: 2.6rem; } main#content img { |