From 8e8a0284b5695d806b251aeaf51ae2f57442f7af Mon Sep 17 00:00:00 2001 From: Alexander Avery Date: Mon, 1 Jul 2024 11:46:41 -0400 Subject: [PATCH] simplify layouts --- layouts/_default/meta-extra.html | 2 -- layouts/games/meta-extra.html | 7 ++++--- layouts/partials/article-meta.html | 25 ++++++++++++++----------- 3 files changed, 18 insertions(+), 16 deletions(-) delete mode 100644 layouts/_default/meta-extra.html diff --git a/layouts/_default/meta-extra.html b/layouts/_default/meta-extra.html deleted file mode 100644 index 7fcdac1..0000000 --- a/layouts/_default/meta-extra.html +++ /dev/null @@ -1,2 +0,0 @@ -

{{ .Date.Format "Mon | Jan 2, 2006" }}

- diff --git a/layouts/games/meta-extra.html b/layouts/games/meta-extra.html index 94b4c6d..32bff1e 100644 --- a/layouts/games/meta-extra.html +++ b/layouts/games/meta-extra.html @@ -1,6 +1,7 @@ -{{ if .Params.releaseDate }} -

Released {{ dateFormat "Mon | Jan 2, 2006" .Params.releaseDate }}

+{{ with .Params.releaseDate }} +

Released: {{ dateFormat "Mon | Jan 2, 2006" . }}

{{ end }} -

Platforms:

+

Platforms: {{ delimit .Params.platforms " ยท " }} +

diff --git a/layouts/partials/article-meta.html b/layouts/partials/article-meta.html index 6e149ee..cc91992 100644 --- a/layouts/partials/article-meta.html +++ b/layouts/partials/article-meta.html @@ -1,22 +1,25 @@ -
-

{{ .Title | markdownify }}

+
+

{{ .Title | markdownify }}

- {{- $authors := .Params.authors | default (slice .Site.Params.defaultAuthor) }} - {{- $primaryAuthor := index $authors 0 }} + {{ with .Params.authors }} + {{ $author := (index . 0) }} +

+ Author: {{ $author }} +

+ {{ end }} - {{ with $primaryAuthor }} - -

{{ . }}

-
+ {{ with .Date }} +

Posted: {{ .Format "Mon | Jan 2, 2006" }}

{{ end }} - {{ .Render "meta-extra" }} + {{ .Render "meta-extra" }} {{ range (.GetTerms "tags") }} - {{ .LinkTitle }} + + {{ .LinkTitle }} + {{ end }} {{ $image := (.Resources.GetMatch "featured") }} {{ partial "image.html" (dict "image" $image "alt" .Params.featured.alt "class" "shadow featured") }} -