diff --git a/config/_default/params.toml b/config/_default/params.toml index a1ac02d..c8380b6 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -1,34 +1,34 @@ # keywords for seo keywords = "buntes haus celle, buntes haus, bunteshaus, celle, buntes haus e.V., www.bunteshaus.de, celle, punk, reggae, ska, konzerte, partys, soziokultur, soziokulturelles zentrum celle, elektro, electroe, jugendzentrum, celle, dum n bass, konzert, musik, politik, kultur, alternativ, cd kaserne celle, cd kaserne, plenum, celle, antifa, antira, anti akw, anti atom celle, veranstaltungen, infoladen, proberaum celle, archiv für neue soziale bewegungen in celle, hartz 4 IV beratung celle, skaten, graffiti, sprayen, kunst, fahrradwerkstatt, deka dance celle, dekadance, Revista, probably the friendliest Place on Earth" -#do you want a contact page? +#do you want a contact link? contact = true -#do you want an archive? +#do you want an archive link? archive = true -#do you want an searchpage?? +#do you want an searchpage link? search = true -#do you want a newsletter page? +#do you want a newsletter link? newsletter = true -#do you want a links page? +#do you want a "links" link? links = true -# do you want an imprint? +# do you want an imprint link? imprint = true -#do you want an media folder? -media = true +#do you want an files link? +files = true -#do you want an misc folder? -misc = true +#do you want an tools link? +tools = true #do you want an rss link? rss = true -#do you want to show a link to the sourcecode? +#do you want an sourcecode link? sourcecode = true # what is seen in the header? diff --git a/content/about/_index.de.md b/content/about/_index.de.md index 49bd138..6fb3665 100644 --- a/content/about/_index.de.md +++ b/content/about/_index.de.md @@ -1,6 +1,5 @@ --- title: "Über uns" -layout: "gen_list" --- Wir sind das Buntehaus, ein [soziokulturelles](/bunteshaus/soziokultur) Zentrum in Celle. Wir leben vom mitmachen und so. diff --git a/content/archive.de.md b/content/archive/_index.de.md similarity index 57% rename from content/archive.de.md rename to content/archive/_index.de.md index 7875694..3a4a4b9 100644 --- a/content/archive.de.md +++ b/content/archive/_index.de.md @@ -1,4 +1,3 @@ --- title: "Archiv" -layout: "archive" --- diff --git a/content/contact/index.de.md b/content/contact/_index.de.md similarity index 97% rename from content/contact/index.de.md rename to content/contact/_index.de.md index 543163a..52708fc 100644 --- a/content/contact/index.de.md +++ b/content/contact/_index.de.md @@ -1,6 +1,5 @@ --- title: "Kontakt" -layout: "contact_imprint" banner: false --- Konzerte: konzerte@bunteshaus.de diff --git a/content/events/_index.de.md b/content/events/_index.de.md index 79f5639..0b03b57 100644 --- a/content/events/_index.de.md +++ b/content/events/_index.de.md @@ -1,4 +1,3 @@ --- title: "Termine" -layout: "gen_list" --- diff --git a/content/featured/_index.de.md b/content/featured/_index.de.md index 5f9dc6e..187e694 100644 --- a/content/featured/_index.de.md +++ b/content/featured/_index.de.md @@ -1,4 +1,3 @@ --- -title: "featureds" -layout: "gen_list" +title: "featured" --- diff --git a/content/misc/media/Buntes.Haus.Celle.Logo.1.jpg b/content/files/Buntes.Haus.Celle.Logo.1.jpg similarity index 100% rename from content/misc/media/Buntes.Haus.Celle.Logo.1.jpg rename to content/files/Buntes.Haus.Celle.Logo.1.jpg diff --git a/content/misc/media/Buntes.Haus.Celle.Logo.2.jpg b/content/files/Buntes.Haus.Celle.Logo.2.jpg similarity index 100% rename from content/misc/media/Buntes.Haus.Celle.Logo.2.jpg rename to content/files/Buntes.Haus.Celle.Logo.2.jpg diff --git a/content/misc/media/Buntes.Haus.Celle.Logo.3.jpg b/content/files/Buntes.Haus.Celle.Logo.3.jpg similarity index 100% rename from content/misc/media/Buntes.Haus.Celle.Logo.3.jpg rename to content/files/Buntes.Haus.Celle.Logo.3.jpg diff --git a/content/misc/media/Buntes.Haus.Celle.Logo.4.jpg b/content/files/Buntes.Haus.Celle.Logo.4.jpg similarity index 100% rename from content/misc/media/Buntes.Haus.Celle.Logo.4.jpg rename to content/files/Buntes.Haus.Celle.Logo.4.jpg diff --git a/content/misc/media/Buntes.Haus.Celle.Logo.5.jpg b/content/files/Buntes.Haus.Celle.Logo.5.jpg similarity index 100% rename from content/misc/media/Buntes.Haus.Celle.Logo.5.jpg rename to content/files/Buntes.Haus.Celle.Logo.5.jpg diff --git a/content/misc/media/Buntes.Haus.Celle.Logo.5.png b/content/files/Buntes.Haus.Celle.Logo.5.png similarity index 100% rename from content/misc/media/Buntes.Haus.Celle.Logo.5.png rename to content/files/Buntes.Haus.Celle.Logo.5.png diff --git a/content/misc/media/Buntes.Haus.Celle.Zeichnung.jpg b/content/files/Buntes.Haus.Celle.Zeichnung.jpg similarity index 100% rename from content/misc/media/Buntes.Haus.Celle.Zeichnung.jpg rename to content/files/Buntes.Haus.Celle.Zeichnung.jpg diff --git a/content/files/_index.de.md b/content/files/_index.de.md new file mode 100644 index 0000000..bf90dfd --- /dev/null +++ b/content/files/_index.de.md @@ -0,0 +1,4 @@ +--- +title: "Dateien" +banner: false +--- diff --git a/content/misc/flyertext.de.md b/content/files/flyertext.de.md similarity index 100% rename from content/misc/flyertext.de.md rename to content/files/flyertext.de.md diff --git a/content/misc/media/nabu_vdj2018_broschuere.pdf b/content/files/nabu_vdj2018_broschuere.pdf similarity index 100% rename from content/misc/media/nabu_vdj2018_broschuere.pdf rename to content/files/nabu_vdj2018_broschuere.pdf diff --git a/content/misc/partyunterlagen.de.md b/content/files/partyunterlagen.de.md similarity index 100% rename from content/misc/partyunterlagen.de.md rename to content/files/partyunterlagen.de.md diff --git a/content/imprint.de.md b/content/imprint/_index.de.md similarity index 99% rename from content/imprint.de.md rename to content/imprint/_index.de.md index d61979b..39671ae 100644 --- a/content/imprint.de.md +++ b/content/imprint/_index.de.md @@ -1,6 +1,5 @@ --- title: "Impressum" -layout: "contact_imprint" banner: false --- Angaben gemäß § 5 TMG diff --git a/content/links/_index.de.md b/content/links/_index.de.md index d816a44..c81c6a1 100644 --- a/content/links/_index.de.md +++ b/content/links/_index.de.md @@ -1,5 +1,4 @@ --- title: "Links" -layout: "links" banner: false --- diff --git a/content/links/list.md b/content/links/list.md index c222350..166d1ad 100644 --- a/content/links/list.md +++ b/content/links/list.md @@ -2,3 +2,4 @@ title: "Gruppe LiST: Land in Sicht - Transition Celle" link: "https://list-celle.over-blog.com/" --- +Befreundete Gruppe diff --git a/content/misc/_index.de.md b/content/misc/_index.de.md deleted file mode 100644 index 87055a1..0000000 --- a/content/misc/_index.de.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: "Verschiedenes" -layout: "section_list" -banner: false ---- diff --git a/content/misc/media/_index.de.md b/content/misc/media/_index.de.md deleted file mode 100644 index b857f82..0000000 --- a/content/misc/media/_index.de.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: "Medien" -layout: "media" -banner: false ---- diff --git a/content/news/_index.de.md b/content/news/_index.de.md index 75d64e1..69d6a2b 100644 --- a/content/news/_index.de.md +++ b/content/news/_index.de.md @@ -1,4 +1,3 @@ --- title: "Neuigkeiten" -layout: "gen_list" --- diff --git a/content/newsletter.de.md b/content/newsletter/_index.de.md similarity index 96% rename from content/newsletter.de.md rename to content/newsletter/_index.de.md index 4e38d08..f33cad9 100644 --- a/content/newsletter.de.md +++ b/content/newsletter/_index.de.md @@ -1,6 +1,5 @@ --- title: "Newsletter" -layout: "generic_single" --- Wenn ihr in unseren Newsletter aufgenommen werden wollt, schickt uns eine email! diff --git a/content/recurrent/_index.de.md b/content/recurrent/_index.de.md index 2a6b5df..833cd30 100644 --- a/content/recurrent/_index.de.md +++ b/content/recurrent/_index.de.md @@ -1,4 +1,3 @@ --- title: "Regelmässig" -layout: "gen_list" --- diff --git a/content/search/_index.de.md b/content/search/_index.de.md index d183f4e..1c5eff4 100644 --- a/content/search/_index.de.md +++ b/content/search/_index.de.md @@ -1,7 +1,5 @@ --- title: "Volltextsuche" summary: "Seite nach Stichworten durchsuchen" -date: 2020-10-29 -layout: "search" --- {{< search >}} diff --git a/content/misc/tools/_index.de.md b/content/tools/_index.de.md similarity index 61% rename from content/misc/tools/_index.de.md rename to content/tools/_index.de.md index 6e7e63c..72adc90 100644 --- a/content/misc/tools/_index.de.md +++ b/content/tools/_index.de.md @@ -1,5 +1,4 @@ --- title: "Tools" -layout: "section_list" banner: false --- diff --git a/content/misc/tools/generator.de.md b/content/tools/generator.de.md similarity index 100% rename from content/misc/tools/generator.de.md rename to content/tools/generator.de.md diff --git a/content/misc/tools/not_translated.de.md b/content/tools/not_translated.de.md similarity index 100% rename from content/misc/tools/not_translated.de.md rename to content/tools/not_translated.de.md diff --git a/themes/buha/assets/scss/banner.scss b/themes/buha/assets/scss/banner.scss index f50a8d6..f5b8ab8 100644 --- a/themes/buha/assets/scss/banner.scss +++ b/themes/buha/assets/scss/banner.scss @@ -1,3 +1,20 @@ +// Breakpoints +$bp-tiny: 40em; // 640px +$bp-small: 48em; // 768px +$bp-medium: 64em; // 1024px +$bp-large: 85.375em; // 1366px +$bp-xlarge: 120em; // 1920px +$bp-xxlarge: 160em; // 2560px + +// Media Queries +$mq-tiny: "(min-width: #{$bp-tiny})"; +$mq-small: "(min-width: #{$bp-small})"; +$mq-medium: "(min-width: #{$bp-medium})"; +$mq-large: "(min-width: #{$bp-large})"; +$mq-xlarge: "(min-width: #{$bp-xlarge})"; +$mq-xxlarge: "(min-width: #{$bp-xxlarge})"; +$mq-retina: "(-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi)"; + .b { height: calc(89vh / 5 ); } @@ -41,7 +58,7 @@ max-height: 5em; } -@media (min-width: 640px) { + @media #{$mq-tiny} { .banner { width: 89%; margin-left: auto; diff --git a/themes/buha/assets/scss/font.scss b/themes/buha/assets/scss/font.scss index 10bf806..06a1ec7 100644 --- a/themes/buha/assets/scss/font.scss +++ b/themes/buha/assets/scss/font.scss @@ -8,6 +8,7 @@ } // Breakpoints +$bp-tiny: 40em; // 640px $bp-small: 48em; // 768px $bp-medium: 64em; // 1024px $bp-large: 85.375em; // 1366px @@ -15,6 +16,7 @@ $bp-xlarge: 120em; // 1920px $bp-xxlarge: 160em; // 2560px // Media Queries +$mq-tiny: "(min-width: #{$bp-tiny})"; $mq-small: "(min-width: #{$bp-small})"; $mq-medium: "(min-width: #{$bp-medium})"; $mq-large: "(min-width: #{$bp-large})"; diff --git a/themes/buha/assets/scss/gen_list.scss b/themes/buha/assets/scss/gen_list.scss index 952c8a2..c911001 100644 --- a/themes/buha/assets/scss/gen_list.scss +++ b/themes/buha/assets/scss/gen_list.scss @@ -16,13 +16,8 @@ margin-top: 0rem; } .text > img { - width: 64%; - } - .img-only { - height: 40vh; - background-size: 100% auto; - background-position: top; - background-repeat: no-repeat; + width: 60%; + margin-left: 2rem; } .articlemeta { margin-bottom: 1em; @@ -35,18 +30,3 @@ text-align: right; } } - -@media (min-width: 640px) { -} -@media (min-width: 768px) { - -} -@media (min-width: 1024px) { - -} -@media (min-width: 1280px) { - -} -@media (min-width: 1920px) { - -} diff --git a/themes/buha/layouts/_default/baseof.html b/themes/buha/layouts/_default/baseof.html index 40271fe..287e016 100644 --- a/themes/buha/layouts/_default/baseof.html +++ b/themes/buha/layouts/_default/baseof.html @@ -6,25 +6,24 @@
{{ partialCached "snippets/header" . }}
-
-
{{ partial "snippets/banner" . -}}
{{ if not .IsHome}} {{ end }} - {{ block "content" . -}}{{- end }} + {{ block "intro" . -}}{{- end }}
- {{ block "add_content" . -}}{{- end }} + {{ block "content" . -}}{{- end }} {{ block "sidebar" . -}}{{- end }}
- {{ block "pagefooter" . -}}{{- end }} + {{ block "inner_footer" . -}}{{- end }}
+ {{ block "debug" . }}{{ end }} diff --git a/themes/buha/layouts/_default/list.html b/themes/buha/layouts/_default/list.html index 15ec2f0..99f6fcf 100644 --- a/themes/buha/layouts/_default/list.html +++ b/themes/buha/layouts/_default/list.html @@ -1,90 +1,29 @@ -{{ define "title" }} -

{{ if .Title }} - {{ .Title }} - {{ else }} - {{ if i18n .Section }} - {{ i18n .Section }} - {{ else }} - {{ .Section }} - {{ end }} - {{ end }}

-{{ end }} - -{{ define "content" }} +{{ define "intro" }} {{ if ne .Content "" }} {{ partial "snippets/content" (dict "content" .Content) }} {{ end }} {{ end }} -{{ define "add_content" }} +{{ define "content" }} {{- $pages := where .Site.RegularPages "Permalink" "!=" .Permalink -}} {{- $paginator := "" -}} {{- $partial := .Layout -}} + {{ $folder := "layout" }} {{- $paginate := true -}} - {{- if eq .Layout "gen_list" -}} - {{ if eq .Section "events" }} - {{- $pages = where $pages ".Params.when" "ne" nil -}} - {{ else if eq .Type "about" }} - {{- $pages = (where $pages ".Params.about" "=" true) -}} - {{ else if eq .Section "news" }} - {{- $pages = .Data.Pages -}} - {{ else if eq .Section "featured" }} - {{- $pages = where $pages ".Params.featured" "=" true -}} - {{ else if eq .Section "recurrent" }} - {{- $pages = where $pages ".Params.recurrent" "=" true -}} - {{ end }} - {{ else if eq .Layout "links" -}} + {{ if eq .Kind "term" }} {{- $pages = .Data.Pages -}} - {{ else }} - {{ if eq .Kind "term" }} - {{- $pages = .Data.Pages -}} - {{ $partial = "gen_list" }} - {{ else if eq .Kind "taxonomy" }} - {{ $paginate = false }} - {{- $pages = .Data.Terms.ByCount -}} - {{ $partial = "tags_n_categories" }} - {{ end }} + {{ $partial = "gen_list" }} + {{ $folder = "news" }} + {{ else if eq .Kind "taxonomy" }} + {{ $paginate = false }} + {{- $pages = .Data.Terms.ByCount -}} + {{ $partial = "tags_n_categories" }} + {{ end }} + {{ if and $folder $partial }} + {{ $partial = string (printf "%s/%s" $folder $partial) }} + {{ partial $partial (dict "context" . "pages" $pages "content" .Content "type" .Type "paginate" $paginate) }} {{ end }} - - {{ $partial = string (printf "layout/%s" $partial) }} - {{ if eq .Type "about" }}
{{ end }} - {{ partial $partial (dict "context" . "pages" $pages "content" .Content "type" .Type "paginate" $paginate) }} - {{ if eq .Type "about" }}
{{ end }} {{ end }} -{{ define "sidebar" }} - {{ if eq .Section "news" }} - {{ if gt .Site.Taxonomies.categories 0 }} - - {{ end }} - {{ else if or (eq .Section "events") (eq .Section "recurrent") }} - - {{ if gt .Site.Taxonomies.events 0 }} - - {{ end }} - {{ end }} -{{ end }} + diff --git a/themes/buha/layouts/_default/single.html b/themes/buha/layouts/_default/single.html index ecb3665..0bf94c8 100644 --- a/themes/buha/layouts/_default/single.html +++ b/themes/buha/layouts/_default/single.html @@ -1,25 +1,10 @@ -{{ define "title" }} -

{{ if (i18n .Title (dict "Count" 0))}}{{ i18n .Title (dict "Count" 0) }}{{ else }}{{ .Title }}{{ end }}

-{{ end }} - -{{ define "add_content" }} - {{ $partial_before := "" }} - {{ $partial := "layout/article" }} - {{ $pic := "true" }} - {{ if eq .Params.tool "generator" }} - {{ $partial = "layout/generator" }} - {{ else if eq .Params.tool "nottranslated" }} - {{ $partial = "layout/nottranslated" }} - {{ else if eq .Layout "contact_imprint" }} - {{ $partial_before = "snippets/contact" }} - {{ $partial = printf "layout/%s" .Layout }} - {{ else if eq .Layout "archive" }} - {{ $partial = printf "layout/%s" .Layout }} +{{ define "content" }} + {{ if .Layout }} + {{ $partial := printf "layout/%s" .Layout }} +
+ {{ partial $partial (dict "context" . "content" .Content) }} +
{{ end }} -
- - {{ partial $partial (dict "context" . "pic" $pic "content" .Content "partial_before" $partial_before "type" "article") }} -
{{ end }} {{ define "sidebar" }} diff --git a/themes/buha/layouts/about/list.html b/themes/buha/layouts/about/list.html new file mode 100644 index 0000000..2710de0 --- /dev/null +++ b/themes/buha/layouts/about/list.html @@ -0,0 +1,17 @@ +{{ define "intro" }} + {{ if ne .Content "" }} + {{ partial "snippets/content" (dict "content" .Content) }} + {{ end }} +{{ end }} + + +{{ define "content" }} + {{- $pages := where .Site.RegularPages "Permalink" "!=" .Permalink -}} + {{- $paginator := "" -}} + {{- $partial := "gen_list" -}} + {{- $paginate := true -}} + {{- $pages = (where $pages ".Params.about" "=" true) -}} + + {{ $partial = string (printf "news/%s" $partial) }} + {{ partial $partial (dict "context" . "pages" $pages "content" .Content "type" .Type "paginate" $paginate) }} +{{ end }} diff --git a/themes/buha/layouts/archive/list.html b/themes/buha/layouts/archive/list.html new file mode 100644 index 0000000..f1a2406 --- /dev/null +++ b/themes/buha/layouts/archive/list.html @@ -0,0 +1,22 @@ +{{ define "intro" }} + {{ if ne .Content "" }} + {{ partial "snippets/content" (dict "content" .context.Content) }} + {{ end }} +{{ end }} + +{{ define "content" }} +
+
+ {{ $pages := where site.RegularPages "Type" "in" site.Params.searchSections }} + {{ range $pages.GroupByDate "2006" }} +

{{ .Key }}

+ {{ range .Pages.GroupByDate "January" }} +

{{ .Key }}:

+ {{ range .Pages }} +
{{ .Date.Format "02.01.2006" }} {{ .Title }}
+ {{ end }} + {{ end }} + {{ end }} +
+
+{{ end }} diff --git a/themes/buha/layouts/contact/list.html b/themes/buha/layouts/contact/list.html new file mode 100644 index 0000000..f6d8ecc --- /dev/null +++ b/themes/buha/layouts/contact/list.html @@ -0,0 +1,32 @@ +{{ define "content" }} + {{ $text := "solo" }} + {{ $content := .Content }} +
+
+
+
+ {{ partial "snippets/contact" (dict "context" .) }} + {{ $content }} + {{ if .Resources.ByType "image" }} + {{ range .Resources.ByType "image" }} + {{ $picname := . }} + {{ if not (or (in $content $picname.Name ) (hasPrefix $picname.Name "banner") )}} +
+ + {{ . }} + +
+ {{ end }} + {{ end }} + {{ end }} +
+
+
+
+{{ end }} + diff --git a/themes/buha/layouts/events/list.html b/themes/buha/layouts/events/list.html new file mode 100644 index 0000000..1495f1d --- /dev/null +++ b/themes/buha/layouts/events/list.html @@ -0,0 +1,34 @@ +{{ define "intro" }} + {{ if ne .Content "" }} + {{ partial "snippets/content" (dict "content" .Content) }} + {{ end }} +{{ end }} + +{{ define "content" }} + {{- $pages := where .Site.RegularPages "Permalink" "!=" .Permalink -}} + {{- $paginator := "" -}} + {{- $partial := "gen_list" -}} + {{- $paginate := true -}} + {{- $pages = where $pages ".Params.when" "ne" nil -}} + + {{ $partial = string (printf "news/%s" $partial) }} + {{ partial $partial (dict "context" . "pages" $pages "content" .Content "type" .Type "paginate" $paginate) }} +{{ end }} + +{{ define "sidebar" }} + {{ if gt .Site.Taxonomies.events 0 }} + + {{ end }} +{{ end }} diff --git a/themes/buha/layouts/featured/list.html b/themes/buha/layouts/featured/list.html new file mode 100644 index 0000000..f240e9e --- /dev/null +++ b/themes/buha/layouts/featured/list.html @@ -0,0 +1,17 @@ +{{ define "intro" }} + {{ if ne .Content "" }} + {{ partial "snippets/content" (dict "content" .Content) }} + {{ end }} +{{ end }} + +{{ define "content" }} + {{- $pages := where .Site.RegularPages "Permalink" "!=" .Permalink -}} + {{- $paginator := "" -}} + {{- $partial := "gen_list" -}} + {{- $paginate := true -}} + {{- $pages = where $pages ".Params.featured" "=" true -}} + + {{ $partial = string (printf "news/%s" $partial) }} + {{ partial $partial (dict "context" . "pages" $pages "content" .Content "type" .Type "paginate" $paginate) }} +{{ end }} + diff --git a/themes/buha/layouts/files/list.html b/themes/buha/layouts/files/list.html new file mode 100644 index 0000000..f0d5148 --- /dev/null +++ b/themes/buha/layouts/files/list.html @@ -0,0 +1,16 @@ +{{ define "intro" }} + {{ if ne .Content "" }} + {{ partial "snippets/content" (dict "content" .Content) }} + {{ end }} +{{ end }} + +{{ define "content" }} +
+ {{ range .Pages }} +
🗀 {{ .Title }}
+ {{ end }} + {{ range .Resources }} +
🗀 {{ . }}
+ {{ end }} +
+{{ end }} diff --git a/themes/buha/layouts/imprint/list.html b/themes/buha/layouts/imprint/list.html new file mode 100644 index 0000000..5ab4fe2 --- /dev/null +++ b/themes/buha/layouts/imprint/list.html @@ -0,0 +1,33 @@ +{{ define "content" }} + {{ $text := "solo" }} + {{ $content := .Content }} +
+
+
+
+ {{ partial "snippets/contact" (dict "context" .) }} + {{ if i18n "executive" }}{{ i18n "executive" }}{{ else }}{{ "Executive" }}{{ end }}: {{ .Site.Params.imprintdata.executive }} + {{ $content }} + {{ if .Resources.ByType "image" }} + {{ range .Resources.ByType "image" }} + {{ $picname := . }} + {{ if not (or (in $content $picname.Name ) (hasPrefix $picname.Name "banner") )}} +
+ + {{ . }} + +
+ {{ end }} + {{ end }} + {{ end }} +
+
+
+
+{{ end }} + diff --git a/themes/buha/layouts/index.html b/themes/buha/layouts/index.html index 029bee4..c35fa5c 100644 --- a/themes/buha/layouts/index.html +++ b/themes/buha/layouts/index.html @@ -1,4 +1,4 @@ -{{ define "content" }} +{{ define "intro" }} {{ if ne .Content "" }} {{ partial "snippets/content" (dict "content" .Content) }} @@ -6,7 +6,7 @@ {{ end }} -{{ define "add_content" }} +{{ define "content" }} {{- $all := where (where .Site.RegularPages "Permalink" "!=" .Permalink) "Type" "in" .Site.Params.searchSections }} {{ $days := int (mul (mul (int .Site.Params.featured_expire) 7) -1) }} @@ -27,8 +27,8 @@ {{ $feat = i18n $feat }} {{ end }}
- {{ partial "layout/gen_list" (dict "context" . "pages" $featured "title" $feat "limit" "5" )}} - {{ partial "layout/gen_list" (dict "context" . "pages" $posts "title" $news "link" "news" "limit" "5" )}} + {{ partial "news/gen_list" (dict "context" . "pages" $featured "title" $feat "limit" "5" )}} + {{ partial "news/gen_list" (dict "context" . "pages" $posts "title" $news "link" "news" "limit" "5" )}}
{{ end }} diff --git a/themes/buha/layouts/index.html.old b/themes/buha/layouts/index.html.old index e848f4c..82bacf1 100644 --- a/themes/buha/layouts/index.html.old +++ b/themes/buha/layouts/index.html.old @@ -1,9 +1,3 @@ -{{ define "title" }} -{{ if .Content }} -

{{ .Title }}

-{{ end }} -{{ end }} - {{ define "main" }} {{- $all := where (where .Site.RegularPages "Permalink" "!=" .Permalink) "Type" "in" .Site.Params.searchSections }} {{ $days := int (mul (mul (int .Site.Params.featured_expire) 7) -1) }} diff --git a/themes/buha/layouts/links/list.html b/themes/buha/layouts/links/list.html new file mode 100644 index 0000000..dfb1a8e --- /dev/null +++ b/themes/buha/layouts/links/list.html @@ -0,0 +1,31 @@ +{{ define "intro" }} + {{ if ne .Content "" }} + {{ partial "snippets/content" (dict "content" .Content) }} + {{ end }} +{{ end }} + +{{ define "content" }} + {{ $title := .Title }} + + {{ $p := .Pages }} + + {{ $paginator := $p }} + + {{ if $p }} + + {{ end }} +{{ end }} diff --git a/themes/buha/layouts/news/list.html b/themes/buha/layouts/news/list.html new file mode 100644 index 0000000..e71954a --- /dev/null +++ b/themes/buha/layouts/news/list.html @@ -0,0 +1,33 @@ +{{ define "intro" }} + {{ if ne .Content "" }} + {{ partial "snippets/content" (dict "content" .Content) }} + {{ end }} +{{ end }} + + +{{ define "content" }} + {{- $paginator := "" -}} + {{- $partial := "gen_list" -}} + {{- $paginate := true -}} + {{- $pages := .Data.Pages -}} + + {{ $partial = string (printf "news/%s" $partial) }} + {{ partial $partial (dict "context" . "pages" $pages "content" .Content "type" .Type "paginate" $paginate) }} +{{ end }} + +{{ define "sidebar" }} + {{ if gt .Site.Taxonomies.categories 0 }} + + {{ end }} +{{ end }} diff --git a/themes/buha/layouts/news/single.html b/themes/buha/layouts/news/single.html new file mode 100644 index 0000000..57b389e --- /dev/null +++ b/themes/buha/layouts/news/single.html @@ -0,0 +1,147 @@ +{{ define "content" }} +
+ {{ $metas := dict "when" .Params.when "price" .Params.price "contact_mail" .Params.contact_mail "covid" .Params.covid "insta" .Params.insta }} + {{ $banner := slice }} + {{ $image := slice }} + {{ $thumb := "" }} + {{ if .Resources.GetMatch "banner*" }} + {{ $banner = slice (.Resources.GetMatch "banner*") }} + {{ end }} + {{ if .Resources.ByType "image" }} + {{ $image = .Resources.ByType "image" }} + {{ end }} + {{ $image = (index (complement $banner $image) 0) }} + {{ if $banner }} + {{ $image = (index $banner 0) }} + {{ end }} + {{ $image = .Resources.GetMatch (string $image) }} + {{ if ne $image nil }} + {{ $thumb1 := $image.Fill "1280x480 smart"}} + {{ $thumb = $image}} + {{ end }} + + + {{ partial "snippets/article_metadata" $metas }} + + {{- if .Description -}} +

{{ .Description }}

+ {{ end }} + + {{ $count_href := .TableOfContents | strings.Count "href" }} + {{ if ge $count_href 4 }} +
+ Inhaltsverzeichnis +
+ {{ .TableOfContents }} +
+
+ {{ end }} + + {{ $content := .Content }} + + {{ if or .Content (.Resources.ByType "image")}} +
+ {{- if .Content -}} + {{- $content -}} + {{ end }} + {{ if .Resources.ByType "image" }} + {{ range .Resources.ByType "image" }} + {{ $picname := . }} + {{ if not (or (in $content $picname ) (hasPrefix $picname "banner") )}} + + {{ . }}
+
+ {{ end }} + {{ end }} + {{ end }} +
+ {{ end }} +
+{{ end }} + +{{ define "sidebar" }} + {{ if ne .Type "tools" }} + + {{ end }} +{{ end }} + +{{ define "inner_footer" }} + {{ if and (eq .Kind "page") (or (eq .Section "news") (eq .Section "events") (eq .Section "about")) }} +
+ {{ with .Params.foundations }} +
Träger der Veranstaltung:
+
+ {{ range . }} + {{ $l := . }} + {{ $url := "" }} + {{ if isset site.Params.foundations $l }} + {{ $url = index site.Params.foundations $l }} + {{ end }} + + + {{- $res_im := resources.GetMatch (printf "/images/foundations/%s*" $l ) -}} + {{ if $res_im }} +
+ {{ if $url }}{{ end }} {{ if $url }}{{ end }} +
+ {{ else }} + {{ if eq hugo.Environment "development" }} +
+ assets/images/foundations/{{- $l -}} .* missing +
+ {{ else }} + picture missing. + {{ end }} + {{ end }} + {{ end }} +
+ {{ end }} +
+
+
{{ if i18n "created" }}{{ i18n "created" }}{{ else }}{{ "Created" }}{{ end }}:
+
{{ .Date | time.Format ":date_full" }}
+
+ {{ if ne .Date .Lastmod }} +
+
{{ if i18n "lastmod" }}{{ i18n "lastmod" }}{{ else }}{{ "Last modification" }}{{ end }}:
+
{{ .Lastmod | time.Format ":date_full" }}
+
+ {{ end }} +
+
+ {{ end }} +{{ end }} diff --git a/themes/buha/layouts/newsletter/list.html b/themes/buha/layouts/newsletter/list.html new file mode 100644 index 0000000..9f6afc2 --- /dev/null +++ b/themes/buha/layouts/newsletter/list.html @@ -0,0 +1,32 @@ +{{ define "content" }} +
+ {{- if .Description -}} +

{{ .Description }}

+ {{ end }} + + {{ $content := .Content }} + + {{ if or .Content (.Resources.ByType "image")}} +
+ {{- if .Content -}} + {{- $content -}} + {{ end }} + {{ if .Resources.ByType "image" }} + {{ range .Resources.ByType "image" }} + {{ $picname := . }} + {{ if not (or (in $content $picname ) (hasPrefix $picname "banner") )}} + + {{ . }}
+
+ {{ end }} + {{ end }} + {{ end }} +
+ {{ end }} +
+{{ end }} diff --git a/themes/buha/layouts/partials/layout/archive.html b/themes/buha/layouts/partials/layout/archive.html deleted file mode 100644 index 4d151e1..0000000 --- a/themes/buha/layouts/partials/layout/archive.html +++ /dev/null @@ -1,15 +0,0 @@ -{{ if ne .context.Content "" }} - {{ partial "snippets/content" (dict "content" .context.Content) }} -{{ end }} -
-{{ $pages := where site.RegularPages "Type" "in" site.Params.searchSections }} -{{ range $pages.GroupByDate "2006" }} -

{{ .Key }}

- {{ range .Pages.GroupByDate "January" }} -

{{ .Key }}:

- {{ range .Pages }} -
{{ .Date.Format "02.01.2006" }} {{ .Title }}
- {{ end }} - {{ end }} -{{ end }} -
diff --git a/themes/buha/layouts/partials/layout/article.html b/themes/buha/layouts/partials/layout/article.html deleted file mode 100644 index 0c9a310..0000000 --- a/themes/buha/layouts/partials/layout/article.html +++ /dev/null @@ -1,68 +0,0 @@ -{{ $metas := dict "when" .context.Params.when "price" .context.Params.price "contact_mail" .context.Params.contact_mail "covid" .context.Params.covid "insta" .context.Params.insta }} -{{ $banner := slice }} -{{ $image := slice }} -{{ $thumb := "" }} -{{ if .context.Resources.GetMatch "banner*" }} - {{ $banner = slice (.context.Resources.GetMatch "banner*") }} -{{ end }} -{{ if .context.Resources.ByType "image" }} - {{ $image = .context.Resources.ByType "image" }} -{{ end }} -{{ $image = (index (complement $banner $image) 0) }} -{{ if $banner }} - {{ $image = (index $banner 0) }} -{{ end }} -{{ $image = .context.Resources.GetMatch (string $image) }} -{{ if ne $image nil }} - {{ $thumb1 := $image.Fill "1280x480 smart"}} - {{ $thumb = $image}} -{{ end }} - - -{{ partial "snippets/article_metadata" $metas }} - -{{- if .context.Description -}} -

{{ .context.Description }}

-{{ end }} - -{{ $count_href := .context.TableOfContents | strings.Count "href" }} -{{ if ge $count_href 4 }} -
- Inhaltsverzeichnis -
- {{ .context.TableOfContents }} -
-
-{{ end }} - -{{ $content := .context.Content }} - -{{ if or .context.Content (.context.Resources.ByType "image")}} -
- {{- if .context.Content -}} - {{- $content -}} - {{ end }} - {{ if .context.Resources.ByType "image" }} - {{ range .context.Resources.ByType "image" }} - {{ $picname := . }} - {{ if not (or (in $content $picname ) (hasPrefix $picname "banner") )}} - - {{ . }}
-
- {{ end }} - {{ end }} - {{ end }} -
-{{ end }} - - -{{ if and (.comtext.Resources.GetMatch $banner) (ne .context.Params.banner false) }} -{{ else if and (.context.Resources.Match "banner*") (ne .context.Params.banner false) }} -{{ else if and (.context.Resources.ByType "image") (ne .context.Params.banner false) }} -{{ else }} -{{ end }} diff --git a/themes/buha/layouts/partials/layout/contact_imprint.html b/themes/buha/layouts/partials/layout/contact_imprint.html deleted file mode 100644 index 205d235..0000000 --- a/themes/buha/layouts/partials/layout/contact_imprint.html +++ /dev/null @@ -1,32 +0,0 @@ -{{ $text := "solo" }} -{{ $content := .context.Content }} -
-
-
- {{ if .partial_before }} - {{ partial .partial_before (dict "context" .context "pic" .pic) }} - {{ end }} - {{ if in .context.File "imprint" }} - {{ if i18n "executive" }}{{ i18n "executive" }}{{ else }}{{ "Executive" }}{{ end }}: {{ .context.Site.Params.imprintdata.executive }} - {{ end }} - {{ .content }} - {{ if .context.Resources.ByType "image" }} - {{ range .context.Resources.ByType "image" }} - {{ $picname := . }} - {{ if not (or (in $content $picname.Name ) (hasPrefix $picname.Name "banner") )}} -
- - {{ . }} - -
- {{ end }} - {{ end }} - {{ end }} -
-
-
diff --git a/themes/buha/layouts/partials/layout/gen_list.html b/themes/buha/layouts/partials/layout/gen_list.html deleted file mode 100644 index 2984f2a..0000000 --- a/themes/buha/layouts/partials/layout/gen_list.html +++ /dev/null @@ -1,164 +0,0 @@ -{{ $title := .title }} -{{ $link := .link }} -{{ $p := .pages }} -{{ if and (.limit) (not .paginate) }} - {{ $p = first .limit .pages }} -{{ end }} -{{ $act_section := .context.Section }} -{{ $paginator := .pages }} -{{ if .paginate }} - {{ $paginator = .context.Paginate $p }} - {{ $p = $paginator.Pages }} -{{ end }} - - -{{ if $p }} -
- {{ if $title }} -

- {{ if $link }} - - {{ end }} - {{ $title }} - {{ if $link }} - - ({{ if i18n "all" }}{{ i18n "all"}}{{ else }}{{ "all" }}{{ end }}) - {{ end }} -

- {{ end }} - {{ range $p }} - {{ $slug := "" }} - {{ with .File }} - {{ $slug = anchorize .ContentBaseName }} - {{ end }} -
- {{ $metas := dict "when" .Params.when "price" .Params.price }} - {{ $banner := slice }} - {{ $image := slice }} - {{ $images := slice }} - {{ $dir := ""}} - {{ with .File }} - {{ $dir = .Dir }} - {{ end }} - {{ if .Resources.GetMatch "banner*" }} - {{ $banner = slice (.Resources.GetMatch "banner*") }} - {{ end }} - {{ if .Resources.ByType "image" }} - {{ $image = .Resources.ByType "image" }} - {{ end }} - {{ $images = complement $banner $image }} - {{ $image = (index (complement $banner $image) 0) }} - {{ $banner = (index $banner 0) }} -
- - {{ if $title }}

{{ else }}

{{ end }} - {{ if ne $act_section "about" }} - {{ if .Params.events }} - {{ index .Params.events 0 }}: - {{ else if .Params.recurrent }} - {{ if i18n "recurrent"}} - {{ i18n "recurrent"}}: - {{ else }} - {{ "Recurrent"}}: - {{ end }} - {{ else if .Params.categories }} - {{ if in .Params.categories "Buha" }} - In eigener Sache: - {{ end }} - {{ end }} - {{ end }} - {{ .Title }} - {{ if $title }}

{{ else }}{{ end }} - {{ with .Resources.GetMatch $banner }} - {{ $img := . }} - {{ $good_w := "1920"}} - {{ $good_h := "550"}} - {{ $b := true }} - {{ if or (lt (int .Width) $good_w) (gt (int .Width) $good_w) (lt (int .Height) $good_h) (gt (int .Height) $good_h) }} -
- {{ if lt (int .Width) $good_w }} - {{ $b = false }} - {{ if eq hugo.Environment "development" }} - Width: {{ .Width }}px: too small, must be {{ $good_w -}}px in width
- {{ end }} - {{ else if gt (int .Width) $good_w }} - {{ $b = false }} - {{ if eq hugo.Environment "development" }} - Width: {{ .Width }}px: too big, must be {{ $good_w -}}px in width
- {{ end }} - {{ end }} - {{ if lt (int .Height) $good_h }} - {{ $b = false }} - {{ if eq hugo.Environment "development" }} - Height: {{ .Height }}px: too small, must be {{ $good_h -}}px in height
- {{ end }} - {{ else if gt (int .Height) $good_h }} - {{ $b = false }} - {{ if eq hugo.Environment "development" }} - Height: {{ .Height }}px: too big, must be {{ $good_h -}}px in height
- {{ end }} - {{ end }} - {{ if eq hugo.Environment "development" }} - {{ if eq $b false }} - {{ printf "Please correct content/news/%s/%s" $slug .Name }} - {{ end }} - {{ end }} -
- - {{ end }} - - {{ if eq $b true }} - {{ $tiny := ($banner.Fill "768x280 q90") }} - {{ $small := ($banner.Fill "1024x280 q90") }} - {{ $medium := ($banner.Fill "1280x280 q90") }} - {{ $large := ($banner.Fill "1366x280 q90") }} - Banner Image. - {{ end }} - {{ else }} - {{ if eq hugo.Environment "development" }} -
- {{ printf "content/%sbanner* missing.." $dir }} -
- {{ end }} - {{ end }} - {{ partial "snippets/article_metadata" $metas }} -
- {{ if .Description }} -

{{ .Description }}

- {{ else if .Content }} - {{ $summary := "" }} - {{ if in .RawContent "" }} - {{ $tmp := split .RawContent "" }} - {{ index $tmp 0 | markdownify }} - {{ else }} - {{ if hasPrefix .Summary "

" }} - {{ .Summary }} - {{ else }} -

{{ .Summary }}

- {{ end }} - {{ end }} - {{ else if $image }} - {{ $i := (.Resources.GetMatch $image).Permalink }} - - {{ end }} -
- {{ if .Truncated }} -
- {{ if i18n "readmore" }}{{ i18n "readmore" }}{{ else }}{{ "read more" }}{{ end }}.. -
- {{ end }} -
-
-
- {{ end }} - - {{ if .paginate }} - {{ partial "snippets/paginator" (dict "paginator" $paginator) }} - {{ end }} -
-{{ end }} diff --git a/themes/buha/layouts/partials/layout/links.html b/themes/buha/layouts/partials/layout/links.html deleted file mode 100644 index a9a2a03..0000000 --- a/themes/buha/layouts/partials/layout/links.html +++ /dev/null @@ -1,32 +0,0 @@ -{{ $title := .title }} - -{{ $p := .pages }} -{{ if and (.limit) (not .paginate) }} - {{ $p = first .limit .pages }} -{{ end }} - -{{ $paginator := .pages }} -{{ if .paginate }} - {{ $paginator = .context.Paginate $p }} - {{ $p = $paginator.Pages }} -{{ end }} - - - -{{ if $p }} - -{{ end }} diff --git a/themes/buha/layouts/partials/layout/media.html b/themes/buha/layouts/partials/layout/media.html deleted file mode 100644 index 6f036e0..0000000 --- a/themes/buha/layouts/partials/layout/media.html +++ /dev/null @@ -1,10 +0,0 @@ -{{ if ne .context.Content "" }} -
- {{ partial "snippets/content" (dict "content" .context.Content) }} -
-{{ end }} -
-{{ range .context.Resources }} -
🗀 {{ . }}
-{{ end }} -
diff --git a/themes/buha/layouts/partials/layout/newsletter.html b/themes/buha/layouts/partials/layout/newsletter.html deleted file mode 100644 index bec81d2..0000000 --- a/themes/buha/layouts/partials/layout/newsletter.html +++ /dev/null @@ -1 +0,0 @@ -nl diff --git a/themes/buha/layouts/partials/layout/search.html b/themes/buha/layouts/partials/layout/search.html deleted file mode 100644 index e69de29..0000000 diff --git a/themes/buha/layouts/partials/layout/section_list.html b/themes/buha/layouts/partials/layout/section_list.html deleted file mode 100644 index f0c14c4..0000000 --- a/themes/buha/layouts/partials/layout/section_list.html +++ /dev/null @@ -1,11 +0,0 @@ -{{ if ne .context.Content "" }} -
- {{ partial "snippets/content" (dict "content" .context.Content) }} -
-{{ end }} - -
-{{ range .context.Pages }} -
🗀 {{ .Title }}
-{{ end }} -
diff --git a/themes/buha/layouts/partials/news/gen_list.html b/themes/buha/layouts/partials/news/gen_list.html new file mode 100644 index 0000000..243fd85 --- /dev/null +++ b/themes/buha/layouts/partials/news/gen_list.html @@ -0,0 +1,175 @@ +{{ $title := .title }} +{{ $link := .link }} +{{ $pages := .pages }} +{{ if and (.limit) (not .paginate) }} + {{ $pages = first .limit .pages }} +{{ end }} +{{ $act_section := .context.Section }} +{{ $paginator := .pages }} +{{ if .paginate }} + {{ $paginator = .context.Paginate $pages }} + {{ $pages = $paginator.Pages }} +{{ end }} + +{{ $bptiny := "40em" }} +{{ $bpsmall := "48em" }} +{{ $bpmedium := "64em" }} +{{ $bplarge := "85.375em" }} +{{ $bpxlarge := "120em" }} +{{ $bpxxlarge := "160em" }} + +{{ if $pages }} +
+ {{ if $title }} +

+ {{ if $link }} + + {{ end }} + {{ $title }} + {{ if $link }} + + ({{ if i18n "all" }}{{ i18n "all"}}{{ else }}{{ "all" }}{{ end }}) + {{ end }} +

+ {{ end }} + + {{ range $pages }} + {{ $slug := "" }} + {{ with .File }} + {{ $slug = anchorize .ContentBaseName }} + {{ end }} +
+ {{ $metas := dict "when" .Params.when "price" .Params.price }} + {{ $banner := slice }} + {{ $image := slice }} + {{ $images := slice }} + {{ $dir := ""}} + {{ with .File }} + {{ $dir = .Dir }} + {{ end }} + {{ if .Resources.GetMatch "banner*" }} + {{ $banner = slice (.Resources.GetMatch "banner*") }} + {{ end }} + {{ if .Resources.ByType "image" }} + {{ $image = .Resources.ByType "image" }} + {{ end }} + {{ $images = complement $banner $image }} + {{ $image = (index (complement $banner $image) 0) }} + {{ $banner = (index $banner 0) }} + + {{ if $title }}

{{ else }}

{{ end }} + {{ if ne $act_section "about" }} + {{ if .Params.events }} + {{ index .Params.events 0 }}: + {{ else if .Params.recurrent }} + {{ if i18n "recurrent"}} + {{ i18n "recurrent"}}: + {{ else }} + {{ "Recurrent"}}: + {{ end }} + {{ else if .Params.categories }} + {{ if in .Params.categories "Buha" }} + In eigener Sache: + {{ end }} + {{ end }} + {{ end }} + {{ .Title }} + {{ if $title }}

{{ else }}{{ end }} + {{ with .Resources.GetMatch $banner }} + {{ $img := . }} + {{ $good_w := "1920"}} + {{ $good_h := "550"}} + {{ $b := true }} + {{ if or (lt (int .Width) $good_w) (gt (int .Width) $good_w) (lt (int .Height) $good_h) (gt (int .Height) $good_h) }} +
+ {{ if lt (int .Width) $good_w }} + {{ $b = false }} + {{ if eq hugo.Environment "development" }} + Width: {{ .Width }}px: too small, must be {{ $good_w -}}px in width
+ {{ end }} + {{ else if gt (int .Width) $good_w }} + {{ $b = false }} + {{ if eq hugo.Environment "development" }} + Width: {{ .Width }}px: too big, must be {{ $good_w -}}px in width
+ {{ end }} + {{ end }} + {{ if lt (int .Height) $good_h }} + {{ $b = false }} + {{ if eq hugo.Environment "development" }} + Height: {{ .Height }}px: too small, must be {{ $good_h -}}px in height
+ {{ end }} + {{ else if gt (int .Height) $good_h }} + {{ $b = false }} + {{ if eq hugo.Environment "development" }} + Height: {{ .Height }}px: too big, must be {{ $good_h -}}px in height
+ {{ end }} + {{ end }} + {{ if eq hugo.Environment "development" }} + {{ if eq $b false }} + {{ printf "Please correct content/news/%s/%s" $slug .Name }} + {{ end }} + {{ end }} +
+ + {{ end }} + {{ if eq $b true }} + {{ $tiny := ($banner.Resize "640x q90") }} + {{ $small := ($banner.Resize "768x q90") }} + {{ $medium := ($banner.Resize "1024x q90") }} + {{ $large := ($banner.Resize "1366x q90") }} + Banner Image. + {{ end }} + {{ else }} + {{ if eq hugo.Environment "development" }} +
+ {{ printf "content/%sbanner* missing.." $dir }} +
+ {{ end }} + {{ end }} + {{ partial "snippets/article_metadata" $metas }} +
+ {{ if .Description }} +

{{ .Description }}

+ {{ else if .Content }} + {{ $summary := "" }} + {{ if in .RawContent "" }} + {{ $tmp := split .RawContent "" }} + {{ index $tmp 0 | markdownify }} + {{ else }} + {{ if hasPrefix .Summary "

" }} + {{ .Summary }} + {{ else }} +

{{ .Summary }}

+ {{ end }} + {{ end }} + {{ else if $image }} + {{ $i := (.Resources.GetMatch $image) }} + {{ $tiny := ($i.Resize "640x q90") }} + {{ $small := ($i.Resize "768x q90") }} + {{ $medium := ($i.Resize "10240x q90") }} + {{ $large := ($i.Resize "1366x q90") }} + Banner Image. + {{ end }} +
+ {{ if .Truncated }} +
+ {{ if i18n "readmore" }}{{ i18n "readmore" }}{{ else }}{{ "read more" }}{{ end }}.. +
+ {{ end }} +
+
+ {{ end }} + + {{ if .paginate }} + {{ partial "snippets/paginator" (dict "paginator" $paginator) }} + {{ end }} +
+{{ end }} diff --git a/themes/buha/layouts/partials/snippets/banner.html b/themes/buha/layouts/partials/snippets/banner.html index 4040511..c073a49 100644 --- a/themes/buha/layouts/partials/snippets/banner.html +++ b/themes/buha/layouts/partials/snippets/banner.html @@ -1,3 +1,6 @@ +{{ define "debug" }} + {{ .Section }}
+{{ end }} {{ $title := .Title }} {{ $title = singularize $title }} {{ $title = i18n $title }} @@ -38,7 +41,7 @@ {{ with .File }} {{ $slug = anchorize .ContentBaseName }} {{ end }} -{{ if or (and $img (ne .Params.banner false)) (.Resources.ByType "image") }} +{{ if and $img (ne .Params.banner false) }} {{ if .Resources.Match "banner*" }} {{ $img = .Resources.GetMatch "banner*" }} {{ end }} @@ -46,7 +49,40 @@ {{ $img = index (.Resources.ByType "image") 0 }} {{ end }} {{ if $img }} -