Nieuwsberichten voorzien van relevante personen

This commit is contained in:
Michael Boelen 2023-05-09 12:46:05 +02:00
parent 3cefc089b1
commit 048316a10b
3 changed files with 42 additions and 0 deletions

View file

@ -0,0 +1,7 @@
---
cascade:
type: news
title: "Nieuwsberichten"
---
Hier staan alle nieuwsberichten

View file

@ -0,0 +1,12 @@
{{ define "main" }}
{{ $icon_size := 20 }}
{{ $text := .Content }}
{{ $text }}
{{ if .Params.related_members }}
{{ .Scratch.Set "related_members" .Params.related_members }}
{{ partial "show-related-members.html" . }}
{{ end }}
{{ end }}

View file

@ -0,0 +1,23 @@
{{ $size_in_pixels := 150 }}
<div class="grid-team-members-small-photos">
{{ range $key,$val := .Scratch.Get "related_members" }}
{{ with (index $.Site.Data.personen .) }}
<div>
{{ if .thumbnail }}
<figure>
{{ if .profile_page }}
<a href="{{ .profile_page }}"><img src="{{ .thumbnail }}" alt="Foto van {{ .name }}" height="{{ $size_in_pixels }}" width="{{ $size_in_pixels }}" /></a>
{{ else }}
<img src="{{ .thumbnail }}" alt="Foto van {{ .name }}" height="{{ $size_in_pixels }}" width="{{ $size_in_pixels }}" />
{{ end }}
<figcaption>
<small><strong>{{ .name }}</strong></small>
</figcaption>
</figure>
{{ end }}
</div>
{{ end }}
{{ end }}
</div>