Umstrukturierung

This commit is contained in:
teldra 2022-04-06 00:02:18 +02:00
parent 3093404c51
commit d4e092f8ba
19 changed files with 14 additions and 222 deletions

View File

@ -1,3 +0,0 @@
---
type: "orga"
---

View File

@ -1,7 +0,0 @@
---
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!

View File

@ -1,9 +0,0 @@
---
title: "Generator"
date: 2021-06-22T23:00:00+02:00
description: "generator"
type: "tools"
---
Hier kannst du einen neuen Artikel generieren.
**Einträge mit * sind minimal erforderlich.**

View File

@ -1,6 +0,0 @@
---
title: "Nicht übersetzte Seiten"
date: 2021-06-22T23:00:00+02:00
description: "nottranslated"
type: "tools"
---

View File

@ -1,10 +0,0 @@
---
title: "Partyunterlagen"
date: 2021-06-22T23:00:00+02:00
---
## Wie geht ne Party?
- Ankommen
- Aufbauen
- Feiern
- Auraeumen

View File

@ -10,6 +10,6 @@
{{- $pic := index (.Resources.ByType "image") 0 -}}
<article>
{{ partial "contentlayouts/article.html" (dict "context" . "type" "article") }}
{{ partial "contentlayouts/article.html" (dict "context" . "type" "contact") }}
</article>
{{ end }}
{{ end }}

View File

@ -1,11 +0,0 @@
{{ define "title" }}
<h1>Orga</h1>
{{ end }}
{{ define "main" }}
<article>
{{ range .Pages }}
<a href="{{ .Permalink }}">{{ .Name }}</a><br>
{{ end }}
</article>
{{ end }}

View File

@ -8,10 +8,12 @@
{{ define "main" }}
{{ if eq .Description "nottranslated" }}
{{ partial "orga/nottranslated.html" . }}
{{ else if eq .Description "generator" }}
{{ partial "orga/generator.html" . }}
{{ 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") }}
@ -20,7 +22,7 @@
{{ end }}
{{ define "ab" }}
{{ if ne .Section "orga" }}
{{ if ne .Section "misc" }}
<div id="article_footer">
<div style="flex-grow: 1; flex-direction: column;">
<b>Verfasst am</b><br>

View File

@ -28,7 +28,7 @@
{{ $contact = true }}
{{ end }}
{{ if eq $showmeta "true" }}
{{ if and (eq $showmeta "true") (ne .type "contact") }}
<div id="articlemeta" style="font-size: smaller;">
{{ if eq $when true }}
<div>{{ .context.Params.when }}</div>
@ -72,12 +72,13 @@
{{ end }}
<div id="articleinner">
<div id="articlepicture" class="{{ $small }} borderrad25">
{{ if eq .type "article" }}<a href="{{- $img.Permalink -}}">{{ end }}
{{ if ne .type "list" }}<a href="{{- $img.Permalink -}}">{{ end }}
<img src="{{- $thumb.Permalink -}}" class="borderrad25" />
{{ if eq .type "article" }}</a>{{ end }}
{{ if ne .type "list" }}</a>{{ end }}
</div>
{{- if or .context.Content .context.Summary -}}
<div id="articletext" class="{{ $big }}">
{{ if eq .type "contact" }}{{ partial "contact.html" }}{{ end }}
{{ if eq .type "list" }}{{- .context.Summary -}}{{ else }}{{- .context.Content -}}{{ end }}
{{ if and .context.Truncated (eq .type "list") }}
<div id="readmore">{{- i18n "readmore" -}}..</div>

View File

@ -1,39 +0,0 @@
{{ 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 "orga/generator/partials/input_line" (dict "name" "title" "mandatory" "true") }}
{{ partial "orga/generator/content" }}
{{ partial "orga/generator/partials/categories_and_tags.html" (dict "name" "categories" "expanded" "true" "new" "false") }}
{{ partial "orga/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 "orga/generator/partials/input_line" (dict "name" "when" "mandatory" "false" "eg" "Montag, 13. September 2022, 19Uhr") }}
{{ partial "orga/generator/partials/input_line" (dict "name" "price" "mandatory" "false" "eg" "3€ or free") }}
{{ partial "orga/generator/partials/input_line" (dict "name" "registeremail" "mandatory" "false" "eg" "info@bunteshaus.de") }}
{{ partial "orga/generator/partials/categories_and_tags.html" (dict "name" "events" "new" "false") }}
</div>
{{ partial "orga/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 "orga/generator/partials/truefalse" (dict "name" "featured" "expanded" "true") }}
{{ partial "orga/generator/partials/truefalse" (dict "name" "about" "expanded" "true") }}
{{ partial "orga/generator/partials/categories_and_tags.html" (dict "name" "tags" "new" "true") }}
<!-- {{ partial "orga/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 "orga/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>

View File

@ -1,2 +0,0 @@
<label for="content">{{ i18n "content" }}*</label>
<textarea id="contentform" name="content" value="" placeholder=""></textarea>

View File

@ -1,60 +0,0 @@
{{ $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 "orga/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 "orga/generator/partials/input_line" (dict "name" $in0) }}
{{ end }}
</div>

View File

@ -1,2 +0,0 @@
<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>

View File

@ -1,2 +0,0 @@
<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 }}" />

View File

@ -1,5 +0,0 @@
<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>

View File

@ -1,3 +0,0 @@
<div class="frow">
<input class="f" type="submit" value="{{ i18n "generate" }}" onclick="showInput(event);" />
</div>

View File

@ -1,25 +0,0 @@
{{ $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 "orga/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>

View File

@ -1,27 +0,0 @@
<article>
{{ $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 }}
</article>

View File

@ -17,7 +17,7 @@
{{ end }}
<a href="{{- "archive" | absLangURL -}}">{{- $archive | strings.FirstUpper -}}</a><br><br>
{{- end -}}
<a href="{{- "orga" | absLangURL -}}">Orga</a><br><br>
<a href="{{- "misc" | absLangURL -}}">Misc</a><br><br>
</div>
<div class="infobox">