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
title = 'kontakt Das Kulturprojekt'
[imaging]
resampleFilter = "Lanczos"
[menu]
[[menu.footer]]
name = "Impressum"

View File

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

View File

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

View File

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