small fixes

This commit is contained in:
teldra 2022-05-06 14:39:53 +02:00
parent 22db8f8287
commit f09fe52c44
6 changed files with 63 additions and 47 deletions

View File

@ -21,3 +21,6 @@ Bier kostet 3 Euro, jedoch ist die Katzenmilch für euch umsonst. Bringt alle eu
1 2 3 4 Schnuppel 2 3 4 1 2 3 4 '--- 4 '-- 4 \ 4
```
![lala](1)
![lala](2)
![lala](3)

View File

@ -118,6 +118,6 @@ article .readmore {
flex-direction: column;
}
.height32 {
height: 32rem;
.index_section {
width: 100%;
}

View File

@ -36,6 +36,14 @@
}
.articleinner {
display: flex;
flex-direction: row;
flex-direction: column;
}
.index_section {
width: 45%;
}
.height32 {
min-height: 32rem;
}
}

View File

@ -7,9 +7,12 @@
<div class="dfjcc">{{ .Text }}</div>
</a>
{{- else -}}
{{ if .Page.Resources.ByType "image" }}
{{ $ignore := slice (.Page.Resources.GetMatch "banner*") }}
{{ $images := .Page.Resources.ByType "image" }}
{{ $images = complement $ignore $images }}
{{ if where (.Page.Resources.ByType "image") ".File.TranslationBaseName" "!=" "banner*" }}
{{ $nr := .Destination }}
{{- $pic := index (.Page.Resources.ByType "image") (sub (int $nr) 1) -}}
{{- $pic := index $images (sub (int $nr) 1) -}}
{{- $image := .Page.Resources.GetMatch (printf "%s" ($pic | safeURL)) -}}
{{ if ne $image nil }}
<div>

View File

@ -9,12 +9,12 @@
{{ end }}
<div style="display: flex; flex-wrap: wrap;">
{{ if gt (len $featured) 1 }}
<section class="index_section" style="width: 45%;">
<section class="index_section">
{{ partial "layout/article_list" (dict "context" . "pages" $featured "amount" "5" "title" "Featured") }}
</section>
{{ end }}
{{ if gt (len $posts) 1 }}
<section class="index_section" style="width: 45%;">
<section class="index_section">
{{ partial "layout/article_list" (dict "context" . "pages" $posts "amount" "5" "title" "News") }}
</section>
{{ end }}

View File

@ -14,51 +14,53 @@
{{ $pic = "multiple_medium" }}
{{ end }}
{{ end }}
{{ partial "snippets/article_metadata" $metas }}
<div class="articleinner">
{{ $i := .context.Resources.ByType "image" }}
{{- if .context.Content -}}
{{ if eq $type "list" }}
{{ if .context.Resources.Match "banner*" }}
<div class="articlepicture {{ $pic }}">
{{ range $i }}
{{ if hasPrefix .Name "banner" }}
{{ $img := . }}
{{ $thumb := $img.Resize "500x" }}
<img src="{{ $thumb.Permalink }}" />
{{- end }}
{{ partial "snippets/article_metadata" $metas }}
<div class="articleinner">
{{ $i := .context.Resources.ByType "image" }}
{{- if .context.Content -}}
{{ if eq $type "list" }}
{{ if .context.Resources.Match "banner*" }}
<div class="articlepicture {{ $pic }}">
{{ range $i }}
{{ if hasPrefix .Name "banner" }}
{{ $img := . }}
{{ $thumb := $img.Resize "500x" }}
<img src="{{ $thumb.Permalink }}" />
{{- end }}
</div>
{{- end }}
{{- end }}
</div>
{{- end }}
{{ end }}
<div class="articletext {{ $text }}">
{{ if eq .type "list" }}{{- .context.Summary -}}{{ else }}{{- .context.Content -}}{{ end }}
{{ if and .context.Truncated (eq .type "list") }}
<div class="readmore">{{- if i18n "readmore" -}}{{- i18n "readmore" -}}{{- else -}}{{- "readmore" -}}{{- end -}}..</div>
{{ end }}
<div class="articletext {{ $text }}">
{{ if eq .type "list" }}{{- .context.Summary -}}{{ else }}{{- .context.Content -}}{{ end }}
{{ if and .context.Truncated (eq .type "list") }}
<div class="readmore">{{- if i18n "readmore" -}}{{- i18n "readmore" -}}{{- else -}}{{- "readmore" -}}{{- end -}}..</div>
{{ end }}
</div>
{{ else }}
{{ if eq $type "article" }}
<div style="display:flex; flex-direction: column;">
{{ range $i }}
{{ if not (hasPrefix .Name "banner") }}
{{ $img := . }}
{{ $thumb := $img.Resize "500x" }}
<a href="{{ $img.Permalink }}"><img src="{{ $thumb.Permalink }}" /></a>
{{- end }}
{{- end }}
</div>
{{ else }}
{{ if eq $type "article" }}
<div style="display:flex; flex-direction: column;">
{{ range $i }}
{{ if not (hasPrefix .Name "banner") }}
{{ $img := . }}
{{ $thumb := $img.Resize "500x" }}
<a href="{{ $img.Permalink }}"><img src="{{ $thumb.Permalink }}" /></a>
{{- end }}
{{ range first 1 $i }}
{{ if not (hasPrefix .Name "banner") }}
{{ $img := . }}
{{ $thumb := $img.Resize "500x" }}
<img src="{{ $thumb.Permalink }}" />
{{- end }}
</div>
{{ else }}
{{ range first 1 $i }}
{{ if not (hasPrefix .Name "banner") }}
{{ $img := . }}
{{ $thumb := $img.Resize "500x" }}
<img src="{{ $thumb.Permalink }}" />
{{- end }}
{{- end }}
{{ end }}
{{- end }}
</div>
{{- end }}
{{ end }}
{{- end }}
</div>
{{ define "pagefooter" }}
{{ if and (eq .Kind "page") (or (eq .Section "news") (eq .Section "events") (eq .Section "about")) }}
<div class="article_footer">