From ac8cec336b2da4b4a60a8517d0d305eb9a8e6703 Mon Sep 17 00:00:00 2001 From: vimux Date: Sun, 4 Mar 2018 10:21:14 +0300 Subject: [PATCH] Add post_meta partial --- layouts/_default/single.html | 1 + layouts/_default/summary.html | 1 + layouts/partials/post_meta.html | 11 +++++++++++ static/css/main.css | 31 +++++++++++++++++++++++++++++++ 4 files changed, 44 insertions(+) create mode 100644 layouts/partials/post_meta.html diff --git a/layouts/_default/single.html b/layouts/_default/single.html index ae18dae..89d309a 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -2,6 +2,7 @@
+

{{ .Title }}

{{ .Content }}
{{ if .Params.tags }}{{ partial "post_tags.html" . }}{{ end }} diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html index e7db390..c066a06 100644 --- a/layouts/_default/summary.html +++ b/layouts/_default/summary.html @@ -1,4 +1,5 @@

{{ .Title }}

{{- .Summary }}
+
\ No newline at end of file diff --git a/layouts/partials/post_meta.html b/layouts/partials/post_meta.html new file mode 100644 index 0000000..56bb4dc --- /dev/null +++ b/layouts/partials/post_meta.html @@ -0,0 +1,11 @@ +{{- if not .Date.IsZero }} + +{{ end }} +{{- if ne .Date .Lastmod }} + +{{- end }} +{{- if .Params.categories }} + +{{- end }} \ No newline at end of file diff --git a/static/css/main.css b/static/css/main.css index 24057ef..5dc352e 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -346,6 +346,26 @@ mark { background-color: #f8ae00; } +.mt { + margin-top: 1rem; +} + +.mb { + margin-bottom: 1rem; +} + +.mla { + margin-left: auto; +} + +.tal { + text-align: left; +} + +.tar { + text-align: right; +} + /* Header */ .header { margin: 0 0 5px; @@ -391,6 +411,17 @@ mark { text-decoration: none; } +/* Post */ +.post__meta { + font-size: 14px; + color: #888; +} + +.post__meta-published, +.post__meta-lastmod { + display: block; +} + .post__tags { margin-top: 2rem; }