From ef3be36585c3886d87730c82cc077dda3a2f4e3e Mon Sep 17 00:00:00 2001 From: Michael Boelen Date: Sun, 7 May 2023 10:47:24 +0200 Subject: [PATCH] Aanpassen template zodat deze modulair is --- themes/nluug/layouts/_default/baseof.html | 30 +++++++++++++++ themes/nluug/layouts/_default/single.html | 36 ++---------------- themes/nluug/layouts/index.html | 20 +++------- .../nluug/layouts/lidmaatschap/section.html | 38 +++++++------------ themes/nluug/layouts/organisatie/section.html | 14 +++++++ 5 files changed, 66 insertions(+), 72 deletions(-) create mode 100644 themes/nluug/layouts/_default/baseof.html create mode 100644 themes/nluug/layouts/organisatie/section.html diff --git a/themes/nluug/layouts/_default/baseof.html b/themes/nluug/layouts/_default/baseof.html new file mode 100644 index 0000000..3a4eb1f --- /dev/null +++ b/themes/nluug/layouts/_default/baseof.html @@ -0,0 +1,30 @@ +{{ $currentLang := $.Site.Language.Lang }} + + + {{ partial "head.html" . }} + + +
+
+ {{ partial "header.html" . }} +
+ + {{- block "main" . }} + {{ .Content }} + {{- end }} + {{ if eq .Section "posts" }} + + {{ end }} +
+
+
+ + diff --git a/themes/nluug/layouts/_default/single.html b/themes/nluug/layouts/_default/single.html index edb56a8..0f1c7d0 100644 --- a/themes/nluug/layouts/_default/single.html +++ b/themes/nluug/layouts/_default/single.html @@ -1,33 +1,3 @@ - - - {{ partial "head.html" . }} - - -
-
- {{ partial "header.html" . }} -
- - - {{ .Content }} - {{ if eq .Section "posts" }} - - {{ end }} -
- {{ if eq .Section "posts" }} -
- {{ partial "comments.html" $ }} -
- {{ end }} -
-
- - +{{ define "content" }} +{{ .Content }} +{{ end }} diff --git a/themes/nluug/layouts/index.html b/themes/nluug/layouts/index.html index c6100fb..ba1dc19 100644 --- a/themes/nluug/layouts/index.html +++ b/themes/nluug/layouts/index.html @@ -1,13 +1,6 @@ - - - {{ partial "head.html" . }} - - -
-
- {{ partial "header.html" . }} - {{ .Content }} - {{ if gt (len ( where .Site.RegularPages "Section" "posts" )) 0 }} +{{ define "content" }} + {{ .Content }} + {{ if gt (len ( where .Site.RegularPages "Section" "posts" )) 0 }}

Latest Post

{{ range (first 3 (where .Site.RegularPages "Section" "posts" ).ByDate.Reverse) }} @@ -17,8 +10,5 @@

{{ end }}

- {{ end }} -
-
- - + {{ end }} +{{ end }} diff --git a/themes/nluug/layouts/lidmaatschap/section.html b/themes/nluug/layouts/lidmaatschap/section.html index 38c5132..ecc1d58 100644 --- a/themes/nluug/layouts/lidmaatschap/section.html +++ b/themes/nluug/layouts/lidmaatschap/section.html @@ -1,24 +1,14 @@ - - - {{ partial "head.html" . }} - - -
-
- {{ partial "header.html" . }} - {{ .Content }} -
-

Meer weten?

- -
-
-
- - +{{ define "main" }} + {{ .Content }} +
+

Relevante pagina's:

+ +
+{{ end }} diff --git a/themes/nluug/layouts/organisatie/section.html b/themes/nluug/layouts/organisatie/section.html new file mode 100644 index 0000000..ecc1d58 --- /dev/null +++ b/themes/nluug/layouts/organisatie/section.html @@ -0,0 +1,14 @@ +{{ define "main" }} + {{ .Content }} +
+

Relevante pagina's:

+ +
+{{ end }}