2023-01-20 14:14:39 +00:00
|
|
|
{{ with .Site.GetPage "person" }}
|
|
|
|
{{ with .GetPage ($.Get "name") }}
|
|
|
|
{{ $imageName := .Params.Get "image" }}
|
|
|
|
{{ $image := "" }}
|
|
|
|
{{ with .Resources.GetMatch $imageName}}
|
2023-01-20 14:31:30 +00:00
|
|
|
{{ $image = .RelPermalink }}
|
2023-01-20 14:14:39 +00:00
|
|
|
{{ else }}
|
|
|
|
{{ warnf "Image for %s is not correclty found. Falling back to default." ($.Get "name") }}
|
|
|
|
{{ with .Resources.ByType "image" }}
|
2023-01-20 14:31:30 +00:00
|
|
|
{{ $image = (index . 0).RelPermalink }}
|
2023-01-20 14:14:39 +00:00
|
|
|
{{ else }}
|
2023-01-20 14:31:30 +00:00
|
|
|
{{ with .Params.Get "sex" }}
|
|
|
|
{{ if eq . "male" }}
|
|
|
|
{{ $image = relURL "img/persons/male.png" }}
|
|
|
|
{{ else }}
|
|
|
|
{{ errorf "Generic female icon not found." }}
|
|
|
|
{{ 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
|
|
|
|
"name" (.Params.Get "title")
|
|
|
|
}}
|
|
|
|
{{ partial "tsc/start-person" $config }}
|
|
|
|
<div class="content content-vorstand">
|
|
|
|
<div class="role">{{ $.Get "role" }}</div>
|
|
|
|
<div class="name">
|
|
|
|
{{ with $.Get "mail" }}
|
|
|
|
<a href="mailto:{{ . }}"><img src="/img/mail.jpg" class="mail-icon"></a>
|
|
|
|
{{ end }}
|
|
|
|
{{ .Params.Get "title" }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{ partial "tsc/end-person" . }}
|
|
|
|
{{ else }}
|
|
|
|
{{ errorf "Cannot find person %s." ($.Get "name") }}
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|