hugo-page-test/themes/tsc_vfl/layouts/shortcodes/tsc/vorstand.html

36 lines
1.2 KiB
HTML
Raw Normal View History

{{ with .Site.GetPage "person" }}
{{/*{{ $person := . }}*/}}
{{ with .GetPage ($.Get "name") }}
{{ $imageName := .Params.Get "image" }}
{{ $image := "" }}
{{ with .Resources.GetMatch $imageName}}
{{ $image = . }}
{{ else }}
{{ warnf "Image for %s is not correclty found. Falling back to default." ($.Get "name") }}
{{ with .Resources.ByType "image" }}
{{ $image = index . 0 }}
{{ else }}
{{/* $image */}}
{{ end }}
2023-01-19 20:05:28 +00:00
{{ end }}
{{ $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 }}