From 674ab15d4c11a93527d3b6d711eda62f234d3fbe Mon Sep 17 00:00:00 2001 From: teldra Date: Mon, 4 Apr 2022 03:35:13 +0200 Subject: [PATCH] small fixes --- content/news/29-11-2022-tanzabend/index.de.md | 13 +------ themes/buha/assets/css/layout.css | 9 ++++- themes/buha/layouts/_default/list.html | 15 +++++++- themes/buha/layouts/_default/taxonomy.html | 4 +- themes/buha/layouts/partials/list/misc.html | 18 --------- .../buha/layouts/partials/single/article.html | 2 +- .../partials/structure/article_meta.html | 38 ++++++++++++------- .../partials/structure/list_article.html | 13 ++++--- .../layouts/partials/structure/paginator.html | 2 + 9 files changed, 59 insertions(+), 55 deletions(-) delete mode 100644 themes/buha/layouts/partials/list/misc.html diff --git a/content/news/29-11-2022-tanzabend/index.de.md b/content/news/29-11-2022-tanzabend/index.de.md index fb87c002..52567f02 100644 --- a/content/news/29-11-2022-tanzabend/index.de.md +++ b/content/news/29-11-2022-tanzabend/index.de.md @@ -4,20 +4,11 @@ date: 2022-04-03T04:28:51+02:00 categories: ["Pressemitteilung"] featured: true covid: "3g" -contact: "schnbuuel@schnabel" -price: "3€" +registeremail: "dsd@asdasd.dw" +price: "free" draft: false --- Lorem ipsum occaecat culpa exercitation et deserunt laborum nisi ut in ex laborum pariatur ea officia commodo sit incididunt aliquip excepteur. Exercitation velit eiusmod dolore dolor ea proident laboris culpa fugiat culpa anim cillum commodo ut amet cupidatat eu consectetur ut cillum occaecat sed incididunt in voluptate in amet amet incididunt consequat ex magna uis duis reprehenderit ex id anim duis ad ad mollit nisi dolor tempor ex voluptate non adipisicing voluptate nulla ut ut cillum sunt -in irure irure ut irure voluptate occaecat est ut dolor non dolor consectetur qui dolor dolor dolor id dolor sed enim et ad est excepteur cupidatat aliqua fugiat nulla nisi cillum dolore ad ullamco - -mollit consectetur dolore dolore labore mollit in magna deserunt quis laboris cillum ut cillum occaecat non esse deserunt aute eiusmod ut tempor exercitation aliquip cillum nulla laborum sed aliquip quis dolore in sed adipisicing nulla exercitation excepteur dolore in veniam dolor do esse non consectetur non do aliquip elit voluptate in ex irure sed eiusmod dolor sunt proident esse proident eiusmod voluptate anim eiusmod aliqua fugiat ea commodo esse pariatur ad cillum ad consequat culpa dolore sit anim veniam ea anim non nostrud sed proident ea dolor sunt non deserunt adipisicing laborum dolore amet amet aute ex anim duis nisi est aliquip ad adipisicing exercitation qui voluptate non velit culpa reprehenderit dolore dolore quis esse veniam elit ut exercitation nulla velit dolor commodo mollit culpa minim dolore ea adipisicing pariatur in ullamco aliquip est ut commodo ad ut sed voluptate exercitation non sit proident amet sit aute veniam pariatur commodo ex. - -Sed ad. - -Officia eu do consectetur reprehenderit esse aliquip sed adipisicing consectetur adipisicing aliqua in ut eu id dolor labore occaecat id dolore laboris laborum sint dolore nulla consequat duis duis adipisicing elit enim aute laboris. - -Lorem ipsum in cillum ut consectetur sit velit sint dolore elit cillum exercitation reprehenderit nulla aliquip in est in laborum magna eiusmod velit minim ut officia est non culpa cupidatat aute excepteur dolore enim et ut do id mollit culpa officia anim et consequat ex nisi officia fugiat nostrud excepteur duis in labore velit sint consectetur et dolor proident est magna ut deserunt labore cillum ullamco laborum sunt consequat eiusmod magna aliquip eu ut id magna quis voluptate esse in ut velit sunt dolore ut voluptate ullamco aliquip sed reprehenderit ut dolore duis enim laboris officia nulla in officia culpa laborum adipisicing minim proident consectetur sunt sunt duis ut labore consequat aliqua esse in nulla sint esse consectetur sit proident id dolore veniam dolore ea et consectetur pariatur et sit dolor ut pariatur esse occaecat ut reprehenderit esse officia sint eu dolor quis nisi aliqua aliquip in in ut non officia cupidatat aute in magna ut minim ut ut est aute magna esse ad irure eiusmod tempor anim tempor labore pariatur amet anim sit ullamco est do minim anim exercitation. \ No newline at end of file diff --git a/themes/buha/assets/css/layout.css b/themes/buha/assets/css/layout.css index 0855703d..186a782a 100644 --- a/themes/buha/assets/css/layout.css +++ b/themes/buha/assets/css/layout.css @@ -140,7 +140,14 @@ article h3 { } #articlemeta { - margin-bottom: 1rem; + margin-top: .5rem; + margin-bottom: .5rem; +} + + +#articlemeta div:first-child { + font-size: medium; + font-weight: bold; } #articlecontent { diff --git a/themes/buha/layouts/_default/list.html b/themes/buha/layouts/_default/list.html index fda86a9a..92eb7804 100644 --- a/themes/buha/layouts/_default/list.html +++ b/themes/buha/layouts/_default/list.html @@ -12,7 +12,20 @@ {{- end -}} {{- define "main" -}} - {{ partial "list/misc.html" . }} + {{ $s := .Site.Params }} + {{- $paginator := slice -}} + {{- $paginator = .Paginate .Data.Pages.ByDate.Reverse -}} + {{ if eq $paginator.PageNumber 1 }} + {{ if ne .Content "" }} +
+ {{ .Content }} +
+ {{ end }} + {{ end }} + {{- range first 5 $paginator.Pages -}} + {{ partial "structure/list_article.html" . }} + {{- end }} + {{ partial "structure/paginator" (dict "paginator" $paginator) }} {{- end -}} {{ define "sidebar" }} diff --git a/themes/buha/layouts/_default/taxonomy.html b/themes/buha/layouts/_default/taxonomy.html index 39ebe765..76760172 100644 --- a/themes/buha/layouts/_default/taxonomy.html +++ b/themes/buha/layouts/_default/taxonomy.html @@ -35,9 +35,7 @@ {{- range first 5 $paginator.Pages -}} {{ partial "structure/list_article" . }} {{- end }} -
- {{ partial "structure/paginator" (dict "paginator" $paginator) }} -
+ {{ partial "structure/paginator" (dict "paginator" $paginator) }} {{- end -}} {{ define "sidebar" }} diff --git a/themes/buha/layouts/partials/list/misc.html b/themes/buha/layouts/partials/list/misc.html deleted file mode 100644 index f390a955..00000000 --- a/themes/buha/layouts/partials/list/misc.html +++ /dev/null @@ -1,18 +0,0 @@ - {{ $s := .Site.Params }} - {{- $paginator := slice -}} - {{- $paginator = .Paginate .RegularPagesRecursive.ByDate.Reverse -}} - {{ if eq $paginator.PageNumber 1 }} - {{ if ne .Content "" }} -
- {{ .Content }} -
- {{ end }} - {{ end }} - {{- range first 5 $paginator.Pages -}} - {{ partial "structure/list_article.html" . }} - - {{- end }} - -
- {{ partial "structure/paginator" (dict "paginator" $paginator) }} -
diff --git a/themes/buha/layouts/partials/single/article.html b/themes/buha/layouts/partials/single/article.html index e27cfbe9..66671310 100644 --- a/themes/buha/layouts/partials/single/article.html +++ b/themes/buha/layouts/partials/single/article.html @@ -3,7 +3,7 @@
- {{ partial "structure/article_meta" (dict "context" .) }} + {{ partial "structure/article_meta" (dict "context" . "visible" "all" ) }}
{{- if .Resources.ByType "image" -}} diff --git a/themes/buha/layouts/partials/structure/article_meta.html b/themes/buha/layouts/partials/structure/article_meta.html index b69356d7..a41b0c5b 100644 --- a/themes/buha/layouts/partials/structure/article_meta.html +++ b/themes/buha/layouts/partials/structure/article_meta.html @@ -1,28 +1,34 @@ -{{ $invis := "none" }} -{{ $covid := "true" }} -{{ $price := "true" }} -{{ $contact := "true" }} -{{ $registeremail := "true" }} -{{ if .invis }} - {{ $invis = split .invis "," }} - {{ range $invis }} +{{ $visible := "none" }} +{{ $covid := "false" }} +{{ $price := "false" }} +{{ $contact := "false" }} +{{ $registeremail := "false" }} +{{ if .visible }} + {{ $visible = split .visible "," }} + {{ range $visible }} {{ if eq . "covid" }} - {{ $covid = "false" }} + {{ $covid = "true" }} {{ end }} {{ if eq . "price" }} - {{ $price = "false" }} + {{ $price = "true" }} {{ end }} {{ if eq . "contact" }} - {{ $contact = "false" }} + {{ $contact = "true" }} {{ end }} {{ if eq . "registeremail" }} - {{ $registeremail = "false" }} + {{ $registeremail = "true" }} + {{ end }} + {{ if eq . "all" }} + {{ $contact = "true" }} + {{ $price = "true" }} + {{ $covid = "true" }} + {{ $registeremail = "true" }} {{ end }} {{ end }} {{ end }}
{{ if and (ne .context.Params.when "") (ne .context.Params.when nil) }} -
{{ .context.Params.when }}
+
{{ .context.Params.when }}
{{ end }} {{ if and (ne .context.Params.price "") (ne .context.Params.price nil) (eq $price "true") }} {{ if eq .context.Params.price "free" }} @@ -33,11 +39,15 @@ {{ end }} {{ if and (ne .context.Params.registeremail "") (ne .context.Params.registeremail nil) (eq $registeremail "true")}}
Anmeldung unter {{ .context.Params.registeremail | markdownify }} erwünscht
+ {{ 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") }}
Es gilt die {{ .context.Params.covid }} Regel
{{ end }} {{ if and (ne .context.Params.contact "") (ne .context.Params.contact nil) (eq $contact "true") }} + {{ else if and (ne .context.Params.contact "") (ne .context.Params.contact nil) (eq $contact "false") }} + {{ $.context.Scratch.Set "meta" "true" }} {{ end }} -
\ No newline at end of file +
diff --git a/themes/buha/layouts/partials/structure/list_article.html b/themes/buha/layouts/partials/structure/list_article.html index 6f3ffb5a..0664dde2 100644 --- a/themes/buha/layouts/partials/structure/list_article.html +++ b/themes/buha/layouts/partials/structure/list_article.html @@ -4,7 +4,8 @@

{{- .Title -}}

- {{ partial "structure/article_meta" (dict "context" . "invis" "covid,registeremail,contact") }} + {{ $.Scratch.Set "meta" "false" }} + {{ partial "structure/article_meta" (dict "context" . "visible" "price") }}
{{- if .Resources.ByType "image" -}} @@ -21,12 +22,12 @@
{{- end }}
- {{- if .Params.description -}} - {{- .Params.description -}} - {{- else -}} + {{- if .Truncated -}} {{- .Summary -}} + {{- else -}} + {{- .Content -}} {{- end }} - {{ if .Truncated }} + {{ if or .Truncated (eq ($.Scratch.Get "meta") "true") }}
{{- i18n "readmore" -}}..
{{ end }}
@@ -34,4 +35,4 @@
-{{ end }} \ No newline at end of file +{{ end }} diff --git a/themes/buha/layouts/partials/structure/paginator.html b/themes/buha/layouts/partials/structure/paginator.html index dc1c8e57..bfb5bbd4 100644 --- a/themes/buha/layouts/partials/structure/paginator.html +++ b/themes/buha/layouts/partials/structure/paginator.html @@ -1,4 +1,5 @@ {{ $paginator := .paginator}} +
\ No newline at end of file