diff options
| author | Serghei Iakovlev <egrep@protonmail.ch> | 2022-05-08 18:47:25 +0200 |
|---|---|---|
| committer | Serghei Iakovlev <egrep@protonmail.ch> | 2022-05-08 18:47:25 +0200 |
| commit | b29419c9c72bbc2d605addabf0dfd84a7f41b88b (patch) | |
| tree | 4199578140684b30d7fb93e5c28b86db39442c83 /layouts/partials | |
| parent | 40288d1362e1074c6e2c0d0d9de5a2d59bc86fb5 (diff) | |
| download | gohugo-theme-ed-b29419c9c72bbc2d605addabf0dfd84a7f41b88b.tar.gz | |
Provide ability to list posts on main page
Diffstat (limited to 'layouts/partials')
| -rw-r--r-- | layouts/partials/post-meta.html | 9 | ||||
| -rw-r--r-- | layouts/partials/post-meta/date.html | 11 | ||||
| -rw-r--r-- | layouts/partials/post-thumbnail.html | 0 |
3 files changed, 20 insertions, 0 deletions
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 @@ +<div class="post-meta"> + {{- $root := . -}} + {{- with .Param "post_meta" -}} + {{- range $field := . -}} + {{- $p := printf "post-meta/%s.html" $field -}} + {{- partial $p $root -}} + {{- end -}} + {{- end -}} +</div> 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 }} +<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}"> + {{- .Date.Format (site.Params.dateformat | default "January 02, 2006") -}} +</time> +{{- if ne .Date .Lastmod }} +<time datetime="{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}"> + {{- /* TODO: Translate me */}} + Updated: {{- .Lastmod.Format (site.Params.dateformat | default "January 02, 2006") -}} +</time> +{{- end -}} +{{- end }} diff --git a/layouts/partials/post-thumbnail.html b/layouts/partials/post-thumbnail.html new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/layouts/partials/post-thumbnail.html |
