gallery/layouts/albums/list.html

32 lines
1.0 KiB
HTML

{{ 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 := . }}
{{ 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 }}