gallery/layouts/albums/list.html

32 lines
1.0 KiB
HTML
Raw Permalink Normal View History

{{ define "main" }}
<h2>{{ .Title }}</h2>
{{ partial "albums/breadcrumbs.html" . }}
{{ .Content }}
<div class="subalbums">
{{ range .Pages.GroupBy "Weight" }}
{{ range .Pages.ByTitle }}
<a href="{{ .RelPermalink }}" class="subalbum">
<div class="teaser">
{{ $sa := . }}
2024-10-24 11:07:53 +00:00
{{ with .Resources.Get "thumbnail.jpg" }}
<img src="{{ (.Fit "300x200 webm").RelPermalink }}" alt="{{ $sa.Title }}">
{{ else }}
{{ warnf "Could not find teaser image for %s" .RelPermalink }}
<img src="{{ (resources.Get "img/no-image.png").RelPermalink }}">
{{ end }}
</div>
<div class="title">{{ .Title }}</div>
</a>
{{ end }}
{{ end }}
</div>
<div class="images">
{{ with .Resources.Get "album.zip" }}
<div class="download">
<a href="{{ .RelPermalink }}" class="button" download="{{ $.Title }}">Ganzes Album herunter laden</a>
</div>
{{ end }}
<div id="gallery"></div>
</div>
{{ end }}