diff --git a/themes/buha/layouts/_default/baseof.html b/themes/buha/layouts/_default/baseof.html index 08990cf3..a12a179d 100644 --- a/themes/buha/layouts/_default/baseof.html +++ b/themes/buha/layouts/_default/baseof.html @@ -20,7 +20,7 @@ {{ block "pagefooter" . -}}{{- end }} diff --git a/themes/buha/layouts/_default/single.html b/themes/buha/layouts/_default/single.html index 5fb67b2d..5da31dfe 100644 --- a/themes/buha/layouts/_default/single.html +++ b/themes/buha/layouts/_default/single.html @@ -5,12 +5,12 @@ {{ define "content" }} {{ partial "debug" (dict "context" . "caller" "single_chooser.html")}} {{ $partial_before := "" }} - {{ $partial := "layout/single/article" }} + {{ $partial := "layout/article" }} {{ $pic := "true" }} {{ if eq .Params.tool "generator" }} - {{ $partial = "layout/single/generator" }} + {{ $partial = "layout/generator" }} {{ else if eq .Params.tool "nottranslated" }} - {{ $partial = "layout/single/nottranslated" }} + {{ $partial = "layout/nottranslated" }} {{ end }}
{{ partial $partial (dict "context" . "pic" $pic "content" .Content "partial_before" $partial_before "type" "article") }} diff --git a/themes/buha/layouts/partials/contentlayouts/article.html b/themes/buha/layouts/partials/contentlayouts/article.html deleted file mode 100644 index 2bffda5a..00000000 --- a/themes/buha/layouts/partials/contentlayouts/article.html +++ /dev/null @@ -1,51 +0,0 @@ -{{ $showmeta := "false" }} - {{ $metas := dict "when" .context.Params.when "price" .context.Params.price "contact" .context.Params.contact "covid" - .context.Params.covid }} - {{ if eq .type "list" }} - {{ $metas = dict "when" .context.Params.when "price" .context.Params.price }} - {{ end }} - {{ partial "contentlayouts/meta.html" $metas }} - - {{ $small := "solo" }} - {{ $big := "solo" }} - {{ $img := "" }} - {{ $thumb := "" }} - {{ $placeholder := site.Params.placeholder }} - {{ if ne .context.Section "misc"}} - {{ $img = resources.Get $placeholder }} - {{- $thumb = $img.Resize "1024x" }} - {{ end }} - {{- if or (.context.Resources.ByType "image") (.Summary) ($img) -}} - {{ $small = "multiple_small" }} - {{ $big = "multiple_big" }} - {{ else }} - {{ $small = "multiple_big"}} - {{ end }} - - {{- if and (.context.Resources.ByType "image") (ne .context.Section "misc") -}} - {{- $img = index (.context.Resources.ByType "image") 0 -}} - {{- $thumb = $img.Resize "1024x" }} - {{ if ne .context.Content "" }} - {{- $thumb = $img.Resize "2048x" }} - {{ end }} - {{ end }} - -
- {{ if ne $img "" }} -
- {{ if and (ne .type "list") (.context.Resources.ByType "image") }}{{ end }} - - {{ if ne .type "list" }}{{ end }} - {{ if eq .type "article" }}{{ .TableOfContents }}{{ end }} -
- {{ end }} - {{- if or .context.Content .context.Summary -}} -
- {{ if eq .type "contact" }}{{ partial "structure/contact" }}{{ end }} - {{ if eq .type "list" }}{{- .context.Summary -}}{{ else }}{{- .context.Content -}}{{ end }} - {{ if and .context.Truncated (eq .type "list") }} -
{{- if i18n "readmore" -}}{{- i18n "readmore" -}}{{- else -}}{{- "readmore" -}}{{- end -}}..
- {{ end }} -
- {{- end }} -
diff --git a/themes/buha/layouts/partials/contentlayouts/list.html b/themes/buha/layouts/partials/contentlayouts/list.html deleted file mode 100644 index 84a93f86..00000000 --- a/themes/buha/layouts/partials/contentlayouts/list.html +++ /dev/null @@ -1,23 +0,0 @@ -{{ if and .amount (or .paginator .pages) }} - {{ $amount := .amount }} - {{ $pages := "" }} - {{ if .pages }} - {{ $pages = .pages.ByLastmod.Reverse }} - {{ else if .paginator }} - {{ $pages = .paginator.Pages.ByLastmod.Reverse }} - {{ end }} - {{- range first $amount $pages -}} -
- -
-

{{- .Title -}}

-
-
- -
- {{ partial "contentlayouts/article.html" (dict "context" . "type" "list") }} -
-
-
- {{ end }} -{{ end }} diff --git a/themes/buha/layouts/partials/contentlayouts/meta.html b/themes/buha/layouts/partials/contentlayouts/meta.html deleted file mode 100644 index f3442d9c..00000000 --- a/themes/buha/layouts/partials/contentlayouts/meta.html +++ /dev/null @@ -1,18 +0,0 @@ -
- {{ if .when }} -
{{ .when }}
- {{ end }} - {{ if .price }} - {{ if eq .price "free" }} -
{{ if i18n "freeentry" }}{{ i18n "freeentry" }}{{ else }}{{ "Free Entry" }}{{ end }}
- {{ else }} -
{{ if i18n "entry" }}{{ i18n "entry" }}{{ else }}{{ "Entry" }}{{ end }}: {{ .price }}
- {{ end }} - {{ end }} - {{ if .contact }} -
{{ if i18n "contact" }}{{ i18n "contact" }}{{ else }}{{ "Contact" }}{{ end }} {{ .contact | markdownify }} {{ if i18n "or" }}{{ i18n "or" }}{{ else }}{{ "or" }}{{ end }} {{ site.Params.imprintdata.tel }}
- {{ end }} - {{ if .covid }} -
Covid: {{ .covid }}
- {{ end }} -
diff --git a/themes/buha/layouts/partials/contentlayouts/termlist.html b/themes/buha/layouts/partials/contentlayouts/termlist.html deleted file mode 100644 index 39ac2a9b..00000000 --- a/themes/buha/layouts/partials/contentlayouts/termlist.html +++ /dev/null @@ -1,29 +0,0 @@ -{{ $name := .context.Title }} -{{ $title := lower .context.Title }} - - -{{ range $taxonomyname, $taxonomy := .context.Site.Taxonomies }} - {{ if eq $title $taxonomyname }} - {{ range $key, $value := $taxonomy }} - {{ $key }} - {{ end }} - {{ end }} -{{ end }} - - -{{ if and site.Params.debug false }} - {{ range $taxonomyname, $taxonomy := .context.Site.Taxonomies }} -
  • {{ $taxonomyname }} - -
  • - {{ end }} -{{ end }} diff --git a/themes/buha/layouts/partials/l1/article_list.html b/themes/buha/layouts/partials/l1/article_list.html index 5598f5a2..5b6cd4ec 100644 --- a/themes/buha/layouts/partials/l1/article_list.html +++ b/themes/buha/layouts/partials/l1/article_list.html @@ -20,7 +20,7 @@
    - {{ partial "layout/single/article" (dict "context" . "type" "list" "pic" "true") }} + {{ partial "layout/article" (dict "context" . "type" "list" "pic" "true") }}
    diff --git a/themes/buha/layouts/partials/layout/single/archive.html b/themes/buha/layouts/partials/layout/archive.html similarity index 100% rename from themes/buha/layouts/partials/layout/single/archive.html rename to themes/buha/layouts/partials/layout/archive.html diff --git a/themes/buha/layouts/partials/layout/single/article.html b/themes/buha/layouts/partials/layout/article.html similarity index 96% rename from themes/buha/layouts/partials/layout/single/article.html rename to themes/buha/layouts/partials/layout/article.html index 6989c246..412a8f64 100644 --- a/themes/buha/layouts/partials/layout/single/article.html +++ b/themes/buha/layouts/partials/layout/article.html @@ -19,6 +19,7 @@ {{ partial "snippets/article_metadata" $metas }}
    {{- if and (.context.Resources.ByType "image") (eq .pic "true") -}} + {{ $resize := "500x" }} {{- $img := index (.context.Resources.ByType "image") 0 -}} {{- $thumb := index (.context.Resources.ByType "image") 0 -}} {{ if ne .context.Content "" }} @@ -26,6 +27,7 @@ {{ else if eq .type "list" }} {{- $thumb = $img.Resize "500x" }} {{ end }} + {{- $thumb = $img.Resize $resize }}
    {{ if and (ne .type "list") (.context.Resources.ByType "image") }}{{ end }} @@ -64,6 +66,6 @@ {{ define "sidebar" }} {{ if ne .Type "tools" }} - {{- partial "contentlayouts/menu.html" . }} + {{- partial "snippets/menu" . }} {{ end }} {{ end }} diff --git a/themes/buha/layouts/partials/layout/single/content_single.html b/themes/buha/layouts/partials/layout/content_single.html similarity index 100% rename from themes/buha/layouts/partials/layout/single/content_single.html rename to themes/buha/layouts/partials/layout/content_single.html diff --git a/themes/buha/layouts/partials/layout/single/generator.html b/themes/buha/layouts/partials/layout/generator.html similarity index 87% rename from themes/buha/layouts/partials/layout/single/generator.html rename to themes/buha/layouts/partials/layout/generator.html index 6289d917..78fcaa38 100644 --- a/themes/buha/layouts/partials/layout/single/generator.html +++ b/themes/buha/layouts/partials/layout/generator.html @@ -9,7 +9,7 @@
    {{ if (index .context.Params.forms 0) }} - {{ partial "layout/single/generator/form" (dict "context" .context "form" 0) }} + {{ partial "layout/generator/form" (dict "context" .context "form" 0) }} {{ end }} diff --git a/themes/buha/layouts/partials/layout/single/generator/expand.html b/themes/buha/layouts/partials/layout/generator/expand.html similarity index 100% rename from themes/buha/layouts/partials/layout/single/generator/expand.html rename to themes/buha/layouts/partials/layout/generator/expand.html diff --git a/themes/buha/layouts/partials/layout/single/generator/form.html b/themes/buha/layouts/partials/layout/generator/form.html similarity index 96% rename from themes/buha/layouts/partials/layout/single/generator/form.html rename to themes/buha/layouts/partials/layout/generator/form.html index 3dd9289a..263b2099 100644 --- a/themes/buha/layouts/partials/layout/single/generator/form.html +++ b/themes/buha/layouts/partials/layout/generator/form.html @@ -14,7 +14,7 @@ {{ if and .group (not (in $group .group))}}
    {{ if i18n (singularize .group) }}{{ i18n (singularize .group) }}{{ else }}{{ humanize .group }}{{ end }} - {{ partial "layout/single/generator/expand" (dict "name" (printf "%sgroup" .group)) }} + {{ partial "layout/generator/expand" (dict "name" (printf "%sgroup" .group)) }}
    {{ $group = $group | append .group }} {{ end }} @@ -71,7 +71,7 @@
    {{ .name }} - {{ if ne .expanded true }}{{ partial "layout/single/generator/expand" (dict "name" (printf "%scat" $in0)) }}{{ end }}{{- if .required -}}{{- " *" -}}{{- end -}} + {{ if ne .expanded true }}{{ partial "layout/generator/expand" (dict "name" (printf "%scat" $in0)) }}{{ end }}{{- if .required -}}{{- " *" -}}{{- end -}}
    diff --git a/themes/buha/layouts/partials/layout/single/newsletter.html b/themes/buha/layouts/partials/layout/newsletter.html similarity index 100% rename from themes/buha/layouts/partials/layout/single/newsletter.html rename to themes/buha/layouts/partials/layout/newsletter.html diff --git a/themes/buha/layouts/partials/layout/single/nottranslated.html b/themes/buha/layouts/partials/layout/nottranslated.html similarity index 100% rename from themes/buha/layouts/partials/layout/single/nottranslated.html rename to themes/buha/layouts/partials/layout/nottranslated.html diff --git a/themes/buha/layouts/partials/contentlayouts/footer.html b/themes/buha/layouts/partials/snippets/footer.html similarity index 100% rename from themes/buha/layouts/partials/contentlayouts/footer.html rename to themes/buha/layouts/partials/snippets/footer.html diff --git a/themes/buha/layouts/partials/contentlayouts/menu.html b/themes/buha/layouts/partials/snippets/menu.html similarity index 100% rename from themes/buha/layouts/partials/contentlayouts/menu.html rename to themes/buha/layouts/partials/snippets/menu.html diff --git a/themes/buha/layouts/partials/structure/sidebar.html b/themes/buha/layouts/partials/structure/sidebar.html index 0d5ca4a4..e10fccc1 100644 --- a/themes/buha/layouts/partials/structure/sidebar.html +++ b/themes/buha/layouts/partials/structure/sidebar.html @@ -1,2 +1,2 @@ -{{ partial "contentlayouts/menu.html" . }} +{{ partial "snippets/menu" . }} diff --git a/themes/buha/layouts/partials/structure/submenu.html b/themes/buha/layouts/partials/structure/submenu.html index c5c83f2d..24ed887e 100644 --- a/themes/buha/layouts/partials/structure/submenu.html +++ b/themes/buha/layouts/partials/structure/submenu.html @@ -2,7 +2,7 @@
    Menü ☰

    - {{ partial "contentlayouts/menu.html" . }} + {{ partial "snippets/menu" . }}