hugo-theme-console/layouts/gallery/list.html
Marcin Mierzejewski 9943fc2d55 big bang
2020-04-30 22:02:40 +02:00

17 lines
No EOL
579 B
HTML

{{ define "main" }}
<h1>{{ .Page.Title }}</h1>
{{ .Content }}
<div class="image-grid">
{{ range sort .Data.Pages "Date" "desc" }}
{{ if and (isset .Params "image") .Params.image }}
<a href="{{ .Permalink }}" title="{{ .Title }}">
{{ $image := .Page.Resources.GetMatch .Params.image }}
{{ with $image }}
{{ $thumb := .Resize "400x" }}
<img src="{{ $thumb.RelPermalink }}" alt="{{ .Title }}" class="img-responsive">
{{end}}
</a>
{{ end }}
{{ end }}
</div>
{{ end }}