6
0
Fork 0

Laten zien van welke commissies iemand lid is en optimaliseren weergave van evenementen waarop iemand gesproken heeft

This commit is contained in:
Michael Boelen 2023-06-08 15:48:48 +02:00
parent fb4c5b4f7d
commit fd1d5c204d

View file

@ -1,23 +1,48 @@
{{ define "main" }} {{ define "main" }}
{{ $text := .Content }} {{ $text := .Content }}
{{ $.Scratch.Set "committee_member" slice }}
{{ $.Scratch.Set "speaker_at_events" slice }}
{{ with (index .Site.Data.personen (substr $.File.LogicalName 0 -3)) }} {{ with (index .Site.Data.personen (substr $.File.LogicalName 0 -3)) }}
{{ $personid := .id }} {{ $personid := .id }}
{{ if .thumbnail }}<img src="{{ .thumbnail }}" alt="Foto van {{ .name }}">{{ end }} {{ if .thumbnail }}<img src="{{ .thumbnail }}" alt="Foto van {{ .name }}">{{ end }}
{{ $text }} {{ $text }}
{{ range where $.Site.RegularPages "Section" "organisatie" }}
{{ if .speaker }} {{ if .Params.team_members }}
<h2>Presentaties</h2> {{ if in .Params.team_members $personid }}
<ul> {{ $.Scratch.Add "committee_member" . }}
{{ range where $.Site.RegularPages "Section" "evenementen" }} {{ end }}
{{ if .Params.speakers }}
{{ if in .Params.speakers $personid }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end }}
{{ end }}
{{ end }} {{ end }}
{{ end }}
{{ if (gt ($.Scratch.Get "committee_member" | len) 0) }}
<h2>Organisatie</h2>
<p>{{ .name }} is actief binnen de volgende teams/commissies:</p>
<ul>
{{ range $.Scratch.Get "committee_member" }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end }}
</ul> </ul>
{{ end }} {{ end }}
{{ range where $.Site.RegularPages "Section" "evenementen" }}
{{ if .Params.speakers }}
{{ if in .Params.speakers $personid }}
{{ $.Scratch.Add "speaker_at_events" . }}
{{ end }}
{{ end }}
{{ end }}
{{ if (gt ($.Scratch.Get "speaker_at_events" | len) 0) }}
<h2>Presentaties</h2>
<ul>
{{ range $.Scratch.Get "speaker_at_events" }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end }}
</ul>
{{ end }}
{{ if or (.email) (.websites) }} {{ if or (.email) (.websites) }}
<h2>Contact</h2> <h2>Contact</h2>
<ul> <ul>