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

github.com/chipsenkbeil/grid-side.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/project/collection.html')
-rw-r--r--layouts/partials/project/collection.html20
1 files changed, 19 insertions, 1 deletions
diff --git a/layouts/partials/project/collection.html b/layouts/partials/project/collection.html
index 3bc516c..e7767fb 100644
--- a/layouts/partials/project/collection.html
+++ b/layouts/partials/project/collection.html
@@ -1,5 +1,23 @@
+{{ $sp := .Site.Params }}
+{{ if and (isset $sp "Project") (isset $sp.Project "infinite_scroll") }}
+ {{ with $sp.Project.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 infinite-scroll">
+<div class="masonry-flex-container {{ if $infinite_scroll }}infinite-scroll{{ end }}">
{{ range .Paginator.Pages }}
{{ partial "project/item.html" . }}
{{ end }}