Fix up the CSS and photos list templates
This commit is contained in:
parent
66240852ed
commit
40fbc2c881
2 changed files with 17 additions and 10 deletions
|
@ -2,7 +2,6 @@
|
|||
--photo-params-background: #ddd;
|
||||
--photo-params-border-color: #aaa;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--photo-params-background: #444;
|
||||
|
@ -21,7 +20,7 @@ ul.grid {
|
|||
padding: 0;
|
||||
}
|
||||
|
||||
.grid li {
|
||||
.photos .grid li {
|
||||
display: block;
|
||||
height: 210px;
|
||||
list-style: none;
|
||||
|
|
|
@ -1,12 +1,20 @@
|
|||
{{ define "header" }}
|
||||
{{ partial "header.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "main" }}
|
||||
<section class="photos">
|
||||
<ul class="grid">
|
||||
{{ range .Pages }}
|
||||
{{ $thumbnailResource := (index (.Resources.ByType "image") 0) }}
|
||||
{{ $thumbnail := $thumbnailResource.Fit "600x600" }}
|
||||
{{ $thumbnail := $thumbnail.Crop "600x600" }}
|
||||
{{- 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 }}
|
||||
{{- end -}}
|
||||
</ul>
|
||||
</section>
|
||||
{{ end }}
|
||||
|
||||
{{ define "footer" }}
|
||||
{{ partial "footer.html" . }}
|
||||
{{ end }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue