From 20139b8f8dc5815398e9b4c312aca9eba3644856 Mon Sep 17 00:00:00 2001 From: teldra Date: Sun, 10 Apr 2022 02:24:33 +0200 Subject: [PATCH] second batch of restructure --- content/media/index.de.md | 7 ----- content/news/29-11-2022-tanzabend/index.de.md | 5 ++++ themes/buha/archetypes/default.md | 11 -------- themes/buha/archetypes/news.md | 9 ------- themes/buha/layouts/_default/list.html | 12 ++++++--- themes/buha/layouts/index.html | 1 + ...{easy_list.html => tags_n_categories.html} | 0 .../partials/layout/single/article.html | 24 ++++++++++++++++++ .../layout/single/generator/form.html | 2 +- .../snippets/.single_chooser.html.kate-swp | Bin 259 -> 0 bytes themes/buha/static/js/generator.js | 14 ++++++++-- 11 files changed, 52 insertions(+), 33 deletions(-) delete mode 100644 content/media/index.de.md create mode 100644 content/news/29-11-2022-tanzabend/index.de.md delete mode 100644 themes/buha/archetypes/default.md rename themes/buha/layouts/partials/l1/{easy_list.html => tags_n_categories.html} (100%) delete mode 100644 themes/buha/layouts/partials/snippets/.single_chooser.html.kate-swp diff --git a/content/media/index.de.md b/content/media/index.de.md deleted file mode 100644 index 534e0ef9..00000000 --- a/content/media/index.de.md +++ /dev/null @@ -1,7 +0,0 @@ -![](0) -![](1) -![](2) -![](3) -![](4) -![](5) -![](6) diff --git a/content/news/29-11-2022-tanzabend/index.de.md b/content/news/29-11-2022-tanzabend/index.de.md new file mode 100644 index 00000000..b281b79e --- /dev/null +++ b/content/news/29-11-2022-tanzabend/index.de.md @@ -0,0 +1,5 @@ +--- +title: "La Le Lu" +date: 2022-04-10T01:08:23+02:00 +--- +sadasd diff --git a/themes/buha/archetypes/default.md b/themes/buha/archetypes/default.md deleted file mode 100644 index d12345ad..00000000 --- a/themes/buha/archetypes/default.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: "" -date: {{ .Date }} -when: "" -price: "" -covid: "" -contact: "" -categories: [] -tags: [] -events: [] ---- diff --git a/themes/buha/archetypes/news.md b/themes/buha/archetypes/news.md index f4b5008e..a14e4692 100644 --- a/themes/buha/archetypes/news.md +++ b/themes/buha/archetypes/news.md @@ -1,13 +1,4 @@ --- title: "" date: {{ .Date }} -newscategories: [] -eventcategories: [] -when: "" -featured: false -covid: "" -contact: "" -price: "" -draft: false -tags: [] --- diff --git a/themes/buha/layouts/_default/list.html b/themes/buha/layouts/_default/list.html index 55697de3..c777927a 100644 --- a/themes/buha/layouts/_default/list.html +++ b/themes/buha/layouts/_default/list.html @@ -9,8 +9,10 @@ {{ $title := "" }} {{ $pic := "true" }} {{ $pre := "l1" }} + {{- $paginator := "" -}} {{ $part := .Layout }} {{ $partial_before := "" }} + {{ $paginate := true }} {{ if eq .Layout "article_list" }} {{ if eq .Section "events" }} {{- $pages = where $pages ".Params.when" "ne" nil -}} @@ -26,14 +28,18 @@ {{ else }} {{ if eq .Kind "term" }} {{- $pages = .Data.Pages -}} - {{ $part = "easy_list" }} + {{ $part = "article_list" }} {{ else if eq .Kind "taxonomy" }} {{- $pages = .Data.Terms.Alphabetical -}} - {{ $part = "easy_list" }} + {{ $part = "tags_n_categories" }} + {{ $paginate = false }} {{ end }} {{ end }} + {{ if eq $paginate true}} + {{- $paginator = .Paginate $pages -}} + {{ end }} {{ if and $pre $part }} {{ $partial := string (printf "%s/%s" $pre $part) }} - {{ partial $partial (dict "context" . "pages" $pages "amount" "5" "title" $title "content" .Content "pic" $pic "type" .Type "partial_before" $partial_before) }} + {{ partial $partial (dict "context" . "paginator" $paginator "pages" $pages "amount" "5" "title" $title "content" .Content "pic" $pic "type" .Type "partial_before" $partial_before) }} {{ end }} {{ end }} diff --git a/themes/buha/layouts/index.html b/themes/buha/layouts/index.html index 997dbb94..95e87945 100644 --- a/themes/buha/layouts/index.html +++ b/themes/buha/layouts/index.html @@ -3,6 +3,7 @@ {{ end }} {{ define "content" }} + {{ time.Format "Monday, Jan 2, 2006" "2015-01-21" }} {{- $all := where (where .Site.RegularPages "Permalink" "!=" .Permalink) "Type" "in" .Site.Params.searchSections }} {{ $days := int (mul (mul (int .Site.Params.featured_expire) 7) -1) }} {{ $featured := where (where (where $all ".Params.featured" "=" true) "Type" "in" .Site.Params.searchSections) ".Params.Lastmod" "gt" (now.AddDate 0 0 $days) }} diff --git a/themes/buha/layouts/partials/l1/easy_list.html b/themes/buha/layouts/partials/l1/tags_n_categories.html similarity index 100% rename from themes/buha/layouts/partials/l1/easy_list.html rename to themes/buha/layouts/partials/l1/tags_n_categories.html diff --git a/themes/buha/layouts/partials/layout/single/article.html b/themes/buha/layouts/partials/layout/single/article.html index bffc4db2..839ab515 100644 --- a/themes/buha/layouts/partials/layout/single/article.html +++ b/themes/buha/layouts/partials/layout/single/article.html @@ -46,3 +46,27 @@ {{- end }} + +{{ define "pagefooter" }} + {{ if and (eq .Kind "page") (or (eq .Section "news") (eq .Section "events") (eq .Section "about")) }} +
+
+ {{ 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 }} + + +{{ define "sidebar" }} + {{ if ne .Type "tools" }} + {{- partial "contentlayouts/menu.html" . }} + {{ end }} +{{ end }} diff --git a/themes/buha/layouts/partials/layout/single/generator/form.html b/themes/buha/layouts/partials/layout/single/generator/form.html index 11fe41b3..bddeed14 100644 --- a/themes/buha/layouts/partials/layout/single/generator/form.html +++ b/themes/buha/layouts/partials/layout/single/generator/form.html @@ -131,7 +131,7 @@
- +
{{ end }} diff --git a/themes/buha/layouts/partials/snippets/.single_chooser.html.kate-swp b/themes/buha/layouts/partials/snippets/.single_chooser.html.kate-swp deleted file mode 100644 index 53d20ac60de3175383dda515abdcb32a1ae270ba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 259 zcmZQzU=Z?7EJ;-eE>A2_aLdd|RWQ;sU|?Vn>DOLRpU-znd!F{OYvwcf%0"; - display.innerHTML += "date: \"" + datestring + "
"; + display.innerHTML += "date: " + datestring + "
"; if (featured != '') { display.innerHTML += "featured: true
"; @@ -136,6 +143,9 @@ function showInput(e) { if (price) { display.innerHTML += "price: \"" + price + "\"
"; } + if (lastmod) { + display.innerHTML += "lastmod: " + lastmod + "
"; + } if (contact) { display.innerHTML += "contact: \"" + contact + "\"
"; }