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") }} -
- {{ 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" . }} {{ 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") }} +
+ {{ if .Date }} + + + {{ partial "icon.html" "calendar" }} + + + {{ if ne .Lastmod .Date }} + + {{ end }} + + {{ end }} + + + + {{ partial "icon.html" "type" }} + {{ .WordCount }} words + + +
+ {{ range (.GetTerms "tags") }} + + {{ partial "icon.html" "tag" }} + {{ .LinkTitle }} + + {{ end }} +
+
+{{ end }}