forked from Bunteshaus/bunteshaus.de
restrukturierung fix
This commit is contained in:
parent
d4e092f8ba
commit
6e281c49f7
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
type: "misc"
|
||||
---
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
title: "Flyertext"
|
||||
date: 2021-06-22T23:00:00+02:00
|
||||
---
|
||||
**Der folgende Text muss auf jedem Flyer gedruckt werden:**
|
||||
|
||||
Das Bunte Haus ist kein Ort für Rassismus, Antisemitismus, Sexismus oder Diskriminierung aufgrund sexueller Orientierungen! Wenn ihr dumm angemacht, angefasst oder sonst wie belästigt werdet meldet euch an der Theke, der Kasse oder bei den Türsteher*innen. Ihr entscheidet selbst, wo eure Grenzen liegen!
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
title: "Generator"
|
||||
date: 2021-06-22T23:00:00+02:00
|
||||
description: "generator"
|
||||
type: "tools"
|
||||
tool: "generator"
|
||||
---
|
||||
Hier kannst du einen neuen Artikel generieren.
|
||||
|
||||
**Einträge mit * sind minimal erforderlich.**
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
title: "Nicht übersetzte Seiten"
|
||||
date: 2021-06-22T23:00:00+02:00
|
||||
description: "nottranslated"
|
||||
type: "tools"
|
||||
tool: "not_translated"
|
||||
---
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
title: "Partyunterlagen"
|
||||
date: 2021-06-22T23:00:00+02:00
|
||||
---
|
||||
## Wie geht ne Party?
|
||||
|
||||
- Ankommen
|
||||
- Aufbauen
|
||||
- Feiern
|
||||
- Auraeumen
|
|
@ -0,0 +1,11 @@
|
|||
{{ define "title" }}
|
||||
<h1>Orga</h1>
|
||||
{{ end }}
|
||||
|
||||
{{ define "main" }}
|
||||
<article>
|
||||
{{ range .Pages }}
|
||||
<a href="{{ .Permalink }}">{{ .Name }}</a><br>
|
||||
{{ end }}
|
||||
</article>
|
||||
{{ end }}
|
|
@ -0,0 +1,44 @@
|
|||
{{ define "title" }}
|
||||
{{ $name := .Title }}
|
||||
{{ if lower $name | i18n }}
|
||||
{{ $name = lower $name | i18n }}
|
||||
{{ end }}
|
||||
<h1>{{ $name }}</h1>
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ define "main" }}
|
||||
{{ if eq .Params.tool "not_translated" }}
|
||||
<article>
|
||||
{{ partial "misc/nottranslated.html" . }}
|
||||
</article>
|
||||
{{ else if eq .Params.tool "generator" }}
|
||||
{{ partial "misc/generator.html" . }}
|
||||
{{ else }}
|
||||
<article>
|
||||
{{ partial "contentlayouts/article.html" (dict "context" . "type" "article") }}
|
||||
</article>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "ab" }}
|
||||
{{ if ne .Section "misc" }}
|
||||
<div id="article_footer">
|
||||
<div style="flex-grow: 1; flex-direction: column;">
|
||||
<b>Verfasst am</b><br>
|
||||
{{ .Date | time.Format ":date_full" }}
|
||||
</div>
|
||||
{{ if ne .Date .Lastmod }}
|
||||
<div style="flex-grow: 1; flex-direction: column;">
|
||||
<b>zuletzt geändert</b><br>
|
||||
{{ .Lastmod | time.Format ":date_full" }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ define "sidebar" }}
|
||||
{{- partial "contentlayouts/menu.html" . }}
|
||||
{{ end }}
|
|
@ -0,0 +1,39 @@
|
|||
{{ define "css" }}
|
||||
<link rel="stylesheet" href="/css/visibleIf.css" type="text/css" />
|
||||
{{ end }}
|
||||
<article class="minmax">
|
||||
<div style="flex-direction: row;">
|
||||
{{ .Content }}
|
||||
</div >
|
||||
<noscript><p><b>Bitte aktiviere Javascript, sonst funktioniert der Generator nicht.</b></p></noscript>
|
||||
|
||||
<form id="myform" style="display: flex; flex-shrink: 0; flex-grow: 1; flex-direction: column; max-width: 950px; margin-top: 1rem;">
|
||||
{{ partial "misc/generator/partials/input_line" (dict "name" "title" "mandatory" "true") }}
|
||||
{{ partial "misc/generator/content" }}
|
||||
{{ partial "misc/generator/partials/categories_and_tags.html" (dict "name" "categories" "expanded" "true" "new" "false") }}
|
||||
{{ partial "misc/generator/partials/expand" (dict "id" "isevent" "name" "isevent" "translation" "aufklappen" ) }}
|
||||
<div style="flex-direction: column; margin-left: 2rem;" class="visibleIf" data-visibleif-rule="isevent == 'true'">
|
||||
{{ partial "misc/generator/partials/input_line" (dict "name" "when" "mandatory" "false" "eg" "Montag, 13. September 2022, 19Uhr") }}
|
||||
{{ partial "misc/generator/partials/input_line" (dict "name" "price" "mandatory" "false" "eg" "3€ or free") }}
|
||||
{{ partial "misc/generator/partials/input_line" (dict "name" "registeremail" "mandatory" "false" "eg" "info@bunteshaus.de") }}
|
||||
{{ partial "misc/generator/partials/categories_and_tags.html" (dict "name" "events" "new" "false") }}
|
||||
</div>
|
||||
{{ partial "misc/generator/partials/expand" (dict "id" "Verschiedenes" "name" "misc" "translation" "aufklappen" ) }}
|
||||
<div style="flex-direction: column; margin-left: 2rem;" class="visibleIf" data-visibleif-rule="misc == 'true'">
|
||||
{{ partial "misc/generator/partials/truefalse" (dict "name" "featured" "expanded" "true") }}
|
||||
{{ partial "misc/generator/partials/truefalse" (dict "name" "about" "expanded" "true") }}
|
||||
{{ partial "misc/generator/partials/categories_and_tags.html" (dict "name" "tags" "new" "true") }}
|
||||
<!-- {{ partial "misc/generator/partials/input_line" (dict "name" "covid" "mandatory" "false" "eg" "3G") }} -->
|
||||
</div>
|
||||
|
||||
<div id='display' class="result" style="white-space: pre; display: none; background: var(--background-body); padding: .6rem 0 1rem 1rem;">
|
||||
</div>
|
||||
|
||||
{{ partial "misc/generator/submit" }}
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
</article>
|
||||
<script defer language="javascript" type="text/javascript" src="{{ "/js/visibleIf.js" | urlize | relURL }}"></script>
|
||||
<script defer language="javascript" type="text/javascript" src="{{ "/js/generator.js" | urlize | relURL }}"></script>
|
|
@ -0,0 +1,2 @@
|
|||
<label for="content">{{ i18n "content" }}*</label>
|
||||
<textarea id="contentform" name="content" value="" placeholder=""></textarea>
|
|
@ -0,0 +1,60 @@
|
|||
{{ $in0 := .name }}
|
||||
{{ $name := .name }}
|
||||
{{ $id := .name }}
|
||||
{{ $newname := .name }}
|
||||
|
||||
{{ if i18n $name }}
|
||||
{{ $name = i18n $name }}
|
||||
{{ end }}
|
||||
|
||||
{{ $openname := printf "open%s" $in0 }}
|
||||
{{- $finale := slice -}}
|
||||
{{ $pages := where site.RegularPages "Type" "in" site.Params.searchSections }}
|
||||
{{ if eq .name "tags" }}
|
||||
{{ range $pages }}
|
||||
{{- if .Params.tags -}}
|
||||
{{- $finale = $finale | append .Params.tags -}}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ $id = $name }}
|
||||
{{ else }}
|
||||
{{ range $pages }}
|
||||
{{ range .Param $in0 }}
|
||||
{{- $finale = $finale | append . -}}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if ne .name "categories" }}
|
||||
{{ $cat := "categories" }}
|
||||
{{ if i18n $cat }}
|
||||
{{ $cat = i18n $cat }}
|
||||
{{ end }}
|
||||
{{ $id = printf "%s %s" $name $cat }}
|
||||
{{ else }}
|
||||
{{ $id = $name }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- $finale = $finale | uniq -}}
|
||||
{{ if eq .expanded "true" }}
|
||||
<div style="flex-direction: column;">
|
||||
{{ $id }}{{- if eq .mandatory "true" -}}*{{- end -}}
|
||||
{{ else }}
|
||||
{{ partial "misc/generator/partials/expand" (dict "id" $id "name" $openname ) }}
|
||||
<div style="flex-direction: column;" class="visibleIf" data-visibleif-rule="{{- $openname }} == 'true'">
|
||||
{{ end }}
|
||||
<fieldset style="max-width: 58.5rem; padding: 0; margin: 0; border-style: none;" id="{{ $in0 }}" name="{{ $in0 }}">
|
||||
{{ range sort $finale }}
|
||||
{{ $n := . | i18n }}
|
||||
{{ if not $n }}
|
||||
{{ $n = . }}
|
||||
{{ end }}
|
||||
<div style="display: flex; flex-direction: row;">
|
||||
<input type="checkbox" name="{{ $in0 }}" id="{{ $in0 }}-cat" value="{{ $n }}"><label style="width: 20rem;" for="{{ $in0 }}-cat">{{ strings.FirstUpper $n }}</label>
|
||||
</div>
|
||||
{{ end }}
|
||||
</fieldset>
|
||||
{{ if eq .new "true" }}
|
||||
{{ partial "misc/generator/partials/input_line" (dict "name" $in0) }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
<div style="display:flex; flex-direction: row;">{{ if i18n .id }}{{ i18n .id }}{{ else }}{{ .id }}{{ end }}<input type="checkbox" name="{{ .name }}" value="true" style="font-size: smaller;" /> <div style="font-size: smaller;">{{ if i18n "expand" }}{{ i18n "expand" }}{{ else }}{{ "expand" }}{{ end }}{{- if eq .mandatory "true" -}}*{{- end -}}</div></div>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
<label id="label" for="new{{- .name -}}">{{ if i18n .name }}{{ i18n .name }}{{ else }}{{ .name }}{{ end }}{{- if eq .mandatory "true" -}}*{{- end -}}</label>
|
||||
<input type="text" name="new{{- .name -}}" id="new{{- .name -}}" value="" placeholder="{{ .eg }}" />
|
|
@ -0,0 +1,5 @@
|
|||
<fieldset id="{{ .name }}" name="{{ .name }}" style="padding: 0; margin: 0; border-style: none;">
|
||||
<div style="display: flex; flex-direction: row;">{{ if i18n .name }}{{ i18n .name }}{{ else }}{{ .name }}{{ end }}{{- if eq .mandatory "true" -}}*{{- end -}}
|
||||
<input type="checkbox" name="{{ .name }}" id="{{ .name }}" value="{{ .name }}" />
|
||||
</div>
|
||||
</fieldset>
|
|
@ -0,0 +1,3 @@
|
|||
<div class="frow">
|
||||
<input class="f" type="submit" value="{{ i18n "generate" }}" onclick="showInput(event);" />
|
||||
</div>
|
|
@ -0,0 +1,25 @@
|
|||
{{ $pages := where site.RegularPages "Type" "in" site.Params.searchSections }}
|
||||
{{- $tags := slice -}}
|
||||
{{ range $pages }}
|
||||
{{- if .Params.tags -}}
|
||||
{{- $tags = $tags | append .Params.tags -}}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- $tags := $tags | uniq -}}
|
||||
{{ partial "misc/generator/partials/expand" (dict "id" "tags" "name" "opentag" "translation" "aufklappen" ) }}
|
||||
<div style="flex-direction: column;" class="visibleIf" data-visibleif-rule="opentag == 'true'">
|
||||
<fieldset style="display: flex; flex-direction: column; max-width: 58.5rem;" id="tags" name="tags">
|
||||
{{ range sort $tags }}
|
||||
{{ $n := . | i18n }}
|
||||
{{ if not $n }}
|
||||
{{ $n = . }}
|
||||
{{ end }}
|
||||
<div style="display: flex; flex-direction: row;">
|
||||
<input type="checkbox" name="tags" id="{{ . }}-tag" value="{{ . }}"><label style="width: 20rem;" for="{{ . }}-tag">{{ strings.FirstUpper $n }}</label>
|
||||
</div>
|
||||
{{ end }}
|
||||
</fieldset>
|
||||
|
||||
<label style="width: 12vw;" for="newtag">{{ i18n "new" }}</label>
|
||||
<input style="max-width: 58.5rem;" type="text" class="f" name="newtag" id="newtag" placeholder="" />
|
||||
</div>
|
|
@ -0,0 +1,25 @@
|
|||
{{ $l1 := slice }}
|
||||
{{ $l2 := slice }}
|
||||
{{ range $.Site.Home.Translations }}
|
||||
{{ $l1 = $l1 | append .Language }}
|
||||
{{ end }}
|
||||
|
||||
{{ $all_lang := $.Site.Home.Translations }}
|
||||
{{ range site.RegularPages }}
|
||||
{{ $missing := slice}}
|
||||
{{ if .Translations }}
|
||||
{{ range .Translations }}
|
||||
{{ $l2 = $l2 | append .Language }}
|
||||
{{ end }}
|
||||
{{ $final := $l1 | complement $l2 }}
|
||||
{{ range $final }}
|
||||
{{ $missing = $missing | append . }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ $missing = $missing | append "all translations" }}
|
||||
{{ end }}
|
||||
{{ if $missing }}
|
||||
<a href="{{ .Permalink}}" style="margin-top: 1rem;">{{ .Name }}:</a>
|
||||
<div>missing: {{ index $missing 0 }}</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
Loading…
Reference in New Issue