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 53d20ac6..00000000 Binary files a/themes/buha/layouts/partials/snippets/.single_chooser.html.kate-swp and /dev/null differ diff --git a/themes/buha/static/js/generator.js b/themes/buha/static/js/generator.js index cf59d5bd..94bc8d06 100644 --- a/themes/buha/static/js/generator.js +++ b/themes/buha/static/js/generator.js @@ -30,8 +30,10 @@ function showInput(e) { var output_info = document.getElementById("myform"); var display = document.getElementById("display"); + + var d = new Date(); - var datestring = d.getFullYear() + "-" + ("0"+(d.getMonth()+1)).slice(-2) + "-" + ("0" + d.getDate()).slice(-2) + "T" + ("0" + d.getHours()).slice(-2) + ":" + ("0" + d.getMinutes()).slice(-2) + ":00+02:00\""; + var datestring = d.getFullYear() + "-" + ("0"+(d.getMonth()+1)).slice(-2) + "-" + ("0" + d.getDate()).slice(-2) + "T" + ("0" + d.getHours()).slice(-2) + ":" + ("0" + d.getMinutes()).slice(-2) + ":00+02:00"; var form = document.querySelector('form[id="myform"]'); var title = form.elements['title'].value; @@ -49,6 +51,11 @@ function showInput(e) { var featured = check_checkboxes('featured'); var about = check_checkboxes('about'); + var lastmod = form.elements['lastmod'].value; + if (lastmod) { + var dl = new Date(lastmod); + var lastmod = dl.getFullYear() + "-" + ("0"+(dl.getMonth()+1)).slice(-2) + "-" + ("0" + dl.getDate()).slice(-2) + "T" + "14:" + "00:00+02:00"; +} if (newtags != '""') { var ntags = newtags; @@ -105,7 +112,7 @@ function showInput(e) { if (title && content) { display.innerHTML += "---
"; display.innerHTML += "title: \"" + title + "\"
"; - 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 + "\"
"; }