diff --git a/themes/buha/archetypes/default.md b/themes/buha/archetypes/default.md index 5ee2f017..d12345ad 100644 --- a/themes/buha/archetypes/default.md +++ b/themes/buha/archetypes/default.md @@ -4,7 +4,8 @@ date: {{ .Date }} when: "" price: "" covid: "" -register: "" +contact: "" categories: [] tags: [] +events: [] --- diff --git a/themes/buha/archetypes/events.md b/themes/buha/archetypes/events.md deleted file mode 100644 index d7f1a4a6..00000000 --- a/themes/buha/archetypes/events.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: "" -date: {{ .Date }} -when: "" -recurrent: false -price: "" -covid: "" -register: "" -categories: "" -tags: ["",] ---- diff --git a/themes/buha/i18n/de.toml b/themes/buha/i18n/de.toml index 1da8d42e..a4e00ed8 100644 --- a/themes/buha/i18n/de.toml +++ b/themes/buha/i18n/de.toml @@ -61,9 +61,6 @@ other = "Wann" [price] other = "Preis" -[registeremail] -other = "Registrierung" - [en] other = "English" diff --git a/themes/buha/layouts/_default/rss.xml b/themes/buha/layouts/_default/rss.xml index b4a34ec0..4b19bf96 100644 --- a/themes/buha/layouts/_default/rss.xml +++ b/themes/buha/layouts/_default/rss.xml @@ -30,7 +30,7 @@ {{ $when := .Params.when }} {{ $about := .Params.about }} {{ $covid := .Params.covid }} - {{ $registeremail := .Params.registeremail }} + {{ $contact := .Params.contact }} {{ $price := .Params.price }} {{ $featured := .Params.featured }} {{ $categories := slice }} @@ -49,7 +49,7 @@ {{ range .Resources.ByType "image" }} {{ $images = $images | append . }} {{ end }} - {{ $hash := slice $when $about $categories $events $covid $registeremail $price $price $featured $tags .Date .Lastmod .Title .Content }} + {{ $hash := slice $when $about $categories $events $covid $contact $price $featured $tags .Date .Lastmod .Title .Content }} {{ $hash = delimit $hash ", " }} {{ $hash = md5 $hash }} @@ -75,4 +75,4 @@ {{ end }} - \ No newline at end of file + diff --git a/themes/buha/layouts/partials/contentlayouts/article.html b/themes/buha/layouts/partials/contentlayouts/article.html index b0097e4a..96b58b30 100644 --- a/themes/buha/layouts/partials/contentlayouts/article.html +++ b/themes/buha/layouts/partials/contentlayouts/article.html @@ -3,7 +3,6 @@ {{ $when := "false" }} {{ $price := "false" }} {{ $contact := "false" }} - {{ $registeremail := "false" }} {{ $showmeta := "false" }} {{ if and (ne .context.Params.when "") (ne .context.Params.when nil) }} {{ $showmeta = "true" }} @@ -15,18 +14,14 @@ {{ $price = true }} {{ end }} {{ end }} - {{ if and (ne .context.Params.registeremail "") (ne .context.Params.registeremail nil) (eq .type "article") }} + {{ if and (ne .context.Params.contact "") (ne .context.Params.contact nil) (eq .type "article") }} {{ $showmeta = "true" }} - {{ $registeremail = 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 (ne .context.Params.contact "") (ne .context.Params.contact nil) (eq .type "article") }} - {{ $showmeta = "true" }} - {{ $contact = true }} - {{ end }} {{ if and (eq $showmeta "true") (ne .type "contact") }}
@@ -40,15 +35,12 @@
{{ if i18n "entry" }}{{ i18n "entry" }}{{ else }}{{ "entry" }}{{ end }}: {{ .context.Params.price }}
{{ end }} {{ end }} - {{ if eq $registeremail true }} -
{{ if i18n "register" }}{{ i18n "register" }}{{ else }}{{ "register" }}{{ end }} {{ .context.Params.registeremail | markdownify }} {{ if i18n "or" }}{{ i18n "or" }}{{ else }}{{ "or" }}{{ end }} {{ site.Params.imprintdata.tel }}
+ {{ 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 }}
Es gilt die {{ .context.Params.covid }} Regel
{{ end }} - {{ if eq $contact true }} -
{{ if i18n "contact" }}{{ i18n "contact" }}{{ else }}{{ "contact" }}{{ end }}: {{ if eq .type "article" }}{{ end }}{{ .context.Params.contact }}{{ if eq .type "article" }}{{ end }}
- {{ end }}
{{ end }} diff --git a/themes/buha/layouts/partials/form.html b/themes/buha/layouts/partials/form.html index 118915a9..a0b4c4d7 100644 --- a/themes/buha/layouts/partials/form.html +++ b/themes/buha/layouts/partials/form.html @@ -85,7 +85,7 @@ {{ end }} {{ if eq .new true }} - + {{ end }} diff --git a/themes/buha/static/js/generator.js b/themes/buha/static/js/generator.js index 95c7547c..cf59d5bd 100644 --- a/themes/buha/static/js/generator.js +++ b/themes/buha/static/js/generator.js @@ -39,7 +39,7 @@ function showInput(e) { var when = form.elements['when'].value; // var covid = form.elements['newcovid'].value; var price = form.elements['price'].value; - var registeremail = form.elements['contact'].value; + var contact = form.elements['contact'].value; var events = check_checkboxes('events'); if (form.elements['newevents']) { var newevents = testor(form.elements['newevents'].value.split(',')); } var categories = check_checkboxes('categories'); @@ -123,7 +123,7 @@ function showInput(e) { display.innerHTML += "categories: \[" + ncategories + "]
"; } - if (nevents != '') { + if (nevents) { display.innerHTML += "events: \[" + nevents + "]
"; } @@ -136,8 +136,8 @@ function showInput(e) { if (price) { display.innerHTML += "price: \"" + price + "\"
"; } - if (registeremail) { - display.innerHTML += "registeremail: \"" + registeremail + "\"
"; + if (contact) { + display.innerHTML += "contact: \"" + contact + "\"
"; } display.innerHTML += "---
"; if (content) {