From ab2ae452c15d2237d59193d3a37f47f8c80575b7 Mon Sep 17 00:00:00 2001 From: Laurens Date: Wed, 3 Apr 2024 12:14:44 +0200 Subject: [PATCH] events framework --- themes/hugoplate/layouts/events/list.html | 27 +++++++ themes/hugoplate/layouts/events/single.html | 87 +++++++++++++++++++++ 2 files changed, 114 insertions(+) create mode 100644 themes/hugoplate/layouts/events/list.html create mode 100644 themes/hugoplate/layouts/events/single.html diff --git a/themes/hugoplate/layouts/events/list.html b/themes/hugoplate/layouts/events/list.html new file mode 100644 index 00000000..24731bb5 --- /dev/null +++ b/themes/hugoplate/layouts/events/list.html @@ -0,0 +1,27 @@ +{{ define "main" }} {{ partial "page-header" . }} + +
+
+
+ +
+
+ {{ $paginator:= .Paginate .RegularPages }} {{ range $paginator.Pages + }} +
+ {{ partial "components/blog-card" . }} +
+ {{ end }} +
+ {{ partial "components/pagination.html" . }} +
+ +
+ + {{ $widget:= site.Params.widgets.sidebar }} {{ partialCached + "widgets/widget-wrapper" ( dict "Widgets" $widget "Scope" . ) }} +
+
+
+
+{{ end }} diff --git a/themes/hugoplate/layouts/events/single.html b/themes/hugoplate/layouts/events/single.html new file mode 100644 index 00000000..dc0d878a --- /dev/null +++ b/themes/hugoplate/layouts/events/single.html @@ -0,0 +1,87 @@ +{{ define "main" }} +
+
+
+
+ {{ $image:= .Params.image }} {{ if $image }} +
+ {{ partial "image" (dict "Src" $image "Alt" .Title "Class" "w-full + rounded") }} +
+ {{ end }} +

{{ .Title }}

+ +
{{ .Content }}
+
+ {{ $tags:= .Params.tags }} {{ if $tags }} +
+
{{ i18n "tags" }} :
+ +
+ {{ end }} +
+ {{ partial "social-share" (dict "Context" . "Class" "share-icons" + "Title" (i18n "share") "Whatsapp" false "Telegram" false "Linkedin" + false "Pinterest" false "Tumblr" false "Vk" false) }} +
+
+ + {{ if site.Config.Services.Disqus.Shortname }} +
{{ template "_internal/disqus.html" . }}
+ {{ end }} +
+
+ + + {{ $related := (where site.RegularPages "Section" "in" + site.Params.mainSections) | intersect (where site.RegularPages ".Title" "!=" + .Title) | union (site.RegularPages.Related . ) }} {{ $related = $related | + shuffle | first 3 }} {{ with $related }} +
+

{{ i18n "related_posts" }}

+
+ {{ range . }} +
{{ partial "components/blog-card" . }}
+ {{ end }} +
+
+ {{ end }} +
+
+{{ end }}