52 lines
1.7 KiB
HTML
52 lines
1.7 KiB
HTML
{{ define "main" }}
|
|
<header class="header">
|
|
<h3 class="terms__title h3">{{ .Title }}</h3>
|
|
<div class="gallery__contents">
|
|
{{ .Content }}
|
|
</div>
|
|
</header>
|
|
|
|
{{ $root := . }}
|
|
{{ if in (lower .Params.Mode) "one" }}
|
|
<main class="gallery main">
|
|
<div class="grid single__contents single__contents--gallery">
|
|
<div class="grid-sizer"></div>
|
|
{{ if .File.Dir }}
|
|
{{ $basename := (replace .File.Dir "\\" "/") }}
|
|
{{ range .Params.Images }}
|
|
<div class="grid-item">
|
|
<a data-fancybox="gallery" href="{{ $basename | relURL }}{{ .image }}" data-alt="{{ print .caption }}"><img src="{{ $basename | relURL }}{{ .image }}" alt="{{ print .caption }}"/></a>
|
|
<div class="grid-item__desc hide">{{ .caption }}</div>
|
|
</div>
|
|
{{ end }}
|
|
{{ end }}
|
|
</div>
|
|
{{ partial "pagination/pagination-single" . }}
|
|
</main>
|
|
|
|
{{ else }}
|
|
|
|
<main class="gallery main">
|
|
<div class="grid single__contents single__contents--gallery">
|
|
<div class="grid-sizer"></div>
|
|
{{ if .File.Dir }}
|
|
{{ $basename := (replace .File.Dir "\\" "/") }}
|
|
{{ range (readDir (print "./static/" $basename)) }}
|
|
<div class="grid-item">
|
|
<a data-fancybox="gallery" href="{{ $basename | relURL }}{{ .Name }}" data-alt="{{ index (split .Name ".") 0 }}"><img src="{{ $basename | relURL }}{{ .Name }}" alt="{{ index (split .Name ".") 0 }}"/></a>
|
|
<div class="grid-item__desc hide">{{ index (split .Name ".") 0 }}</div>
|
|
</div>
|
|
{{ end }}
|
|
{{ end }}
|
|
</div>
|
|
{{ partial "pagination/pagination-single" . }}
|
|
</main>
|
|
|
|
{{ end }}
|
|
|
|
<div class="hide">
|
|
{{ partial "search/site-search" . }}
|
|
</div>
|
|
{{ partial "script/gallery-script" . }}
|
|
{{ partial "style/gallery-style" . }}
|
|
{{ end }} |