showcase: Shuffle the news items

To give them all some time in the spotlight.
This commit is contained in:
Bjørn Erik Pedersen committed 2018-02-13 15:25:42 +01:00
1 parent 5fef1f9b75
commit 665b1eb5e7
2 files changed
+2 -2

No files matched your search

@@ -4,7 +4,7 @@
<div class="w-100"> <div class="w-100">
<div class="w-100 overflow-x-scroll"> <div class="w-100 overflow-x-scroll">
<div class="row nowrap mv2 pb1"> <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*" }} {{ $img := (.Resources.ByType "image").GetMatch "*featured*" }}
{{ with $img }} {{ with $img }}
{{ $big := .Fill "1024x512 top" }} {{ $big := .Fill "1024x512 top" }}
@@ -9,7 +9,7 @@
</div> </div>
</article> </article>
<section class="flex-ns flex-wrap justify-between w-100 v-top"> <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" .}} {{template "showcase_items" .}}
{{ end }} {{ end }}
</section> </section>