small fixes

This commit is contained in:
teldra 2022-06-15 02:08:16 +02:00
parent 1452ba6c33
commit 6beb706e58
5 changed files with 4 additions and 93 deletions

View File

@ -20,7 +20,7 @@
{{- $permalink := "" -}}
{{- if ne $image nil -}}
{{- $permalink = $image.RelPermalink -}}
{{- $permalink = $image.Permalink -}}
{{- else -}}
{{- $image = imageConfig (printf "static/%s" (.Destination | safeURL)) -}}
{{- $permalink = (printf "/%s" (.Destination | safeURL)) -}}

View File

@ -1,89 +0,0 @@
{{ if and .amount .pages }}
{{ $amount := .amount }}
{{ $type := .type }}
{{ $title := .title }}
{{ $pages := .pages.ByLastmod.Reverse }}
{{ $p := .pages.ByLastmod.Reverse }}
{{- $paginator := .context.Paginate $pages -}}
{{ if .paginate }}
{{ $p = $paginator.Pages }}
{{ end }}
{{ if eq $paginator.PageNumber 1 }}
{{ if .content }}
{{ partial "snippets/content" (dict "content" .content) }}
{{ end }}
{{ end }}
{{- if gt (len $pages) 0 -}}
<section class="list">
{{ if .title }}<h2>{{ .title }}</h2>{{ end }}
{{- $home := .context.Kind }}
{{- range first $amount $p -}}
{{ $px := string "400" }}
{{ $fill := string (printf "1280x%s smart" $px) }}
{{ $banner := slice }}
{{ $image := slice }}
{{ $thumb := "" }}
{{ if .Resources.GetMatch "banner*" }}
{{ $banner = slice (.Resources.GetMatch "banner*") }}
{{ end }}
{{ if .Resources.ByType "image" }}
{{ $image = .Resources.ByType "image" }}
{{ end }}
{{ $image = (index (complement $banner $image) 0) }}
{{ $banner = (index $banner 0) }}
{{ $thumb = $banner.Fill $fill }}
{{ $bg_pic := "" }}
<article class="article_list_section">
<a href="{{- .Permalink -}}" class="no_underline">
<div class="articlecontent">
{{ $metas := dict "when" .Params.when "price" .Params.price }}
{{ $thumb := "" }}
{{ $banner := slice }}
{{ if (.Resources.GetMatch "banner*") }}
{{ if $banner = slice (.Resources.GetMatch "banner*") }}
{{ $banner = (index $banner 0) }}
{{ $thumb = $banner}}
{{ $thumb = $banner.Fill $fill }}
{{ $bg_pic = safeCSS (printf "background: url(%s)" $thumb.Permalink) }}
{{ end }}
{{ end }}
<div style="background-color: var(--background-alt); {{ $bg_pic }}; background-position: top; background-repeat: no-repeat; {{ safeCSS (printf "min-height: %spx" (string $px)) }}; box-shadow: inset 0px 11px 8px -10px #222, inset 0px -11px 8px -10px #222; margin-bottom: 4rem;">
<div style="display: flex; flex-direction: column;">
<div style="margin-top: 5rem;" class="article_content article_content articletitle">
{{ $cat := "" }}
{{ if .Page.Params.events }}
{{ $cat = index .Page.Params.events 0 }}
{{ $cat = printf "%s: " $cat }}
{{ end }}
{{ if eq $type "index" }}
<h3>{{ $cat -}}{{- .Title -}}</h3>
{{ else }}
<h2>{{ $cat -}}{{- .Title -}}</h2>
{{ end }}
{{ partial "snippets/article_metadata" $metas }}
<div style="display: flex;">
{{- if .Content -}}
<div>
{{- .Summary -}}
</div>
{{ end }}
</div>
</div>
</div>
</div>
</div>
</a>
</article>
{{ end }}
{{ if .paginate }}
{{ partial "snippets/paginator" (dict "paginator" $paginator) }}
{{ end }}
</section>
{{ end }}
{{ end }}

View File

@ -78,7 +78,7 @@
<!--<div class="img" style="background-image: url({{ .Permalink }})">
</div>-->
{{ if eq $b true }}
<img src="{{ .Permalink }}" />
<img src="{{ .Permalink }}" alt="Banner Image." />
{{ end }}
{{ end }}
{{ partial "snippets/article_metadata" $metas }}

View File

@ -1 +1 @@
<section class="page-intro">{{ .content }}</section>
<div class="page-intro">{{ .content }}</div>

View File

@ -9,7 +9,7 @@
}
span.visibleIf-visible, span.visibleif-visible {
display: flex-inline;
display: inline;
}
tr.visibleIf-visible, tr.visibleif-visible {