Fix Jana Schäfer's presentation on site

This commit is contained in:
2024-12-05 11:03:05 +01:00
parent 284313da81
commit 9b886892c2
5 changed files with 5 additions and 4 deletions

View File

@@ -5,16 +5,17 @@
{{ with .Resources.GetMatch $imageName}}
{{ $image = (.Fit "60x80 webp").RelPermalink }}
{{ else }}
{{ warnf "Image for %s is not correclty found. Falling back to default." ($.Get "name") }}
{{ with .Resources.ByType "image" }}
{{ $image = ((index . 0).Fit "60x80 webp").RelPermalink }}
{{ warnf "Image for %s is not correclty found. Falling back to first found image in page resources." ($.Get "name") }}
{{ else }}
{{ with .Params.sex }}
{{ if eq . "male" }}
{{ $image = relURL "img/persons/male.png" }}
{{ else }}
{{ $image = relURL "img/persons/female.png" }}
{{ $image = relURL "img/persons/female.png" }}
{{ end }}
{{ warnf "Image for %s is not correclty found. Falling back to generic image." ($.Get "name") }}
{{ else }}
{{ warnf "Cannot find sex of %s." ($.Get "name") }}
{{ end }}