mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-14 08:18:30 +00:00
showcase: Shuffle the news items
To give them all some time in the spotlight.
This commit is contained in:
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>
|
||||||
|
|||||||
Reference in new issue
Block a user