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);
}
h1 {
margin-top: 1rem;
padding-top: 0;
margin-bottom: 0;
padding-bottom: 0;
}
main {
margin-top: 1rem;
margin-top: 2rem;
}
form label {
@ -46,9 +51,7 @@ aside {
}
h1 {
margin-top: 0rem;
margin-left: .5rem;
padding-left: 0;
}
.right-sidebar {
@ -139,7 +142,7 @@ article h3 {
}
#articlemeta {
margin-bottom: 1.5rem;
margin-bottom: 1rem;
}
#articlemeta div:first-child {
@ -255,10 +258,7 @@ input, textarea {
display: none;
}
h1 {
margin-top: .5rem;
margin-bottom: 1rem;
}
#headerinner {
padding: 10px;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -26,28 +26,50 @@
{{ 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) }}
<div>{{ .context.Params.when }}</div>
{{ 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" }}
<div>Der Eintritt ist frei.</div>
{{ else }}
<div>Eintritt: {{ .context.Params.price }}</div>
{{ end }}
{{ end }}
{{ if and (ne .context.Params.registeremail "") (ne .context.Params.registeremail nil) (eq $registeremail "true")}}
<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")}}
{{ $.context.Scratch.Set "meta" "true" }}
{{ end }}
{{ if and (ne .context.Params.covid "") (ne .context.Params.covid nil) (eq $covid "true") }}
<div>Es gilt die {{ .context.Params.covid }} Regel</div>
{{ end }}
{{ 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>
{{ else if and (ne .context.Params.contact "") (ne .context.Params.contact nil) (eq $contact "false") }}
{{ $.context.Scratch.Set "meta" "true" }}
{{ end }}
</div>
{{ if and (ne .context.Params.registeremail "") (ne .context.Params.registeremail nil) (eq $registeremail "true")}}
<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")}}
{{ $.context.Scratch.Set "meta" "true" }}
{{ end }}
{{ if and (ne .context.Params.covid "") (ne .context.Params.covid nil) (eq $covid "true") }}
<div>Es gilt die {{ .context.Params.covid }} Regel</div>
{{ end }}
{{ 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>
{{ else if and (ne .context.Params.contact "") (ne .context.Params.contact nil) (eq $contact "false") }}
{{ $.context.Scratch.Set "meta" "true" }}
{{ end }}
</div>
{{ end }}