small fixes

This commit is contained in:
teldra 2022-04-09 01:36:05 +02:00
parent 085b19b10b
commit 5c60d66eb4
25 changed files with 120 additions and 88 deletions

View File

@ -9,8 +9,8 @@ description = "Buntes Haus e.V. - Soziokulturelles Zentrum in Celle - probably t
copyright = "bunteshaus.de"
[taxonomies]
category = 'categories'
tag = 'tags'
categories = 'categories'
tags = 'tags'
events = 'events'
about = 'about'
featured = 'featured'
@ -27,7 +27,7 @@ featured = 'featured'
[params]
# keywords for seo
keywords = "buntes haus celle, buntes haus, bunteshaus, celle, buntes haus e.V., www.bunteshaus.de, celle, punk, reggae, ska, konzerte, partys, soziokultur, soziokulturelles zentrum celle, elektro, electroe, jugendzentrum, celle, dum n bass, konzert, musik, politik, kultur, alternativ, cd kaserne celle, cd kaserne, plenum, celle, antifa, antira, anti akw, anti atom celle, veranstaltungen, infoladen, proberaum celle, archiv für neue soziale bewegungen in celle, hartz 4 IV beratung celle, skaten, graffiti, sprayen, kunst, fahrradwerkstatt, deka dance celle, dekadance, Revista, probably the friendliest Place on Earth"
debug = true
#do you want a contact page?
contact = true
@ -52,6 +52,8 @@ featured = 'featured'
# how long stays a featrued article on frontpage as featured (in weeks)
featured_expire = "1"
placeholder = "/images/no_article_pic.png"
# data for your imprint and contact page
[params.imprintdata]
tel = "(+) 49 5141 907 927"

View File

@ -9,3 +9,31 @@ todo buha.de
- dokumentiere, das artikel der alten homepage "lastmod" mit demgenau bis ungefaehren datum der damligen erstellung, im frontmatter haben sollten, wann sie erstellt wurden.
listen:
mit preview:
events
news
about
(jeweils auch nur text und/oder nur bild)
archive
misc
links
singlepage:
contact
newsletter
index
impressum
article
_default/list.html entscheided ueber home oder section
laedt dann partial/layout/$section
partial/layout/$section
definend dann titel, content, main
snippets dafuer

View File

@ -7,19 +7,5 @@
{{ end }}
{{ define "main" }}
{{ if site.Params.debug }}archive.html{{ end }}
<article>
{{ $prev := 3000}}
{{range where .Site.RegularPages "Type" "in" site.Params.searchSections }}
{{ $date := .Date }}
{{ if gt $prev ($date.Format "2006") }}
<h2>{{ $date.Format "2006" }}</h2>
{{end}}
<div class="frow">
<div class="underline" style="margin-right: 1em;"><a href="{{.Permalink}}">{{ .Title }}</a></div>
<div class="frow" style="margin-right: 1em;">{{- $date.Format "02" }}. {{ if $date.Format "Jan" | i18n }}{{ $date.Format "Jan" | i18n -}}{{- else -}} {{- $date.Format "Jan" -}}{{- end }} {{ $date.Format "2006 15:04" }}</div><br>
</div>
{{ $prev = $date.Format "2006"}}
{{end}}
</article>
{{ partial "layout/archive" . }}
{{ end }}

View File

@ -4,23 +4,24 @@
{{ block "css" . -}}{{- end }}
<body>
<div class="container">
<header>
{{ partial "structure/header" . }}
{{ partial "structure/submenu" . }}
</header>
<div class="content">
<main>
{{ block "title" . -}}{{- end }}
{{ block "main" . -}}{{- end }}
</main>
<aside class="right-sidebar">
{{ block "sidebar" . -}}{{- end }}
</aside>
</div>
{{ block "ab" . -}}{{- end }}
<footer>
{{- partial "structure/footer" . -}}
</footer>
<header>
{{ partialCached "structure/header" . }}
{{ partial "structure/submenu" . }}
</header>
<div class="content">
<main>
{{ block "title" . -}}{{- end }}
{{ block "content" . -}}{{- end }}
{{ block "main" . -}}{{- end }}
</main>
<aside class="right-sidebar">
{{ block "sidebar" . -}}{{- end }}
</aside>
</div>
{{ block "pagefooter" . -}}{{- end }}
<footer>
{{- partial "contentlayouts/footer" . -}}
</footer>
</div>
</body>
</html>

View File

@ -0,0 +1,12 @@
{{ define "title" }}
<h1>{{ if i18n .Section }}{{ i18n .Section }}{{ else }}{{ "Misc" }}{{ end }}</h1>
{{ end }}
{{ define "main" }}
{{ partial "debug" (dict "context" . ) }}
<article>
{{ range .Pages }}
<a href="{{ .Permalink }}">{{ .Name }}</a><br>
{{ end }}
</article>
{{ end }}

View File

@ -3,6 +3,7 @@
{{ end }}
{{ define "main" }}
{{ partial "debug" (dict "context" . ) }}
<article>
{{ range .Pages }}
<a href="{{ .Permalink }}">{{ .Name }}</a><br>

View File

@ -12,6 +12,7 @@
{{- end -}}
{{- define "main" -}}
{{ partial "debug" (dict "context" . ) }}
{{ if ne .Content "" }}
<article>
{{ .Content }}

View File

@ -6,8 +6,9 @@
<h1>{{ $name }}</h1>
{{ end }}
{{ define "main" }}
{{ partial "debug" (dict "context" . "caller" "single.html" )}}
<article>
{{ if eq .Type "tools" }}
<article>
{{ $tool := printf "misc/%s" .Params.tool }}
@ -20,8 +21,8 @@
{{ end }}
{{ end }}
{{ define "ab" }}
{{ if ne .Section "misc" }}
{{ define "pagefooter" }}
{{ if and (ne .Section "misc") (eq .Type "tools") }}
<div id="article_footer">
<div style="flex-grow: 1; flex-direction: column;">
<b>{{ if i18n "created" }}{{ i18n "created" }}{{ else }}{{ "Created" }}{{ end }}</b><br>

View File

@ -7,7 +7,7 @@
{{- end -}}
{{- define "main" -}}
{{ partial "debug" (dict "context" .) }}
{{ partial "debug" (dict "context" . "caller" "taxonomy.html") }}
{{ $title := lower .Title }}
{{- $paginator := slice -}}
{{ $partial := "contentlayouts/list.html" }}

View File

@ -1,53 +1,16 @@
{{ $visible := "false" }}
{{ $covid := "false" }}
{{ $when := "false" }}
{{ $price := "false" }}
{{ $contact := "false" }}
{{ $showmeta := "false" }}
{{ if and (ne .context.Params.when "") (ne .context.Params.when nil) }}
{{ $showmeta = "true" }}
{{ $when = true }}
{{ end }}
{{ if and (ne .context.Params.price "") (ne .context.Params.price nil) }}
{{ $showmeta = "true" }}
{{ if eq .context.Params.price "free" }}
{{ $price = true }}
{{ end }}
{{ end }}
{{ if and (ne .context.Params.contact "") (ne .context.Params.contact nil) (eq .type "article") }}
{{ $showmeta = "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 (eq $showmeta "true") (ne .type "contact") }}
<div id="articlemeta" style="font-size: smaller;">
{{ if eq $when true }}
<div>{{ .context.Params.when }}</div>
{{ end }}
{{ if eq $price true }}
{{ if eq .context.Params.price "free" }}
<div>{{ if i18n "freeentry" }}{{ i18n "freeentry" }}{{ else }}{{ "Free Entry" }}{{ end }}</div>
{{ else }}
<div>{{ if i18n "entry" }}{{ i18n "entry" }}{{ else }}{{ "Entry" }}{{ end }}: {{ .context.Params.price }}</div>
{{ end }}
{{ end }}
{{ if eq $contact true }}
<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 }}
{{ if eq $covid true }}
<div>Covid: {{ .context.Params.covid }}</div>
{{ end }}
</div>
{{ end }}
{{ $showmeta := "false" }}
{{ $metas := dict "when" .context.Params.when "price" .context.Params.price "contact" .context.Params.contact "covid"
.context.Params.covid }}
{{ if eq .type "list" }}
{{ $metas = dict "when" .context.Params.when "price" .context.Params.price }}
{{ end }}
{{ partial "contentlayouts/meta.html" $metas }}
{{ $small := "solo" }}
{{ $big := "solo" }}
{{ $img := "" }}
{{ $thumb := "" }}
{{ $placeholder := "/images/no_article_pic.png" }}
{{ $placeholder := site.Params.placeholder }}
{{ if ne .context.Section "misc"}}
{{ $img = resources.Get $placeholder }}
{{- $thumb = $img.Resize "1024x" }}
@ -85,4 +48,4 @@
{{ end }}
</div>
{{- end }}
</div>

View File

@ -0,0 +1,18 @@
<div id="articlemeta" style="font-size: smaller;">
{{ if .when }}
<div>{{ .when }}</div>
{{ end }}
{{ if .price }}
{{ if eq .price "free" }}
<div>{{ if i18n "freeentry" }}{{ i18n "freeentry" }}{{ else }}{{ "Free Entry" }}{{ end }}</div>
{{ else }}
<div>{{ if i18n "entry" }}{{ i18n "entry" }}{{ else }}{{ "Entry" }}{{ end }}: {{ .price }}</div>
{{ end }}
{{ end }}
{{ if .contact }}
<div>{{ if i18n "contact" }}{{ i18n "contact" }}{{ else }}{{ "Contact" }}{{ end }} {{ .contact | markdownify }} {{ if i18n "or" }}{{ i18n "or" }}{{ else }}{{ "or" }}{{ end }} {{ site.Params.imprintdata.tel }}</div>
{{ end }}
{{ if .covid }}
<div>Covid: {{ .covid }}</div>
{{ end }}
</div>

View File

@ -1,7 +1,8 @@
{{ if site.Params.debug }}
{{ if eq site.Params.debug true }}
Title: {{ .context.Title }}<br>
Name: {{ .context.Name }}<br>
context: {{ .context }}<br>
filename: {{ .filename }}<br>
section: {{ .context.Section }}<br>
type: {{ .context.Type }}<br>
{{ if .caller }}caller: {{ .caller }}<br>{{ end }}
kind: {{ .context.Kind }}
{{ end }}

View File

@ -0,0 +1,16 @@
{{ partial "debug" (dict "context" . "caller" "archive.html" )}}
<article>
{{ $prev := 3000}}
{{range where .Site.RegularPages "Type" "in" site.Params.searchSections }}
{{ $date := .Date }}
{{ if gt $prev ($date.Format "2006") }}
<h2>{{ $date.Format "2006" }}</h2>
{{end}}
<div class="frow">
<div class="underline" style="margin-right: 1em;"><a href="{{.Permalink}}">{{ .Title }}</a></div>
<div class="frow" style="margin-right: 1em;">{{- $date.Format "02" }}. {{ if $date.Format "Jan" | i18n }}{{ $date.Format "Jan" | i18n -}}{{- else -}} {{- $date.Format "Jan" -}}{{- end }} {{ $date.Format "2006 15:04" }}</div><br>
</div>
{{ $prev = $date.Format "2006"}}
{{end}}
</article>

View File

View File

View File

@ -1,6 +1,8 @@
{{ define "css" }}
<link rel="stylesheet" href="/css/visibleIf.css" type="text/css" />
{{ end }}
<article class="minmax">
<div style="flex-direction: row;">
{{ .Content }}