Update the grid-side theme
This commit is contained in:
@@ -0,0 +1,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>
|
||||
|
20
themes/grid-side-old/layouts/partials/gallery/item.html
Normal file
20
themes/grid-side-old/layouts/partials/gallery/item.html
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
{{ $url := $.Site.BaseURL }}
|
||||
{{ $image := .Params.image | urlize }}
|
||||
{{ $date := .Date.Format "Mon Jan 02, 2006" }}
|
||||
{{ $title := .Title }}
|
||||
<!-- TODO: Figure out why line height causes issues here -->
|
||||
<div class="flex-item flex-item-spacing no-line-height">
|
||||
<div class="relative rounded-corners z-depth-1 lazyload" data-noscript="">
|
||||
<noscript>
|
||||
<a href="{{ $url }}{{ $image }}" data-lightbox="gallery" data-title="{{ $title }}">
|
||||
<img src="{{ $url }}{{ $image }}"
|
||||
class="fill-container-width rounded-corners z-depth-1" />
|
||||
<div class="highlight-block rounded-corners">
|
||||
<h3 class="white-text">{{ $date }}</h3>
|
||||
</div>
|
||||
</a>
|
||||
</noscript>
|
||||
</div>
|
||||
</div>
|
||||
|
16
themes/grid-side-old/layouts/partials/gallery/list.html
Normal file
16
themes/grid-side-old/layouts/partials/gallery/list.html
Normal file
@@ -0,0 +1,16 @@
|
||||
{{ partial "core/html-start.html" . }}
|
||||
{{ partial "core/head.html" . }}
|
||||
|
||||
<body class="page-colors minimum-viewport-height">
|
||||
{{ partial "core/main-menu.html" . }}
|
||||
|
||||
<section class="main-content">
|
||||
{{ partial "gallery/collection.html" . }}
|
||||
{{ partial "extra/pagination.html" . }}
|
||||
</section>
|
||||
|
||||
{{ partial "core/js.html" . }}
|
||||
</body>
|
||||
|
||||
{{ partial "core/html-end.html" . }}
|
||||
|
15
themes/grid-side-old/layouts/partials/gallery/single.html
Normal file
15
themes/grid-side-old/layouts/partials/gallery/single.html
Normal file
@@ -0,0 +1,15 @@
|
||||
{{ partial "core/html-start.html" . }}
|
||||
{{ partial "core/head.html" . }}
|
||||
|
||||
<body class="page-colors minimum-viewport-height">
|
||||
{{ partial "core/main-menu.html" . }}
|
||||
|
||||
<section class="main-content">
|
||||
{{ partial "gallery/item" . }}
|
||||
</section>
|
||||
|
||||
{{ partial "core/js.html" . }}
|
||||
</body>
|
||||
|
||||
{{ partial "core/html-end.html" . }}
|
||||
|
Reference in New Issue
Block a user