diff --git a/config.toml b/config.toml index 60126ac..fe97905 100644 --- a/config.toml +++ b/config.toml @@ -9,8 +9,8 @@ description = "Buntes Haus e.V. - Soziokulturelles Zentrum in Celle - probably t copyright = "bunteshaus.de" [taxonomies] -category = 'categories' -tag = 'tags' +categories = 'categories' +tags = 'tags' events = 'events' about = 'about' featured = 'featured' @@ -27,7 +27,7 @@ featured = 'featured' [params] # 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" - + debug = true #do you want a contact page? contact = true @@ -52,6 +52,8 @@ featured = 'featured' # how long stays a featrued article on frontpage as featured (in weeks) featured_expire = "1" + placeholder = "/images/no_article_pic.png" + # data for your imprint and contact page [params.imprintdata] tel = "(+) 49 5141 907 927" diff --git a/content/generator.de.md b/content/tools/generator.de.md similarity index 100% rename from content/generator.de.md rename to content/tools/generator.de.md diff --git a/content/not_translated.de.md b/content/tools/not_translated.de.md similarity index 100% rename from content/not_translated.de.md rename to content/tools/not_translated.de.md diff --git a/docs/todo.de b/docs/todo.de index 2abde5a..33e408b 100644 --- a/docs/todo.de +++ b/docs/todo.de @@ -9,3 +9,31 @@ todo buha.de - dokumentiere, das artikel der alten homepage "lastmod" mit demgenau bis ungefaehren datum der damligen erstellung, im frontmatter haben sollten, wann sie erstellt wurden. + +listen: +mit preview: +events +news +about +(jeweils auch nur text und/oder nur bild) + +archive + +misc + +links + +singlepage: +contact +newsletter +index +impressum +article + + +_default/list.html entscheided ueber home oder section + laedt dann partial/layout/$section + +partial/layout/$section + definend dann titel, content, main + snippets dafuer diff --git a/themes/buha/layouts/_default/archive.html b/themes/buha/layouts/_default/archive.html index 62ad30c..211f64c 100644 --- a/themes/buha/layouts/_default/archive.html +++ b/themes/buha/layouts/_default/archive.html @@ -7,19 +7,5 @@ {{ end }} {{ define "main" }} -{{ if site.Params.debug }}archive.html{{ end }} -
-{{ $prev := 3000}} -{{range where .Site.RegularPages "Type" "in" site.Params.searchSections }} - {{ $date := .Date }} - {{ if gt $prev ($date.Format "2006") }} -

{{ $date.Format "2006" }}

- {{end}} -
- -
{{- $date.Format "02" }}. {{ if $date.Format "Jan" | i18n }}{{ $date.Format "Jan" | i18n -}}{{- else -}} {{- $date.Format "Jan" -}}{{- end }} {{ $date.Format "2006 15:04" }}

-
- {{ $prev = $date.Format "2006"}} -{{end}} -
+{{ partial "layout/archive" . }} {{ end }} diff --git a/themes/buha/layouts/_default/baseof.html b/themes/buha/layouts/_default/baseof.html index c940aa5..2ad994b 100644 --- a/themes/buha/layouts/_default/baseof.html +++ b/themes/buha/layouts/_default/baseof.html @@ -4,23 +4,24 @@ {{ block "css" . -}}{{- end }}
-
- {{ partial "structure/header" . }} - {{ partial "structure/submenu" . }} -
-
-
- {{ block "title" . -}}{{- end }} - {{ block "main" . -}}{{- end }} -
- -
- {{ block "ab" . -}}{{- end }} - +
+ {{ partialCached "structure/header" . }} + {{ partial "structure/submenu" . }} +
+
+
+ {{ block "title" . -}}{{- end }} + {{ block "content" . -}}{{- end }} + {{ block "main" . -}}{{- end }} +
+
+ {{ block "pagefooter" . -}}{{- end }} + +
diff --git a/themes/buha/layouts/_default/list.html b/themes/buha/layouts/_default/list.html new file mode 100644 index 0000000..e612da4 --- /dev/null +++ b/themes/buha/layouts/_default/list.html @@ -0,0 +1,12 @@ +{{ define "title" }} +

{{ if i18n .Section }}{{ i18n .Section }}{{ else }}{{ "Misc" }}{{ end }}

+{{ end }} + +{{ define "main" }} + {{ partial "debug" (dict "context" . ) }} +
+ {{ range .Pages }} + {{ .Name }}
+ {{ end }} +
+{{ end }} diff --git a/themes/buha/layouts/_default/misc.html b/themes/buha/layouts/_default/misc.html index 7dd58dc..e612da4 100644 --- a/themes/buha/layouts/_default/misc.html +++ b/themes/buha/layouts/_default/misc.html @@ -3,6 +3,7 @@ {{ end }} {{ define "main" }} + {{ partial "debug" (dict "context" . ) }}
{{ range .Pages }} {{ .Name }}
diff --git a/themes/buha/layouts/_default/newsletter.html b/themes/buha/layouts/_default/newsletter.html index f5793fa..736cba0 100644 --- a/themes/buha/layouts/_default/newsletter.html +++ b/themes/buha/layouts/_default/newsletter.html @@ -12,6 +12,7 @@ {{- end -}} {{- define "main" -}} + {{ partial "debug" (dict "context" . ) }} {{ if ne .Content "" }}
{{ .Content }} diff --git a/themes/buha/layouts/_default/single.html b/themes/buha/layouts/_default/single.html index 207cc30..3f35aa2 100644 --- a/themes/buha/layouts/_default/single.html +++ b/themes/buha/layouts/_default/single.html @@ -6,8 +6,9 @@

{{ $name }}

{{ end }} - {{ define "main" }} + {{ partial "debug" (dict "context" . "caller" "single.html" )}} +
{{ if eq .Type "tools" }}
{{ $tool := printf "misc/%s" .Params.tool }} @@ -20,8 +21,8 @@ {{ end }} {{ end }} -{{ define "ab" }} - {{ if ne .Section "misc" }} +{{ define "pagefooter" }} + {{ if and (ne .Section "misc") (eq .Type "tools") }}
{{ if i18n "created" }}{{ i18n "created" }}{{ else }}{{ "Created" }}{{ end }}
diff --git a/themes/buha/layouts/_default/taxonomy.html b/themes/buha/layouts/_default/taxonomy.html index 4429266..1c4e763 100644 --- a/themes/buha/layouts/_default/taxonomy.html +++ b/themes/buha/layouts/_default/taxonomy.html @@ -7,7 +7,7 @@ {{- end -}} {{- define "main" -}} - {{ partial "debug" (dict "context" .) }} + {{ partial "debug" (dict "context" . "caller" "taxonomy.html") }} {{ $title := lower .Title }} {{- $paginator := slice -}} {{ $partial := "contentlayouts/list.html" }} diff --git a/themes/buha/layouts/partials/contentlayouts/article.html b/themes/buha/layouts/partials/contentlayouts/article.html index 5883420..2bffda5 100644 --- a/themes/buha/layouts/partials/contentlayouts/article.html +++ b/themes/buha/layouts/partials/contentlayouts/article.html @@ -1,53 +1,16 @@ - {{ $visible := "false" }} - {{ $covid := "false" }} - {{ $when := "false" }} - {{ $price := "false" }} - {{ $contact := "false" }} - {{ $showmeta := "false" }} - {{ if and (ne .context.Params.when "") (ne .context.Params.when nil) }} - {{ $showmeta = "true" }} - {{ $when = true }} - {{ end }} - {{ if and (ne .context.Params.price "") (ne .context.Params.price nil) }} - {{ $showmeta = "true" }} - {{ if eq .context.Params.price "free" }} - {{ $price = true }} - {{ end }} - {{ end }} - {{ if and (ne .context.Params.contact "") (ne .context.Params.contact nil) (eq .type "article") }} - {{ $showmeta = "true" }} - {{ $contact = true }} - {{ end }} - {{ if and (ne .context.Params.covid "") (ne .context.Params.covid nil) (eq .type "article") }} - {{ $showmeta = "true" }} - {{ $covid = true }} - {{ end }} - {{ if and (eq $showmeta "true") (ne .type "contact") }} -
- {{ if eq $when true }} -
{{ .context.Params.when }}
- {{ end }} - {{ if eq $price true }} - {{ if eq .context.Params.price "free" }} -
{{ if i18n "freeentry" }}{{ i18n "freeentry" }}{{ else }}{{ "Free Entry" }}{{ end }}
- {{ else }} -
{{ if i18n "entry" }}{{ i18n "entry" }}{{ else }}{{ "Entry" }}{{ end }}: {{ .context.Params.price }}
- {{ end }} - {{ end }} - {{ if eq $contact true }} -
{{ if i18n "contact" }}{{ i18n "contact" }}{{ else }}{{ "Contact" }}{{ end }} {{ .context.Params.contact | markdownify }} {{ if i18n "or" }}{{ i18n "or" }}{{ else }}{{ "or" }}{{ end }} {{ site.Params.imprintdata.tel }}
- {{ end }} - {{ if eq $covid true }} -
Covid: {{ .context.Params.covid }}
- {{ end }} -
- {{ end }} +{{ $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 := "/images/no_article_pic.png" }} + {{ $placeholder := site.Params.placeholder }} {{ if ne .context.Section "misc"}} {{ $img = resources.Get $placeholder }} {{- $thumb = $img.Resize "1024x" }} @@ -85,4 +48,4 @@ {{ end }}
{{- end }} - +
diff --git a/themes/buha/layouts/partials/structure/footer.html b/themes/buha/layouts/partials/contentlayouts/footer.html similarity index 100% rename from themes/buha/layouts/partials/structure/footer.html rename to themes/buha/layouts/partials/contentlayouts/footer.html diff --git a/themes/buha/layouts/partials/contentlayouts/meta.html b/themes/buha/layouts/partials/contentlayouts/meta.html new file mode 100644 index 0000000..f3442d9 --- /dev/null +++ b/themes/buha/layouts/partials/contentlayouts/meta.html @@ -0,0 +1,18 @@ +
+ {{ 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/debug.html b/themes/buha/layouts/partials/debug.html index 8cb43c5..c1cb7da 100644 --- a/themes/buha/layouts/partials/debug.html +++ b/themes/buha/layouts/partials/debug.html @@ -1,7 +1,8 @@ -{{ if site.Params.debug }} +{{ if eq site.Params.debug true }} Title: {{ .context.Title }}
Name: {{ .context.Name }}
-context: {{ .context }}
-filename: {{ .filename }}
section: {{ .context.Section }}
+type: {{ .context.Type }}
+{{ if .caller }}caller: {{ .caller }}
{{ end }} +kind: {{ .context.Kind }} {{ end }} diff --git a/themes/buha/layouts/partials/layout/about b/themes/buha/layouts/partials/layout/about new file mode 100644 index 0000000..e69de29 diff --git a/themes/buha/layouts/partials/layout/archive.html b/themes/buha/layouts/partials/layout/archive.html new file mode 100644 index 0000000..717f956 --- /dev/null +++ b/themes/buha/layouts/partials/layout/archive.html @@ -0,0 +1,16 @@ + +{{ partial "debug" (dict "context" . "caller" "archive.html" )}} +
+{{ $prev := 3000}} +{{range where .Site.RegularPages "Type" "in" site.Params.searchSections }} + {{ $date := .Date }} + {{ if gt $prev ($date.Format "2006") }} +

{{ $date.Format "2006" }}

+ {{end}} +
+ +
{{- $date.Format "02" }}. {{ if $date.Format "Jan" | i18n }}{{ $date.Format "Jan" | i18n -}}{{- else -}} {{- $date.Format "Jan" -}}{{- end }} {{ $date.Format "2006 15:04" }}

+
+ {{ $prev = $date.Format "2006"}} +{{end}} +
diff --git a/themes/buha/layouts/partials/layout/categories b/themes/buha/layouts/partials/layout/categories new file mode 100644 index 0000000..e69de29 diff --git a/themes/buha/layouts/partials/layout/events b/themes/buha/layouts/partials/layout/events new file mode 100644 index 0000000..e69de29 diff --git a/themes/buha/layouts/partials/layout/featured b/themes/buha/layouts/partials/layout/featured new file mode 100644 index 0000000..e69de29 diff --git a/themes/buha/layouts/partials/layout/index b/themes/buha/layouts/partials/layout/index new file mode 100644 index 0000000..e69de29 diff --git a/themes/buha/layouts/partials/layout/links b/themes/buha/layouts/partials/layout/links new file mode 100644 index 0000000..e69de29 diff --git a/themes/buha/layouts/partials/layout/misc b/themes/buha/layouts/partials/layout/misc new file mode 100644 index 0000000..e69de29 diff --git a/themes/buha/layouts/partials/layout/tags b/themes/buha/layouts/partials/layout/tags new file mode 100644 index 0000000..e69de29 diff --git a/themes/buha/layouts/partials/misc/generator.html b/themes/buha/layouts/partials/misc/generator.html index c52a91e..d018275 100644 --- a/themes/buha/layouts/partials/misc/generator.html +++ b/themes/buha/layouts/partials/misc/generator.html @@ -1,6 +1,8 @@ {{ define "css" }} {{ end }} + +
{{ .Content }}