diff --git a/themes/gohugoioTheme/layouts/partials/home-page-sections/showcase.html b/themes/gohugoioTheme/layouts/partials/home-page-sections/showcase.html index ede4c8b9a..774c10e0f 100644 --- a/themes/gohugoioTheme/layouts/partials/home-page-sections/showcase.html +++ b/themes/gohugoioTheme/layouts/partials/home-page-sections/showcase.html @@ -4,26 +4,10 @@
- {{ range $p := first 10 (where .Site.RegularPages "Section" "showcase" | shuffle) }} - {{ $img := (.Resources.ByType "image").GetMatch "*featured*" }} - {{ with $img }} - {{ $big := .Fill "1024x512 top" }} - {{ $small := $big.Resize "512x" }} - - {{with $p.Title}} -
-
- {{.}} → -
-
- {{end}} -
- {{ end }} + {{ $showcasePages := where .Site.RegularPages "Section" "showcase" }} + {{ template "home_showcase_item" (index $showcasePages 0) }} + {{ range $p := first 10 ($showcasePages | after 1 | shuffle) }} + {{template "home_showcase_item" $p }} {{end}}
@@ -32,4 +16,27 @@
{{/* using Flex to make the button show up on the right side */}} See All
- \ No newline at end of file + + + +{{ define "home_showcase_item" }} + {{ $img := (.Resources.ByType "image").GetMatch "*featured*" }} + {{ with $img }} + {{ $big := .Fill "1024x512 top" }} + {{ $small := $big.Resize "512x" }} + + {{with $.Title}} +
+
+ {{.}} → +
+
+ {{end}} +
+ {{ end }} +{{ end }} \ No newline at end of file