From 9bd061323ad54a00755024b7eece0b7d1e3df097 Mon Sep 17 00:00:00 2001 From: Edoardo Rosa <6991986+notdodo@users.noreply.github.com> Date: Sat, 2 Dec 2023 22:47:36 +0100 Subject: [PATCH] upd: carousel --- layouts/_default/baseof.html | 56 +++++++++++++++++++++++++++++++++--- 1 file changed, 52 insertions(+), 4 deletions(-) diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index e34a8013..8236b419 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -39,10 +39,58 @@
- {{ block "main" . }}{{ end }} - {{ if and (.Site.Params.footer.showScrollToTop | default true) (gt .WordCount 1) }} - {{- partial "scroll-to-top.html" . -}} - {{ end }} + {{ if .IsHome }} +

Sponsors

+ {{ $images := .Site.Params.sponsors }} + + +
+
+ {{ $num := 0 }} + {{ range $images }} +
+
+ + {{ if .site }} + {{ .img }} + {{ else }} + {{ .img }} + {{ end }} + + {{ if .name }} +

{{ .name }}

+ {{ end }} +
+
+ {{ $num = add $num 1 }} + {{ end }} + {{ $num := 0 }} + {{ range $images }} +
+
+ + {{ if .site }} + {{ .img }} + {{ else }} + {{ .img }} + {{ end }} + + {{ if .name }} +
+

{{ .name }}

+
+ {{ end }} +
+
+ {{ $num = add $num 1 }} + {{ end }} +
+
+ {{ end }} + {{ block "main" . }}{{ end }} + {{ if and (.Site.Params.footer.showScrollToTop | default true) (gt .WordCount 1) }} + {{- partial "scroll-to-top.html" . -}} + {{ end }}
{{- partial "footer.html" . -}} {{ if .Site.Params.enableSearch | default false }}