Resize and crop gallery images

This commit is contained in:
Luca 2023-03-12 20:25:00 +01:00
parent db79aae55f
commit fb5c933dfe
4 changed files with 6 additions and 3 deletions

View File

@ -4,6 +4,9 @@ languageCode = 'de-de'
paginate = 3 paginate = 3
title = 'kontakt Das Kulturprojekt' title = 'kontakt Das Kulturprojekt'
[imaging]
resampleFilter = "Lanczos"
[menu] [menu]
[[menu.footer]] [[menu.footer]]
name = "Impressum" name = "Impressum"

View File

@ -5,7 +5,7 @@
{{ range .Pages }} {{ range .Pages }}
<a class="blur-on-hover" href="{{ .RelPermalink }}"> <a class="blur-on-hover" href="{{ .RelPermalink }}">
{{ with index (.Resources.ByType "image") 0 }} {{ with index (.Resources.ByType "image") 0 }}
<img alt="{{ .Title }}" src="{{ .RelPermalink }}"> <img alt="{{ .Title }}" src="{{ (.Fill "560x560").RelPermalink }}">
{{ end }} {{ end }}
<p>{{ .Title }}</p> <p>{{ .Title }}</p>
</a> </a>

View File

@ -3,7 +3,7 @@
{{ .Content }} {{ .Content }}
<section class="gallery"> <section class="gallery">
{{ range .Resources.ByType "image" }} {{ range .Resources.ByType "image" }}
<img alt="{{ .Title }}" src="{{ .RelPermalink }}"> <img alt="{{ .Title }}" src="{{ (.Fill "560x560").RelPermalink }}">
{{ end }} {{ end }}
</section> </section>
{{ end }} {{ end }}

View File

@ -31,7 +31,7 @@
{{ range first 4 (.Site.GetPage "/galerie").Pages }} {{ range first 4 (.Site.GetPage "/galerie").Pages }}
<a class="blur-on-hover" href="{{ .RelPermalink }}"> <a class="blur-on-hover" href="{{ .RelPermalink }}">
{{ with index (.Resources.ByType "image") 0 }} {{ with index (.Resources.ByType "image") 0 }}
<img alt="{{ .Title }}" src="{{ .RelPermalink }}"> <img alt="{{ .Title }}" src="{{ (.Fill "560x560").RelPermalink }}">
{{ end }} {{ end }}
<p>{{ .Title }}</p> <p>{{ .Title }}</p>
</a> </a>