From 048316a10b2badfe6403468d013ddb9473f072c1 Mon Sep 17 00:00:00 2001 From: Michael Boelen Date: Tue, 9 May 2023 12:46:05 +0200 Subject: [PATCH] Nieuwsberichten voorzien van relevante personen --- content/nieuws/_index.rst | 7 ++++++ themes/nluug/layouts/news/single.html | 12 ++++++++++ .../partials/show-related-members.html | 23 +++++++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 content/nieuws/_index.rst create mode 100644 themes/nluug/layouts/news/single.html create mode 100644 themes/nluug/layouts/partials/show-related-members.html diff --git a/content/nieuws/_index.rst b/content/nieuws/_index.rst new file mode 100644 index 0000000..f0cee48 --- /dev/null +++ b/content/nieuws/_index.rst @@ -0,0 +1,7 @@ +--- +cascade: + type: news +title: "Nieuwsberichten" +--- + +Hier staan alle nieuwsberichten diff --git a/themes/nluug/layouts/news/single.html b/themes/nluug/layouts/news/single.html new file mode 100644 index 0000000..63c0a83 --- /dev/null +++ b/themes/nluug/layouts/news/single.html @@ -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 }} diff --git a/themes/nluug/layouts/partials/show-related-members.html b/themes/nluug/layouts/partials/show-related-members.html new file mode 100644 index 0000000..47d95ac --- /dev/null +++ b/themes/nluug/layouts/partials/show-related-members.html @@ -0,0 +1,23 @@ + +{{ $size_in_pixels := 150 }} + +
+ {{ range $key,$val := .Scratch.Get "related_members" }} + {{ with (index $.Site.Data.personen .) }} +
+ {{ if .thumbnail }} +
+ {{ if .profile_page }} + Foto van {{ .name }} + {{ else }} + Foto van {{ .name }} + {{ end }} +
+ {{ .name }} +
+
+ {{ end }} +
+ {{ end }} + {{ end }} +