Fix up the CSS and photos list templates

This commit is contained in:
Eryn Wells 2022-10-15 10:02:01 -07:00
parent f0ae80df99
commit 3d8a4106d3
2 changed files with 17 additions and 10 deletions

View file

@ -2,7 +2,6 @@
--photo-params-background: #ddd; --photo-params-background: #ddd;
--photo-params-border-color: #aaa; --photo-params-border-color: #aaa;
} }
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
:root { :root {
--photo-params-background: #444; --photo-params-background: #444;
@ -21,7 +20,7 @@ ul.grid {
padding: 0; padding: 0;
} }
.grid li { .photos .grid li {
display: block; display: block;
height: 210px; height: 210px;
list-style: none; list-style: none;

View file

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