From b29419c9c72bbc2d605addabf0dfd84a7f41b88b Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Sun, 8 May 2022 18:47:25 +0200 Subject: Provide ability to list posts on main page --- layouts/partials/post-meta.html | 9 +++++++++ layouts/partials/post-meta/date.html | 11 +++++++++++ layouts/partials/post-thumbnail.html | 0 3 files changed, 20 insertions(+) create mode 100644 layouts/partials/post-meta.html create mode 100644 layouts/partials/post-meta/date.html create mode 100644 layouts/partials/post-thumbnail.html (limited to 'layouts/partials') diff --git a/layouts/partials/post-meta.html b/layouts/partials/post-meta.html new file mode 100644 index 0000000..a539c54 --- /dev/null +++ b/layouts/partials/post-meta.html @@ -0,0 +1,9 @@ +
+ {{- $root := . -}} + {{- with .Param "post_meta" -}} + {{- range $field := . -}} + {{- $p := printf "post-meta/%s.html" $field -}} + {{- partial $p $root -}} + {{- end -}} + {{- end -}} +
diff --git a/layouts/partials/post-meta/date.html b/layouts/partials/post-meta/date.html new file mode 100644 index 0000000..6afce4c --- /dev/null +++ b/layouts/partials/post-meta/date.html @@ -0,0 +1,11 @@ +{{- if not .Date.IsZero }} + +{{- if ne .Date .Lastmod }} + +{{- end -}} +{{- end }} diff --git a/layouts/partials/post-thumbnail.html b/layouts/partials/post-thumbnail.html new file mode 100644 index 0000000..e69de29 -- cgit v1.2.3