hugo-theme/layouts/photos/single.html

23 lines
654 B
HTML
Raw Normal View History

2024-03-01 21:02:34 +00:00
{{ partial "header.html" . }}
{{ partial "nav.html" . }}
2024-03-01 21:02:34 +00:00
<div class="content">
<h1>{{ .Title }}</h1>
{{ .Content }}
{{ $path := .Page.File.Path | strings.TrimSuffix (path.Ext .Page.File.Path) }}
{{ $path := printf "%s/*" $path }}
{{ $images := where (resources.Match $path ) "ResourceType" "eq" "image" }}
2024-03-02 01:50:04 +00:00
<div class="gallery">
{{ range $images }}
<div class="gallery-item">
{{ $thumbnail := .Process "resize x600 q50 jpeg" }}
{{ $public := .Process "jpeg q100" }}
<a href="{{ $public.RelPermalink }}" target="_blank"><img src="{{ $thumbnail.RelPermalink }}" /></a>
2024-03-02 01:50:04 +00:00
</div>
{{ end }}
</div>
2024-03-01 21:02:34 +00:00
</div>
{{ partial "footer.html" . }}