From f8541ef965ca22e746b523eb418e47cb4f78f2d8 Mon Sep 17 00:00:00 2001 From: Arne Rief Date: Fri, 9 Jan 2026 12:24:05 +0100 Subject: Upgrade to new template system from Hugo v0.146.0 --- layouts/_partials/list/post-card.html | 66 +++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 layouts/_partials/list/post-card.html (limited to 'layouts/_partials/list/post-card.html') diff --git a/layouts/_partials/list/post-card.html b/layouts/_partials/list/post-card.html new file mode 100644 index 0000000..6444701 --- /dev/null +++ b/layouts/_partials/list/post-card.html @@ -0,0 +1,66 @@ +{{- /* +Card with a summary of and link to a post. Accepts a dict with the following parameters: + +@context {Page} post: The post to display. +@context {bool} show_section: Whether to display a badge with the name of the section the post was published under (default: false). + +@example: {{ partial "list/post-card.html" (dict "post" . "show_section" true) }} +*/ -}} + +{{- $post := .post -}} +{{- $showSection := .show_section | default false -}} +
+
+

+ + {{ $post.Title }} + +

+
+ + + {{- if $showSection }} + + {{ lang.Translate ($post.Section | singularize) | default ($post.Section | singularize | title) }} + + {{- end }} +
+
+ + {{- with $post.Summary }} +
+ {{ . }} +
+ {{- end }} + + {{- with $post.Params.tags }} + + {{- end }} +
-- cgit v1.2.3