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/post/list.html')
-rw-r--r--layouts/partials/post/list.html21
1 files changed, 20 insertions, 1 deletions
diff --git a/layouts/partials/post/list.html b/layouts/partials/post/list.html
index 23056d8..93c2f46 100644
--- a/layouts/partials/post/list.html
+++ b/layouts/partials/post/list.html
@@ -4,8 +4,27 @@
<body>
{{ partial "core/main-menu.html" . }}
+ {{ $sp := .Site.Params }}
+ {{ if and (isset $sp "Post") (isset $sp.Post "infinite_scroll") }}
+ {{ with $sp.Post.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" }}
+
<section class="main-content">
- <div class="masonry-flex-container infinite-scroll">
+ <div class="masonry-flex-container {{ if $infinite_scroll }}infinite-scroll{{ end }}">
{{ if .IsNode }}
{{ range .Paginator.Pages }}
<div class="flex-item">