Welcome to mirror list, hosted at ThFree Co, Russian Federation.

collection.html « gallery « partials « layouts - github.com/chipsenkbeil/grid-side.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 10b9bed2c092cc86ee3a82db749615a79991ad81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{{ $sp := .Site.Params }}
{{ if and (isset $sp "Gallery") (isset $sp.Gallery "infinite_scroll") }}
    {{ with $sp.Gallery.infinite_scroll }}
        {{ $.Scratch.Set "infinite_scroll" (eq . true) }}
    {{ end }}
{{ else }}
    {{ $.Scratch.Set "infinite_scroll" false }}
{{ end }}

{{ if eq ($.Scratch.Get "infinite_scroll") false }}
    {{ with $sp.infinite_scroll }}
        {{ $.Scratch.Set "infinite_scroll" (eq . true) }}
    {{ else }}
        {{ $.Scratch.Set "infinite_scroll" false }}
    {{ end }}
{{ end }}

{{ $infinite_scroll := $.Scratch.Get "infinite_scroll" }}

<div class="masonry-flex-container {{ if $infinite_scroll }}infinite-scroll{{ end }}">
    {{ range .Paginator.Pages }}
        {{ partial "gallery/item.html" . }}
    {{ end }}
</div>