From c8874736ea3537e0085e95110b2e7d21a1aaae3a Mon Sep 17 00:00:00 2001 From: BBaoVanC Date: Sat, 9 Oct 2021 18:08:27 -0500 Subject: [PATCH] Update post-metadata to use a partial, and add word count --- assets/css/bobastyle.css | 6 ++++- layouts/_default/single.html | 30 +------------------------ layouts/_default/summary.html | 30 +------------------------ layouts/partials/post-metadata.html | 34 +++++++++++++++++++++++++++++ 4 files changed, 41 insertions(+), 59 deletions(-) create mode 100644 layouts/partials/post-metadata.html diff --git a/assets/css/bobastyle.css b/assets/css/bobastyle.css index 29cea76..e531ef7 100644 --- a/assets/css/bobastyle.css +++ b/assets/css/bobastyle.css @@ -29,8 +29,12 @@ margin-top: 5px; } +.wordcount { + margin-left: 5px; +} + .tags { - margin-left: 10px; + margin-top: 5px; } .tag { diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 1721c4d..ffd4ddf 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -3,35 +3,7 @@

{{ .Title | markdownify }}

-{{ if or .Date (.GetTerms "tags") }} -
- {{ if .Date }} - - - {{ partial "icon.html" "calendar" }} - - - {{ if ne .Lastmod .Date }} - - {{ end }} - - {{ end }} - - - - {{ range (.GetTerms "tags") }} - - {{ partial "icon.html" "tag" }} - {{ .LinkTitle }} - - {{ end }} - -
-{{ end }} +{{ partial "post-metadata.html" . }} {{ if .Params.Toc }}
diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html index 8726c5c..1cf4b54 100644 --- a/layouts/_default/summary.html +++ b/layouts/_default/summary.html @@ -3,35 +3,7 @@ {{ .Title | markdownify }} - {{ if or .Date (.GetTerms "tags") }} - - {{ end }} + {{ partial "post-metadata.html" . }} {{ with .Resources.GetMatch "feature" }} {{ if eq .MediaType.MainType "image" }} diff --git a/layouts/partials/post-metadata.html b/layouts/partials/post-metadata.html new file mode 100644 index 0000000..baaa872 --- /dev/null +++ b/layouts/partials/post-metadata.html @@ -0,0 +1,34 @@ +{{ if or .Date (.GetTerms "tags") }} + +{{ end }}