From 474b8f177078cfdc2d4342e9ead4d505afa02d62 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sun, 5 Apr 2026 08:41:54 +0200 Subject: layout: add home, section, and page templates --- layouts/home.html | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'layouts/home.html') diff --git a/layouts/home.html b/layouts/home.html index 0c76425..4eed7ad 100644 --- a/layouts/home.html +++ b/layouts/home.html @@ -1,9 +1,20 @@ {{ define "main" }} - {{ .Content }} - {{ range site.RegularPages }} -
-

{{ .LinkTitle }}

- {{ .Summary }} -
- {{ end }} + {{ partial "hero.html" . }} + +
+
Latest
+ + {{ $posts := where site.RegularPages "Type" "in" (slice "articles") }} + {{ $posts := sort $posts "Params.date" "desc" }} + {{ $latest := first 3 $posts }} + +
+ {{ range $latest }} + {{ $data := dict "title" .Title "type" .Params.type "description" .Summary "date" .Date "url" .RelPermalink "image" .Params.image "featured" .Params.featured }} + {{ partial "post-card.html" $data }} + {{ end }} +
+ + View all articles +
{{ end }} -- cgit v1.2.3