small fixes

This commit is contained in:
teldra 2022-04-05 14:49:37 +02:00
parent 704980d4b8
commit ccab16c0b0
12 changed files with 61 additions and 50 deletions

View File

@ -1,8 +0,0 @@
---
title: "Neue Homepage"
date: "2022-02-27T14:00:00+02:00"
---
Wir präsentieren nun unsere neue Homepage.
[Wir](https://buha.rotce.de/bunteshaus/homepage/) bauen diese mit hugo, git und ohne php oder cms.

View File

@ -8,10 +8,15 @@
background: url(/images/logo_back_full.svg); background: url(/images/logo_back_full.svg);
} }
h1 {
margin-top: 1rem;
padding-top: 0;
margin-bottom: 0;
padding-bottom: 0;
}
main { main {
margin-top: 1rem; margin-top: 2rem;
} }
form label { form label {
@ -46,9 +51,7 @@ aside {
} }
h1 { h1 {
margin-top: 0rem;
margin-left: .5rem; margin-left: .5rem;
padding-left: 0;
} }
.right-sidebar { .right-sidebar {
@ -139,7 +142,7 @@ article h3 {
} }
#articlemeta { #articlemeta {
margin-bottom: 1.5rem; margin-bottom: 1rem;
} }
#articlemeta div:first-child { #articlemeta div:first-child {
@ -255,10 +258,7 @@ input, textarea {
display: none; display: none;
} }
h1 {
margin-top: .5rem;
margin-bottom: 1rem;
}
#headerinner { #headerinner {
padding: 10px; padding: 10px;

View File

@ -3,7 +3,7 @@
{{ if lower $name | i18n }} {{ if lower $name | i18n }}
{{ $name = lower $name | i18n }} {{ $name = lower $name | i18n }}
{{ end }} {{ end }}
{{ $name }} <h1>{{ $name }}</h1>
{{ end }} {{ end }}
{{ define "main" }} {{ define "main" }}

View File

@ -10,9 +10,7 @@
</header> </header>
<div class="content"> <div class="content">
<main> <main>
<h1> {{ block "title" . -}}{{- end }}
{{ block "title" . -}}{{- end }}
</h1>
{{ block "main" . -}}{{- end }} {{ block "main" . -}}{{- end }}
</main> </main>
<aside class="right-sidebar"> <aside class="right-sidebar">

View File

@ -3,7 +3,7 @@
{{ if lower $name | i18n }} {{ if lower $name | i18n }}
{{ $name = lower $name | i18n }} {{ $name = lower $name | i18n }}
{{ end }} {{ end }}
{{ $name }} <h1>{{ $name }}</h1>
{{ end }} {{ end }}
{{ define "main" }} {{ define "main" }}

View File

@ -3,7 +3,7 @@
{{ if lower $name | i18n }} {{ if lower $name | i18n }}
{{ $name = lower $name | i18n }} {{ $name = lower $name | i18n }}
{{ end }} {{ end }}
{{ $name }} <h1>{{ $name }}</h1>
{{ end }} {{ end }}
{{ define "main" }} {{ define "main" }}

View File

@ -8,7 +8,7 @@
{{ end }} {{ end }}
{{ $name = $name | humanize }} {{ $name = $name | humanize }}
{{ end }} {{ end }}
{{ $name }} <h1>{{ $name }}</h1>
{{- end -}} {{- end -}}
{{- define "main" -}} {{- define "main" -}}

View File

@ -1,5 +1,5 @@
{{ define "title" }} {{ define "title" }}
Orga <h1>Orga</h1>
{{ end }} {{ end }}
{{ define "main" }} {{ define "main" }}

View File

@ -45,6 +45,10 @@
{{ range .Params.tags }} {{ range .Params.tags }}
{{ $tags = $tags | append . }} {{ $tags = $tags | append . }}
{{ end }} {{ end }}
{{ $images := slice }}
{{ 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 $registeremail $price $price $featured $tags .Date .Lastmod .Title .Content }}
{{ $hash = delimit $hash ", " }} {{ $hash = delimit $hash ", " }}
{{ $hash = md5 $hash }} {{ $hash = md5 $hash }}
@ -56,18 +60,16 @@
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}} {{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}-{{ $hash }}</guid> <guid>{{ .Permalink }}-{{ $hash }}</guid>
<description> <description>
{{- $c := .Content -}} {{- $c := replace .Content "<img" "<img width=\"600\"" -}}
{{- $c := replace $c "<img" "<img width=\"600\"" -}}
{{- if $when -}} {{- if $when -}}
{{- $c = printf "<p><b>%s</b></p>%s" $when $c -}} {{- $c = printf "<p><b>%s</b></p>%s" $when $c -}}
{{- end -}} {{- end -}}
{{- $img := index (.Resources.ByType "image") 0 -}} {{- $img := index (.Resources.ByType "image") 0 -}}
{{- with $img -}} {{- with $img -}}
{{- $img := .Resize "640x" -}} {{- $img := .Resize "640x" -}}
{{- printf "<![CDATA[%s<img src=\"%s\" width=\"%d\" height=\"%d\" />]]>" $c $img.Permalink $img.Width $img.Height | safeHTML -}} {{- $c = printf "%s<img src=\"%s\" width=\"%d\" height=\"%d\" />" $c $img.Permalink $img.Width $img.Height -}}
{{- else -}}
{{- printf "<![CDATA[%s]]>" $c | safeHTML -}}
{{- end -}} {{- end -}}
{{- printf "<![CDATA[%s]]>" $c | safeHTML -}}
</description> </description>
</item> </item>

View File

@ -1,6 +1,3 @@
{{ define "title" }}
{{ end }}
{{ define "main" }} {{ define "main" }}
{{ if eq .Description "nottranslated" }} {{ if eq .Description "nottranslated" }}
{{ partial "orga/nottranslated.html" . }} {{ partial "orga/nottranslated.html" . }}

View File

@ -8,7 +8,7 @@
{{ end }} {{ end }}
{{ $name = $name | humanize }} {{ $name = $name | humanize }}
{{ end }} {{ end }}
{{ $name }} <h1>{{ $name }}</h1>
{{- end -}} {{- end -}}
{{- define "main" -}} {{- define "main" -}}

View File

@ -26,28 +26,50 @@
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ end }} {{ end }}
<div id="articlemeta" style="font-size: smaller;">
{{ $showmeta := "false" }}
{{ if and (ne .context.Params.when "") (ne .context.Params.when nil) }}
{{ $showmeta = "true" }}
{{ end }}
{{ if and (ne .context.Params.price "") (ne .context.Params.price nil) }}
{{ $showmeta = "true" }}
{{ end }}
{{ if and (ne .context.Params.registeremail "") (ne .context.Params.registeremail nil) }}
{{ $showmeta = "true" }}
{{ end }}
{{ if and (ne .context.Params.covid "") (ne .context.Params.covid nil) }}
{{ $showmeta = "true" }}
{{ end }}
{{ if and (ne .context.Params.contact "") (ne .context.Params.contact nil) }}
{{ $showmeta = "true" }}
{{ end }}
{{ if and (ne .context.Params.contact "") (ne .context.Params.contact nil) }}
{{ $showmeta = "true" }}
{{ end }}
{{ if eq $showmeta "true" }}
<div id="articlemeta" style="font-size: smaller;">
{{ if and (ne .context.Params.when "") (ne .context.Params.when nil) }} {{ if and (ne .context.Params.when "") (ne .context.Params.when nil) }}
<div>{{ .context.Params.when }}</div> <div>{{ .context.Params.when }}</div>
{{ end }} {{ end }}
{{ if and (ne .context.Params.price "") (ne .context.Params.price nil) (eq $price "true") }} {{ if and (ne .context.Params.price "") (ne .context.Params.price nil) (eq $price "true") }}
{{ if eq .context.Params.price "free" }} {{ if eq .context.Params.price "free" }}
<div>Der Eintritt ist frei.</div> <div>Der Eintritt ist frei.</div>
{{ else }} {{ else }}
<div>Eintritt: {{ .context.Params.price }}</div> <div>Eintritt: {{ .context.Params.price }}</div>
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ if and (ne .context.Params.registeremail "") (ne .context.Params.registeremail nil) (eq $registeremail "true")}} {{ if and (ne .context.Params.registeremail "") (ne .context.Params.registeremail nil) (eq $registeremail "true")}}
<div>Anmeldung unter {{ .context.Params.registeremail | markdownify }} erwünscht</div> <div>Anmeldung unter {{ .context.Params.registeremail | markdownify }} erwünscht</div>
{{ else if and (ne .context.Params.registeremail "") (ne .context.Params.registeremail nil) (eq $registeremail "false")}} {{ else if and (ne .context.Params.registeremail "") (ne .context.Params.registeremail nil) (eq $registeremail "false")}}
{{ $.context.Scratch.Set "meta" "true" }} {{ $.context.Scratch.Set "meta" "true" }}
{{ end }} {{ end }}
{{ if and (ne .context.Params.covid "") (ne .context.Params.covid nil) (eq $covid "true") }} {{ if and (ne .context.Params.covid "") (ne .context.Params.covid nil) (eq $covid "true") }}
<div>Es gilt die {{ .context.Params.covid }} Regel</div> <div>Es gilt die {{ .context.Params.covid }} Regel</div>
{{ end }} {{ end }}
{{ if and (ne .context.Params.contact "") (ne .context.Params.contact nil) (eq $contact "true") }} {{ if and (ne .context.Params.contact "") (ne .context.Params.contact nil) (eq $contact "true") }}
<div>Kontakt: <a href="mailto://{{ .context.Params.contact }}">{{ .context.Params.contact }}</a></div> <div>Kontakt: <a href="mailto://{{ .context.Params.contact }}">{{ .context.Params.contact }}</a></div>
{{ else if and (ne .context.Params.contact "") (ne .context.Params.contact nil) (eq $contact "false") }} {{ else if and (ne .context.Params.contact "") (ne .context.Params.contact nil) (eq $contact "false") }}
{{ $.context.Scratch.Set "meta" "true" }} {{ $.context.Scratch.Set "meta" "true" }}
{{ end }} {{ end }}
</div> </div>
{{ end }}