Add generic code to build album of all images
This commit is contained in:
32
layouts/albums/list.html
Normal file
32
layouts/albums/list.html
Normal file
@@ -0,0 +1,32 @@
|
||||
{{ 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 .Params.teaserImage }}
|
||||
{{ $img := $sa.Resources.Get . }}
|
||||
<img src="{{ ($img.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 }}
|
||||
Reference in New Issue
Block a user