First cut at a photos site

This commit is contained in:
Eryn Wells 2022-08-27 09:17:42 -07:00
parent 1f6f7056ea
commit f286e5062d
8 changed files with 208 additions and 1 deletions

12
layouts/photos/list.html Normal file
View file

@ -0,0 +1,12 @@
{{ define "main" }}
<section class="photos">
<ul class="grid">
{{ range .Pages }}
{{ $thumbnailResource := (index (.Resources.ByType "image") 0) }}
{{ $thumbnail := $thumbnailResource.Fit "600x600" }}
{{ $thumbnail := $thumbnail.Crop "600x600" }}
<li><a href="{{ .RelPermalink }}" title="{{ .Title }}"><img src="{{ $thumbnail.RelPermalink }}"></a></li>
{{ end }}
</ul>
</section>
{{ end }}