2019-11-04 13:09:44 +00:00
|
|
|
{{ define "main" }}
|
2020-02-13 11:44:18 +00:00
|
|
|
<header class="header basicflex-column">
|
2019-11-04 13:09:44 +00:00
|
|
|
<h3 class="terms__title h3">{{ .Title }}</h3>
|
2020-03-08 12:31:58 +00:00
|
|
|
<div class="px py p2 single__contents">
|
2019-11-04 13:09:44 +00:00
|
|
|
{{ .Content }}
|
|
|
|
</div>
|
|
|
|
</header>
|
2019-11-13 08:06:51 +00:00
|
|
|
|
|
|
|
{{ if in (lower .Params.Mode) "one" }}
|
2019-11-04 13:09:44 +00:00
|
|
|
<main class="gallery main">
|
2020-01-17 07:16:39 +00:00
|
|
|
<div class="grid gallery__container">
|
2019-11-04 13:09:44 +00:00
|
|
|
<div class="grid-sizer"></div>
|
2020-10-16 03:04:47 +00:00
|
|
|
{{ $basename := (replace .File.Dir "\\" "/") }}
|
|
|
|
{{ range .Params.Images }}
|
|
|
|
<div class="grid-item">
|
|
|
|
<img src="{{ $basename | relURL }}{{ .image }}" alt="{{ print .caption }}" />
|
|
|
|
<div class="grid-item__desc hide">
|
|
|
|
<span class="grid-item__desc--text">
|
|
|
|
{{ .caption }}
|
|
|
|
</span>
|
2019-11-13 08:06:51 +00:00
|
|
|
</div>
|
2020-10-16 03:04:47 +00:00
|
|
|
</div>
|
2019-11-04 13:09:44 +00:00
|
|
|
{{ end }}
|
2020-01-24 12:24:17 +00:00
|
|
|
</div>
|
2019-11-04 13:09:44 +00:00
|
|
|
</main>
|
2019-11-13 08:06:51 +00:00
|
|
|
|
2020-03-04 08:54:50 +00:00
|
|
|
{{ else if eq (lower .Params.mode) "remote" }}
|
|
|
|
<main class="gallery main">
|
|
|
|
<div class="grid gallery__container">
|
|
|
|
<div class="grid-sizer"></div>
|
|
|
|
{{ range .Params.Images }}
|
|
|
|
<div class="grid-item">
|
|
|
|
<img src="{{ .image }}" alt="{{ print .caption }}" />
|
|
|
|
<div class="grid-item__desc hide">
|
|
|
|
<span class="grid-item__desc--text">
|
|
|
|
{{ .caption }}
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
</main>
|
2019-11-13 08:06:51 +00:00
|
|
|
|
2020-03-04 08:54:50 +00:00
|
|
|
{{ else }}
|
2019-11-13 08:06:51 +00:00
|
|
|
<main class="gallery main">
|
2020-01-17 07:16:39 +00:00
|
|
|
<div class="grid gallery__container">
|
2019-11-13 08:06:51 +00:00
|
|
|
<div class="grid-sizer"></div>
|
2020-10-16 03:04:47 +00:00
|
|
|
{{ $basename := (replace .File.Dir "\\" "/") }}
|
|
|
|
{{ $galleryFolderPath := (print "./static/" $basename) }}
|
|
|
|
{{ if (fileExists $galleryFolderPath) }}
|
|
|
|
{{ range readDir $galleryFolderPath }}
|
|
|
|
<div class="grid-item">
|
|
|
|
<img src="{{ $basename | relURL }}{{ .Name }}" alt="{{ index (split .Name ".") 0 }}" />
|
|
|
|
<div class="grid-item__desc hide">
|
|
|
|
<span class="grid-item__desc--text">
|
|
|
|
{{ index (split .Name ".") 0 }}
|
|
|
|
</span>
|
|
|
|
</div>
|
2020-01-08 17:58:15 +00:00
|
|
|
</div>
|
2019-11-13 08:06:51 +00:00
|
|
|
{{ end }}
|
2020-10-16 03:04:47 +00:00
|
|
|
{{ else }}
|
|
|
|
<div class="basicflex">
|
|
|
|
Make a gallery folder first.
|
|
|
|
</div>
|
2019-11-13 08:06:51 +00:00
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
</main>
|
|
|
|
|
|
|
|
{{ end }}
|
|
|
|
|
2019-11-20 17:45:46 +00:00
|
|
|
<div class="hide">
|
2019-11-24 14:31:28 +00:00
|
|
|
{{ partial "search/site-search" . }}
|
2019-11-20 17:45:46 +00:00
|
|
|
</div>
|
2019-11-25 04:36:50 +00:00
|
|
|
{{ partial "body/photoswipe" . }}
|
2019-11-24 14:31:28 +00:00
|
|
|
{{ partial "script/gallery-script" . }}
|
2019-11-04 13:09:44 +00:00
|
|
|
{{ end }}
|