mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-29 17:52:38 +00:00
showcase: Shuffle the news items
To give them all some time in the spotlight.
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<div class="w-100">
|
||||
<div class="w-100 overflow-x-scroll">
|
||||
<div class="row nowrap mv2 pb1">
|
||||
{{ range $p := first 10 (where .Site.RegularPages "Section" "showcase") }}
|
||||
{{ range $p := first 10 (where .Site.RegularPages "Section" "showcase" | shuffle) }}
|
||||
{{ $img := (.Resources.ByType "image").GetMatch "*featured*" }}
|
||||
{{ with $img }}
|
||||
{{ $big := .Fill "1024x512 top" }}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</div>
|
||||
</article>
|
||||
<section class="flex-ns flex-wrap justify-between w-100 v-top">
|
||||
{{ range (.Paginator 20).Pages }}
|
||||
{{ range (.Paginate (.Pages | shuffle ) 20).Pages }}
|
||||
{{template "showcase_items" .}}
|
||||
{{ end }}
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user