From 7b4b78ee8458b16a6167170bf7405d7bf911cfbc Mon Sep 17 00:00:00 2001 From: Francesco Date: Mon, 22 Apr 2024 13:19:56 +0200 Subject: Initial --- layouts/_default/home.html | 58 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 layouts/_default/home.html (limited to 'layouts/_default/home.html') diff --git a/layouts/_default/home.html b/layouts/_default/home.html new file mode 100644 index 0000000..bc3aad8 --- /dev/null +++ b/layouts/_default/home.html @@ -0,0 +1,58 @@ +{{ define "main" }} + +{{ .Content }} + +{{/* Intro summary section */}} +{{ if .Site.Params.homeIntro }} + +
+ {{ if .Site.Params.homeIntroTitle }} +

{{ .Site.Params.homeIntroTitle }}

+ {{ end }} + + {{ if .Site.Params.homeIntroContent }} +

{{ .Site.Params.homeIntroContent | markdownify }}

+ {{ end }} +
+ +{{ end }} + +{{/* Social Icons */}} + +{{ with site.Params.social }} +
+ {{- range . }} + + {{ partial "svg.html" . }} + + {{- end }} +
+{{ end }} + +{{/* Collection Section */}} + +{{ if .Site.Params.homeCollection }} + +{{ with .Site.Params.homeCollectionTitle}} +

{{ . }}

+{{ end }} + +{{ $pages := where .Site.RegularPages "Section" .Site.Params.homeCollection }} + +{{ $paginationSize := 1}} +{{ if (gt .Site.Params.paginationSize 0) }} +{{ $paginationSize = .Site.Params.paginationSize }} +{{ end }} + +{{ $paginator := .Paginate $pages $paginationSize }} + +{{ range $index, $page := $paginator.Pages }} +{{ partial "post-entry.html" $page}} +{{ end }} + +{{ partial "pagination-controls.html" $paginator}} + +{{ end }} + +{{ end }} \ No newline at end of file -- cgit v1.2.3