small fixes

This commit is contained in:
teldra 2022-04-04 12:44:19 +02:00
parent e2fbbddb0c
commit afe0a15b58
10 changed files with 21 additions and 20 deletions

View File

@ -11,7 +11,6 @@ copyright = "bunteshaus.de"
[taxonomies]
category = 'categories'
tag = 'tags'
news = 'news'
events = 'events'
about = 'about'
featured = 'featured'
@ -29,8 +28,8 @@ featured = 'featured'
# do you want an imprint?
imprint = true
mainSections = ['about','news','events']
mainMenu = ['about']
searchSections = ['news']
# data for your imprint and contact page
[params.imprintdata]

View File

@ -232,6 +232,11 @@ input, textarea {
border-radius: 15px;
}
.minmax {
width: auto;
max-width: auto;
}
/* Extra small devices (phones, 600px and down) */
@media only screen and (max-width: 600px) {...}
@ -294,7 +299,10 @@ input, textarea {
#article_footer {
margin-left: 2rem;
}
.minmax {
width: calc(100vw - 5rem);
max-width: 800px;
}
}
/* Medium devices (landscape tablets, 768px and up) */

View File

@ -9,7 +9,7 @@
{{ define "main" }}
<article>
{{ $prev := 3000}}
{{range where .Site.RegularPages "Type" "in" site.Params.mainSections }}
{{range where .Site.RegularPages "Type" "in" site.Params.searchSections }}
{{ $date := .Date }}
{{ if gt $prev ($date.Format "2006") }}
<h2>{{ $date.Format "2006" }}</h2>

View File

@ -17,9 +17,9 @@
{{- $paginator := slice -}}
{{ $what := printf ".Params.%s" $title }}
{{ if or (eq $title "about") (eq $title "featured") }}
{{- $paginator = .Paginate (where (where .Site.RegularPages "Type" "in" site.Params.mainSections) $what "eq" true) -}}
{{- $paginator = .Paginate (where (where .Site.RegularPages "Type" "in" site.Params.searchSections) $what "eq" true) -}}
{{ else if eq $title "events" }}
{{- $paginator = .Paginate (where (where .Site.RegularPages "Type" "in" site.Params.mainSections) ".Params.when" "ne" nil) -}}
{{- $paginator = .Paginate (where (where .Site.RegularPages "Type" "in" site.Params.searchSections) ".Params.when" "ne" nil) -}}
{{ else if eq $title "news" }}
{{- $paginator = .Paginate .Site.RegularPages -}}
{{ else }}

View File

@ -8,7 +8,7 @@
<!-- <a href="/news"><h2>{{ "news" | T }}</h2></a> -->
{{ $s := .Site.Params }}
{{ $meta := false }}
{{- $posts := where (where .Site.RegularPages "Permalink" "!=" .Permalink) "Type" "in" $s.mainSections }}
{{- $posts := where (where .Site.RegularPages "Permalink" "!=" .Permalink) "Type" "in" $s.searchSections }}
{{- $paginator := slice -}}
{{- $paginator = .Paginate $posts.ByDate.Reverse -}}
<!-- <a href="/featured"><h2>{{ "featured" | T }}</h2></a> -->
@ -18,7 +18,7 @@
{{ .Content }}
</article>
{{ end }}
{{ range first 3 (where (where .Site.RegularPages "Type" "in" site.Params.mainSections) ".Params.featured" "=" true) }}
{{ range first 3 (where (where .Site.RegularPages "Type" "in" site.Params.searchSections) ".Params.featured" "=" true) }}
{{ $article_age := sub now.Unix (int .Date.Unix) }}
{{ if lt $article_age "1209600" }}
{{ partial "structure/list_article.html" . }}
@ -31,7 +31,7 @@
{{ partial "structure/list_article.html" . }}
{{ end }}
{{- end }}
<div id="pagination_outer" style="display: flex; justify-content: flex-end;">
<div id="pagination_outer" style="display: flex; justify-content: center;">
{{ partial "structure/paginator" (dict "paginator" $paginator) }}
</div>

View File

@ -2,7 +2,7 @@
<link rel="stylesheet" href="/css/visibleIf.css" type="text/css" />
{{ end }}
<h1>Artikelgenerator</h1>
<article style="width: calc(100vw - 5rem); max-width: 800px;">
<article class="minmax">
<div style="flex-direction: row;">
{{ .Content }}
</div >

View File

@ -9,7 +9,7 @@
{{ $openname := printf "open%s" $in0 }}
{{- $finale := slice -}}
{{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
{{ $pages := where site.RegularPages "Type" "in" site.Params.searchSections }}
{{ if eq .name "tags" }}
{{ range $pages }}
{{- if .Params.tags -}}

View File

@ -1,4 +1,4 @@
{{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
{{ $pages := where site.RegularPages "Type" "in" site.Params.searchSections }}
{{- $tags := slice -}}
{{ range $pages }}
{{- if .Params.tags -}}

View File

@ -3,18 +3,12 @@
<img src="/images/logo.svg" alt="SVG mit img laden" width="auto" height="100%" >
</a>
<div id="menu">
{{ $visible := site.Params.mainMenu }}
{{- range site.Params.mainSections -}}
{{ $section := . }}
{{ range $visible }}
{{ if eq $section . }}
{{- range site.Params.mainMenu -}}
{{ $name := . | T }}
{{ if eq $name "" }}
{{ $name = . }}
{{ end }}
<a href="{{- . | relLangURL -}}">{{- $name | humanize -}}</a>
{{ end }}
{{ end }}
{{- end -}}
</div>

View File

@ -1,5 +1,5 @@
{{ $paginator := .paginator}}
<div id="pagination_outer" style="display: flex; justify-content: flex-end;">
<div id="pagination_outer" style="display: flex; justify-content: center;">
<div id="pagination">
<!-- Number of links either side of the current page. -->
{{ $adjacent_links := 2 }}