From 1ec637828ecfb8e995a4816faa475ca5bfc5600e Mon Sep 17 00:00:00 2001 From: Michael Boelen Date: Thu, 2 Nov 2023 10:05:14 +0100 Subject: [PATCH] Verbeterde weergave sprekers --- themes/nluug/layouts/evenementen/event-talk.html | 9 ++++----- .../nluug/layouts/partials/show-speakers-small.html | 13 +++++++++++++ 2 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 themes/nluug/layouts/partials/show-speakers-small.html diff --git a/themes/nluug/layouts/evenementen/event-talk.html b/themes/nluug/layouts/evenementen/event-talk.html index a417094..cf00a39 100644 --- a/themes/nluug/layouts/evenementen/event-talk.html +++ b/themes/nluug/layouts/evenementen/event-talk.html @@ -6,11 +6,10 @@
{{ $count := .Params.speakers | len }}

{{ i18n "speaker" (dict "Count" $count) | strings.FirstUpper }}

- {{ range $person := .Params.speakers }} - {{ with (index site.Data.personen $person) }} - {{ partial "show-image-of-person.html" (dict "context" . "profile_details" . "add_link_to_image" true) }} - {{ end }} - {{ end }} +
+ {{ .Scratch.Set "related_speakers" .Params.speakers }} + {{ partial "show-speakers-small.html" . }} +
{{ end }} diff --git a/themes/nluug/layouts/partials/show-speakers-small.html b/themes/nluug/layouts/partials/show-speakers-small.html new file mode 100644 index 0000000..5953966 --- /dev/null +++ b/themes/nluug/layouts/partials/show-speakers-small.html @@ -0,0 +1,13 @@ +
+ {{ range $key,$val := .Scratch.Get "related_speakers" }} + {{ with (index $.Site.Data.personen .) }} +
+ {{ if .thumbnail }} + {{ $image := replace .thumbnail "200x200" "150x150" }} + {{ $alttext := printf "Foto van %s" .name }} + {{ partial "show-image.html" (dict "context" . "image" $image "alt" $alttext "figcaption" .name "link" .profile_page) }} + {{ end }} +
+ {{ end }} + {{ end }} +