Fix up the CSS and photos list templates
This commit is contained in:
parent
f0ae80df99
commit
3d8a4106d3
2 changed files with 17 additions and 10 deletions
|
@ -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;
|
||||||
|
|
|
@ -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 }}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue