diff --git a/content/.directory b/content/.directory new file mode 100644 index 00000000..de72d105 --- /dev/null +++ b/content/.directory @@ -0,0 +1,7 @@ +[Dolphin] +HeaderColumnWidths=733,143,94,163 +PreviewsShown=false +Timestamp=2022,6,22,17,45,55.016 +Version=4 +ViewMode=1 +VisibleRoles=Details_text,Details_size,Details_modificationtime,Details_type,Details_permissions,CustomizedDetails diff --git a/assets/images/banner/about.webp b/content/about/banner.webp similarity index 100% rename from assets/images/banner/about.webp rename to content/about/banner.webp diff --git a/assets/images/banner/archive.webp b/content/archive/banner.webp similarity index 100% rename from assets/images/banner/archive.webp rename to content/archive/banner.webp diff --git a/assets/images/banner/home.webp b/content/banner.webp similarity index 100% rename from assets/images/banner/home.webp rename to content/banner.webp diff --git a/assets/images/banner/events.webp b/content/events/banner.webp similarity index 100% rename from assets/images/banner/events.webp rename to content/events/banner.webp diff --git a/assets/images/banner/news.webp b/content/news/banner.webp similarity index 100% rename from assets/images/banner/news.webp rename to content/news/banner.webp diff --git a/assets/images/banner/newsletter.webp b/content/newsletter/banner.webp similarity index 100% rename from assets/images/banner/newsletter.webp rename to content/newsletter/banner.webp diff --git a/content/search/_index.de.md b/content/search/_index.de.md index 1c5eff48..c789401f 100644 --- a/content/search/_index.de.md +++ b/content/search/_index.de.md @@ -1,5 +1,6 @@ --- title: "Volltextsuche" summary: "Seite nach Stichworten durchsuchen" +banner: false --- {{< search >}} diff --git a/themes/buha/layouts/_default/baseof.html b/themes/buha/layouts/_default/baseof.html index 287e0161..1fff8fec 100644 --- a/themes/buha/layouts/_default/baseof.html +++ b/themes/buha/layouts/_default/baseof.html @@ -7,7 +7,7 @@ {{ partialCached "snippets/header" . }}
- {{ partial "snippets/banner" . -}} + {{ block "banner" . -}} {{ partial "snippets/banner" . -}}{{- end }}
{{ if not .IsHome}} diff --git a/themes/buha/layouts/_default/taxonomy.html b/themes/buha/layouts/_default/taxonomy.html index 72b10c42..59e86262 100644 --- a/themes/buha/layouts/_default/taxonomy.html +++ b/themes/buha/layouts/_default/taxonomy.html @@ -1,3 +1,11 @@ +{{ define "banner" }} + {{ $image := "" }} + {{ if .Resources.GetMatch "banner*" }} + {{ $image = .Resources.GetMatch "banner*" }} + {{ end }} + {{ partial "snippets/banner_new" (dict "context" . "image" $image "title" .Title "section" .Section) }} +{{ end }} + {{ define "content" }} {{ if eq .Kind "taxonomy" }}
diff --git a/themes/buha/layouts/_default/term.html b/themes/buha/layouts/_default/term.html new file mode 100644 index 00000000..59e86262 --- /dev/null +++ b/themes/buha/layouts/_default/term.html @@ -0,0 +1,20 @@ +{{ define "banner" }} + {{ $image := "" }} + {{ if .Resources.GetMatch "banner*" }} + {{ $image = .Resources.GetMatch "banner*" }} + {{ end }} + {{ partial "snippets/banner_new" (dict "context" . "image" $image "title" .Title "section" .Section) }} +{{ end }} + +{{ define "content" }} + {{ if eq .Kind "taxonomy" }} +
+ {{ range .Pages }} + {{ .Page.Title }} + {{ end }} +
+ {{ else }} + {{- $pages := .Data.Pages -}} + {{ partial "snippets/gen_list" (dict "context" . "pages" $pages "content" .Content "type" .Type "paginate" true) }} + {{ end }} +{{ end }} diff --git a/themes/buha/layouts/about/list.html b/themes/buha/layouts/about/list.html index 43e3a3c7..927054c1 100644 --- a/themes/buha/layouts/about/list.html +++ b/themes/buha/layouts/about/list.html @@ -1,3 +1,11 @@ +{{ define "banner" }} + {{ $image := "" }} + {{ if .Resources.GetMatch "banner*" }} + {{ $image = .Resources.GetMatch "banner*" }} + {{ end }} + {{ partial "snippets/banner_new" (dict "context" . "image" $image "title" .Title "section" .Section) }} +{{ end }} + {{ define "intro" }} {{ if ne .Content "" }} {{ partial "snippets/content" (dict "content" .Content) }} diff --git a/themes/buha/layouts/archive/list.html b/themes/buha/layouts/archive/list.html index f1a24065..33e34421 100644 --- a/themes/buha/layouts/archive/list.html +++ b/themes/buha/layouts/archive/list.html @@ -1,3 +1,11 @@ +{{ define "banner" }} + {{ $image := "" }} + {{ if .Resources.GetMatch "banner*" }} + {{ $image = .Resources.GetMatch "banner*" }} + {{ end }} + {{ partial "snippets/banner_new" (dict "context" . "image" $image "title" .Title "section" .Section) }} +{{ end }} + {{ define "intro" }} {{ if ne .Content "" }} {{ partial "snippets/content" (dict "content" .context.Content) }} diff --git a/themes/buha/layouts/contact/list.html b/themes/buha/layouts/contact/list.html index f6d8ecc8..13cee9e2 100644 --- a/themes/buha/layouts/contact/list.html +++ b/themes/buha/layouts/contact/list.html @@ -1,3 +1,11 @@ +{{ define "banner" }} + {{ $image := "" }} + {{ if .Resources.GetMatch "banner*" }} + {{ $image = .Resources.GetMatch "banner*" }} + {{ end }} + {{ partial "snippets/banner_new" (dict "context" . "image" $image "title" .Title "section" .Section) }} +{{ end }} + {{ define "content" }} {{ $text := "solo" }} {{ $content := .Content }} diff --git a/themes/buha/layouts/events/list.html b/themes/buha/layouts/events/list.html index 7b7c3411..63baf4af 100644 --- a/themes/buha/layouts/events/list.html +++ b/themes/buha/layouts/events/list.html @@ -1,3 +1,11 @@ +{{ define "banner" }} + {{ $image := "" }} + {{ if .Resources.GetMatch "banner*" }} + {{ $image = .Resources.GetMatch "banner*" }} + {{ end }} + {{ partial "snippets/banner_new" (dict "context" . "image" $image "title" .Title "section" .Section) }} +{{ end }} + {{ define "intro" }} {{ if ne .Content "" }} {{ partial "snippets/content" (dict "content" .Content) }} @@ -6,7 +14,11 @@ {{ define "content" }} {{- $pages := where .Site.RegularPages "Section" "in" .Site.Params.searchSections -}} - {{- $pages = where $pages ".Params.when" "ne" nil -}} + {{ if eq .Kind "taxonomy" }} + {{- $pages = where $pages ".Params.when" "ne" nil -}} + {{ else if eq .Kind "term" }} + {{- $pages = .Data.Pages -}} + {{ end }} {{ partial "snippets/gen_list" (dict "context" . "pages" $pages "content" .Content "type" .Type "paginate" true) }} {{ end }} diff --git a/themes/buha/layouts/featured/list.html b/themes/buha/layouts/featured/list.html index 2d5d8241..a820993d 100644 --- a/themes/buha/layouts/featured/list.html +++ b/themes/buha/layouts/featured/list.html @@ -1,3 +1,11 @@ +{{ define "banner" }} + {{ $image := "" }} + {{ if .Resources.GetMatch "banner*" }} + {{ $image = .Resources.GetMatch "banner*" }} + {{ end }} + {{ partial "snippets/banner_new" (dict "context" . "image" $image "title" .Title "section" .Section) }} +{{ end }} + {{ define "intro" }} {{ if ne .Content "" }} {{ partial "snippets/content" (dict "content" .Content) }} diff --git a/themes/buha/layouts/files/list.html b/themes/buha/layouts/files/list.html index f0d51486..4a6ab768 100644 --- a/themes/buha/layouts/files/list.html +++ b/themes/buha/layouts/files/list.html @@ -1,3 +1,11 @@ +{{ define "banner" }} + {{ $image := "" }} + {{ if .Resources.GetMatch "banner*" }} + {{ $image = .Resources.GetMatch "banner*" }} + {{ end }} + {{ partial "snippets/banner_new" (dict "context" . "image" $image "title" .Title "section" .Section) }} +{{ end }} + {{ define "intro" }} {{ if ne .Content "" }} {{ partial "snippets/content" (dict "content" .Content) }} diff --git a/themes/buha/layouts/imprint/list.html b/themes/buha/layouts/imprint/list.html index 5ab4fe27..4b12dec3 100644 --- a/themes/buha/layouts/imprint/list.html +++ b/themes/buha/layouts/imprint/list.html @@ -1,3 +1,11 @@ +{{ define "banner" }} + {{ $image := "" }} + {{ if .Resources.GetMatch "banner*" }} + {{ $image = .Resources.GetMatch "banner*" }} + {{ end }} + {{ partial "snippets/banner_new" (dict "context" . "image" $image "title" .Title "section" .Section) }} +{{ end }} + {{ define "content" }} {{ $text := "solo" }} {{ $content := .Content }} diff --git a/themes/buha/layouts/index.html b/themes/buha/layouts/index.html index 4d290310..55fc4082 100644 --- a/themes/buha/layouts/index.html +++ b/themes/buha/layouts/index.html @@ -1,3 +1,11 @@ +{{ define "banner" }} + {{ $image := "" }} + {{ if .Resources.GetMatch "banner*" }} + {{ $image = .Resources.GetMatch "banner*" }} + {{ end }} + {{ partial "snippets/banner_new" (dict "context" . "image" $image "title" .Title "section" .Section) }} +{{ end }} + {{ define "intro" }} {{ if ne .Content "" }} diff --git a/themes/buha/layouts/links/list.html b/themes/buha/layouts/links/list.html index dfb1a8ed..1b85e69e 100644 --- a/themes/buha/layouts/links/list.html +++ b/themes/buha/layouts/links/list.html @@ -1,3 +1,11 @@ +{{ define "banner" }} + {{ $image := "" }} + {{ if .Resources.GetMatch "banner*" }} + {{ $image = .Resources.GetMatch "banner*" }} + {{ end }} + {{ partial "snippets/banner_new" (dict "context" . "image" $image "title" .Title "section" .Section) }} +{{ end }} + {{ define "intro" }} {{ if ne .Content "" }} {{ partial "snippets/content" (dict "content" .Content) }} diff --git a/themes/buha/layouts/news/list.html b/themes/buha/layouts/news/list.html index b0264b65..5f18eb04 100644 --- a/themes/buha/layouts/news/list.html +++ b/themes/buha/layouts/news/list.html @@ -1,3 +1,11 @@ +{{ define "banner" }} + {{ $image := "" }} + {{ if .Resources.GetMatch "banner*" }} + {{ $image = .Resources.GetMatch "banner*" }} + {{ end }} + {{ partial "snippets/banner_new" (dict "context" . "image" $image "title" .Title "section" .Section) }} +{{ end }} + {{ define "intro" }} {{ if ne .Content "" }} {{ partial "snippets/content" (dict "content" .Content) }} @@ -6,6 +14,9 @@ {{ define "content" }} {{- $pages := where .Site.RegularPages "Section" "in" .Site.Params.searchSections -}} + {{ if eq .Kind "term" }} + {{- $pages = .Data.Pages -}} + {{ end }} {{ partial "snippets/gen_list" (dict "context" . "pages" $pages "content" .Content "type" .Type "paginate" true) }} {{ end }} diff --git a/themes/buha/layouts/newsletter/list.html b/themes/buha/layouts/newsletter/list.html index 9f6afc28..7117bc84 100644 --- a/themes/buha/layouts/newsletter/list.html +++ b/themes/buha/layouts/newsletter/list.html @@ -1,3 +1,11 @@ +{{ define "banner" }} + {{ $image := "" }} + {{ if .Resources.GetMatch "banner*" }} + {{ $image = .Resources.GetMatch "banner*" }} + {{ end }} + {{ partial "snippets/banner_new" (dict "context" . "image" $image "title" .Title "section" .Section) }} +{{ end }} + {{ define "content" }}
{{- if .Description -}} diff --git a/themes/buha/layouts/partials/debug.html b/themes/buha/layouts/partials/debug.html deleted file mode 100644 index 188f46f8..00000000 --- a/themes/buha/layouts/partials/debug.html +++ /dev/null @@ -1,10 +0,0 @@ -{{ if eq site.Params.debug true }} -Title: {{ .context.Title }}
-Name: {{ .context.Name }}
-section: {{ .context.Section }}
-type: {{ .context.Type }}
-layout: {{ .context.Layout }}
-{{ if .caller }}caller: {{ .caller }}
{{ end }} -kind: {{ .context.Kind }}
-is page: {{ if .context.IsPage }}yes{{end}}
-{{ end }} diff --git a/themes/buha/layouts/partials/snippets/banner.html b/themes/buha/layouts/partials/snippets/banner.html index 8912ff50..dd154abb 100644 --- a/themes/buha/layouts/partials/snippets/banner.html +++ b/themes/buha/layouts/partials/snippets/banner.html @@ -1,6 +1,6 @@ {{ define "debug" }} {{ .Section }}
-{{ end }} +{{ end }}OLD {{ $title := .Title }} {{ $title = singularize $title }} {{ $title = i18n $title }} @@ -140,4 +140,4 @@ {{ if not .IsHome }}

{{ $title }}

{{ end }}
{{ end }} - +OLD diff --git a/themes/buha/layouts/partials/snippets/banner_new.html b/themes/buha/layouts/partials/snippets/banner_new.html new file mode 100644 index 00000000..e12e15ff --- /dev/null +++ b/themes/buha/layouts/partials/snippets/banner_new.html @@ -0,0 +1,72 @@ +{{ $img := .image }} +{{ if .Resources.GetMatch .image }} + {{ $img = .Resources.GetMatch .image }} +{{ else if resources.GetMatch .image }} + {{ $img = resources.GetMatch .image }} +{{ end }} + +{{ $title := .title }} +{{ $good_w := "1920"}} +{{ $good_h := "850"}} +{{ $banner := .context.Params.banner }} + +{{ $test := true }} +{{ if and $img (ne $banner false) }} + {{ $tiny := ($img.Resize "640x q90") }} + {{ $small := ($img.Resize "768x q90") }} + {{ $medium := ($img.Resize "10240x q90") }} + {{ $large := ($img.Resize "1366x q90") }} + +{{ else }} + +{{ end }} diff --git a/themes/buha/layouts/posts/list.html b/themes/buha/layouts/posts/list.html index b0264b65..aff8bcd7 100644 --- a/themes/buha/layouts/posts/list.html +++ b/themes/buha/layouts/posts/list.html @@ -1,3 +1,11 @@ +{{ define "banner" }} + {{ $image := "" }} + {{ if .Resources.GetMatch "banner*" }} + {{ $image = .Resources.GetMatch "banner*" }} + {{ end }} + {{ partial "snippets/banner_new" (dict "context" . "image" $image "title" .Title "section" .Section) }} +{{ end }} + {{ define "intro" }} {{ if ne .Content "" }} {{ partial "snippets/content" (dict "content" .Content) }} diff --git a/themes/buha/layouts/posts/single.html b/themes/buha/layouts/posts/single.html index 57b389e7..a71150f6 100644 --- a/themes/buha/layouts/posts/single.html +++ b/themes/buha/layouts/posts/single.html @@ -1,3 +1,12 @@ +{{ define "banner" }} + {{ $image := "" }} + {{ $banner := "banner*" }} + {{ if .Resources.GetMatch $banner }} + {{ $image = .Resources.GetMatch $banner }} + {{ end }} + {{ partial "snippets/banner_new" (dict "context" . "image" $image "title" .Title "section" .Section) }} +{{ end }} + {{ define "content" }}
{{ $metas := dict "when" .Params.when "price" .Params.price "contact_mail" .Params.contact_mail "covid" .Params.covid "insta" .Params.insta }} diff --git a/themes/buha/layouts/recurrent/list.html b/themes/buha/layouts/recurrent/list.html index 86c3a61d..037e2021 100644 --- a/themes/buha/layouts/recurrent/list.html +++ b/themes/buha/layouts/recurrent/list.html @@ -1,3 +1,11 @@ +{{ define "banner" }} + {{ $image := "" }} + {{ if .Resources.GetMatch "banner*" }} + {{ $image = .Resources.GetMatch "banner*" }} + {{ end }} + {{ partial "snippets/banner_new" (dict "context" . "image" $image "title" .Title "section" .Section) }} +{{ end }} + {{ define "intro" }} {{ if ne .Content "" }} {{ partial "snippets/content" (dict "content" .Content) }} diff --git a/themes/buha/layouts/search/list.html b/themes/buha/layouts/search/list.html index 0894768d..6eb6e139 100644 --- a/themes/buha/layouts/search/list.html +++ b/themes/buha/layouts/search/list.html @@ -1,3 +1,11 @@ +{{ define "banner" }} + {{ $image := "" }} + {{ if .Resources.GetMatch "banner*" }} + {{ $image = .Resources.GetMatch "banner*" }} + {{ end }} + {{ partial "snippets/banner_new" (dict "context" . "image" $image "title" .Title "section" .Section) }} +{{ end }} + {{ define "content" }} {{ if ne .Content "" }} {{ partial "snippets/content" (dict "content" .Content) }} diff --git a/themes/buha/layouts/tools/list.html b/themes/buha/layouts/tools/list.html index 5e82a869..7e7db028 100644 --- a/themes/buha/layouts/tools/list.html +++ b/themes/buha/layouts/tools/list.html @@ -1,3 +1,11 @@ +{{ define "banner" }} + {{ $image := "" }} + {{ if .Resources.GetMatch "banner*" }} + {{ $image = .Resources.GetMatch "banner*" }} + {{ end }} + {{ partial "snippets/banner_new" (dict "context" . "image" $image "title" .Title "section" .Section) }} +{{ end }} + {{ define "intro" }} {{ if ne .Content "" }} {{ partial "snippets/content" (dict "content" .Content) }}