remove old generator

This commit is contained in:
teldra 2022-04-06 19:32:09 +02:00
parent cee2381107
commit 24a3c7b98e
7 changed files with 14 additions and 35 deletions

View File

@ -4,7 +4,8 @@ date: {{ .Date }}
when: "" when: ""
price: "" price: ""
covid: "" covid: ""
register: "" contact: ""
categories: [] categories: []
tags: [] tags: []
events: []
--- ---

View File

@ -1,11 +0,0 @@
---
title: ""
date: {{ .Date }}
when: ""
recurrent: false
price: ""
covid: ""
register: ""
categories: ""
tags: ["",]
---

View File

@ -61,9 +61,6 @@ other = "Wann"
[price] [price]
other = "Preis" other = "Preis"
[registeremail]
other = "Registrierung"
[en] [en]
other = "English" other = "English"

View File

@ -30,7 +30,7 @@
{{ $when := .Params.when }} {{ $when := .Params.when }}
{{ $about := .Params.about }} {{ $about := .Params.about }}
{{ $covid := .Params.covid }} {{ $covid := .Params.covid }}
{{ $registeremail := .Params.registeremail }} {{ $contact := .Params.contact }}
{{ $price := .Params.price }} {{ $price := .Params.price }}
{{ $featured := .Params.featured }} {{ $featured := .Params.featured }}
{{ $categories := slice }} {{ $categories := slice }}
@ -49,7 +49,7 @@
{{ range .Resources.ByType "image" }} {{ range .Resources.ByType "image" }}
{{ $images = $images | append . }} {{ $images = $images | append . }}
{{ end }} {{ 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 = delimit $hash ", " }}
{{ $hash = md5 $hash }} {{ $hash = md5 $hash }}

View File

@ -3,7 +3,6 @@
{{ $when := "false" }} {{ $when := "false" }}
{{ $price := "false" }} {{ $price := "false" }}
{{ $contact := "false" }} {{ $contact := "false" }}
{{ $registeremail := "false" }}
{{ $showmeta := "false" }} {{ $showmeta := "false" }}
{{ if and (ne .context.Params.when "") (ne .context.Params.when nil) }} {{ if and (ne .context.Params.when "") (ne .context.Params.when nil) }}
{{ $showmeta = "true" }} {{ $showmeta = "true" }}
@ -15,18 +14,14 @@
{{ $price = true }} {{ $price = true }}
{{ end }} {{ end }}
{{ 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" }} {{ $showmeta = "true" }}
{{ $registeremail = true }} {{ $contact = true }}
{{ end }} {{ end }}
{{ if and (ne .context.Params.covid "") (ne .context.Params.covid nil) (eq .type "article") }} {{ if and (ne .context.Params.covid "") (ne .context.Params.covid nil) (eq .type "article") }}
{{ $showmeta = "true" }} {{ $showmeta = "true" }}
{{ $covid = true }} {{ $covid = true }}
{{ end }} {{ 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") }} {{ if and (eq $showmeta "true") (ne .type "contact") }}
<div id="articlemeta" style="font-size: smaller;"> <div id="articlemeta" style="font-size: smaller;">
@ -40,15 +35,12 @@
<div>{{ if i18n "entry" }}{{ i18n "entry" }}{{ else }}{{ "entry" }}{{ end }}: {{ .context.Params.price }}</div> <div>{{ if i18n "entry" }}{{ i18n "entry" }}{{ else }}{{ "entry" }}{{ end }}: {{ .context.Params.price }}</div>
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ if eq $registeremail true }} {{ if eq $contact true }}
<div>{{ if i18n "register" }}{{ i18n "register" }}{{ else }}{{ "register" }}{{ end }} {{ .context.Params.registeremail | markdownify }} {{ if i18n "or" }}{{ i18n "or" }}{{ else }}{{ "or" }}{{ end }} {{ site.Params.imprintdata.tel }}</div> <div>{{ if i18n "contact" }}{{ i18n "contact" }}{{ else }}{{ "contact" }}{{ end }} {{ .context.Params.contact | markdownify }} {{ if i18n "or" }}{{ i18n "or" }}{{ else }}{{ "or" }}{{ end }} {{ site.Params.imprintdata.tel }}</div>
{{ end }} {{ end }}
{{ if eq $covid true }} {{ if eq $covid true }}
<div>Es gilt die {{ .context.Params.covid }} Regel</div> <div>Es gilt die {{ .context.Params.covid }} Regel</div>
{{ end }} {{ end }}
{{ if eq $contact true }}
<div>{{ if i18n "contact" }}{{ i18n "contact" }}{{ else }}{{ "contact" }}{{ end }}: {{ if eq .type "article" }}<a href="mailto://{{ .context.Params.contact }}">{{ end }}{{ .context.Params.contact }}{{ if eq .type "article" }}</a>{{ end }}</div>
{{ end }}
</div> </div>
{{ end }} {{ end }}

View File

@ -85,7 +85,7 @@
{{ end }} {{ end }}
</fieldset> </fieldset>
{{ if eq .new true }} {{ if eq .new true }}
<label id="label" for="new{{- .name -}}">{{ if i18n "new" }}{{ i18n "new" }}{{ else }}{{ "new" }}{{ end }}{{- if eq .required true -}}*{{- end -}}</label> <label id="label" for="new{{- .name -}}">{{ if i18n "new" }}{{ i18n "new" }}{{ else }}{{ "new" }}{{ end }} <span style="font-size: x-small;">(Getrennt durch Komma)</span></label>
<input type="text" name="new{{- .name -}}" id="new{{- .name -}}" value="" placeholder="{{ .eg }}" /> <input type="text" name="new{{- .name -}}" id="new{{- .name -}}" value="" placeholder="{{ .eg }}" />
{{ end }} {{ end }}
</div> </div>

View File

@ -39,7 +39,7 @@ function showInput(e) {
var when = form.elements['when'].value; var when = form.elements['when'].value;
// var covid = form.elements['newcovid'].value; // var covid = form.elements['newcovid'].value;
var price = form.elements['price'].value; var price = form.elements['price'].value;
var registeremail = form.elements['contact'].value; var contact = form.elements['contact'].value;
var events = check_checkboxes('events'); var events = check_checkboxes('events');
if (form.elements['newevents']) { var newevents = testor(form.elements['newevents'].value.split(',')); } if (form.elements['newevents']) { var newevents = testor(form.elements['newevents'].value.split(',')); }
var categories = check_checkboxes('categories'); var categories = check_checkboxes('categories');
@ -123,7 +123,7 @@ function showInput(e) {
display.innerHTML += "categories: \[" + ncategories + "]<br>"; display.innerHTML += "categories: \[" + ncategories + "]<br>";
} }
if (nevents != '') { if (nevents) {
display.innerHTML += "events: \[" + nevents + "]<br>"; display.innerHTML += "events: \[" + nevents + "]<br>";
} }
@ -136,8 +136,8 @@ function showInput(e) {
if (price) { if (price) {
display.innerHTML += "price: \"" + price + "\"<br>"; display.innerHTML += "price: \"" + price + "\"<br>";
} }
if (registeremail) { if (contact) {
display.innerHTML += "registeremail: \"" + registeremail + "\"<br>"; display.innerHTML += "contact: \"" + contact + "\"<br>";
} }
display.innerHTML += "---<br>"; display.innerHTML += "---<br>";
if (content) { if (content) {