2023-01-20 14:14:39 +00:00
|
|
|
{{ with .Site.GetPage "person" }}
|
|
|
|
{{ with .GetPage ($.Get "name") }}
|
2023-07-27 09:40:31 +00:00
|
|
|
{{ $imageName := .Params.image }}
|
2023-01-20 14:14:39 +00:00
|
|
|
{{ $image := "" }}
|
2024-01-14 22:18:19 +00:00
|
|
|
{{ with (.Resources.GetMatch $imageName) }}
|
|
|
|
{{ $image = (.Fit "60x80 webp").RelPermalink }}
|
2023-01-20 14:14:39 +00:00
|
|
|
{{ else }}
|
|
|
|
{{ warnf "Image for %s is not correclty found. Falling back to default." ($.Get "name") }}
|
2024-01-14 22:18:19 +00:00
|
|
|
{{ with (.Resources.ByType "image") }}
|
|
|
|
{{ $image = ((index . 0).Fit "60x80 webp").RelPermalink }}
|
2023-01-20 14:14:39 +00:00
|
|
|
{{ else }}
|
2023-07-27 09:40:31 +00:00
|
|
|
{{ with .Params.sex }}
|
2023-01-20 14:31:30 +00:00
|
|
|
{{ if eq . "male" }}
|
|
|
|
{{ $image = relURL "img/persons/male.png" }}
|
|
|
|
{{ else }}
|
2024-01-05 19:11:13 +00:00
|
|
|
{{ $image = relURL "img/persons/female.png" }}
|
2023-01-20 14:31:30 +00:00
|
|
|
{{ end }}
|
|
|
|
{{ else }}
|
|
|
|
{{ warnf "Cannot find sex of %s." ($.Get "name") }}
|
|
|
|
{{ end }}
|
2023-01-20 14:14:39 +00:00
|
|
|
{{ end }}
|
2023-01-19 20:05:28 +00:00
|
|
|
{{ end }}
|
2023-01-20 14:14:39 +00:00
|
|
|
{{ $config :=
|
|
|
|
dict
|
|
|
|
"image" $image
|
2023-07-27 09:40:31 +00:00
|
|
|
"name" (.Params.title)
|
2023-01-20 14:14:39 +00:00
|
|
|
}}
|
|
|
|
{{ partial "tsc/start-person" $config }}
|
|
|
|
<div class="content content-vorstand">
|
|
|
|
<div class="role">{{ $.Get "role" }}</div>
|
|
|
|
<div class="name">
|
|
|
|
{{ with $.Get "mail" }}
|
2024-11-08 08:44:37 +00:00
|
|
|
<a href="{{ printf "mailto:%s" . | encoding.Base64Encode }}" class="mail-link">
|
2024-11-08 08:57:13 +00:00
|
|
|
<img src="/img/mail.jpg" class="mail-icon"></a>
|
2023-01-20 14:14:39 +00:00
|
|
|
{{ end }}
|
2023-07-27 09:40:31 +00:00
|
|
|
{{ .Params.title }}
|
2023-01-20 14:14:39 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{ partial "tsc/end-person" . }}
|
|
|
|
{{ else }}
|
|
|
|
{{ errorf "Cannot find person %s." ($.Get "name") }}
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|