forked from Bunteshaus/bunteshaus.de
small fixes
This commit is contained in:
parent
e779f9fa58
commit
2f5a73768b
Before Width: | Height: | Size: 286 KiB After Width: | Height: | Size: 286 KiB |
|
@ -57,3 +57,21 @@
|
|||
max-height: 7em;
|
||||
}
|
||||
}
|
||||
|
||||
.dev {
|
||||
color: red;
|
||||
background: var(--background-alt);
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.black {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.left {
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.right {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
{{ $good_h := "550"}}
|
||||
{{ $b := true }}
|
||||
{{ if or (lt (int .Width) $good_w) (gt (int .Width) $good_w) (lt (int .Height) $good_h) (gt (int .Height) $good_h) }}
|
||||
<div style="margin: 1rem;">
|
||||
<div class="dev left" style="margin: 1rem;">
|
||||
Banner not shown, because:<br>
|
||||
{{ if lt (int .Width) $good_w }}
|
||||
{{ $b = false }}
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
{{ if and (ne $img "none") (ne .Params.banner false) }}
|
||||
<div style="background-image: url({{- $img.Permalink -}})" class="banner {{ $css }}">
|
||||
{{ if eq hugo.Environment "development" }}
|
||||
<div style="color: red; background: white;">
|
||||
<div class="dev right">
|
||||
{{ $w := (resources.GetMatch $banner).Width }}
|
||||
{{ $h := (resources.GetMatch $banner).Height }}
|
||||
{{ if lt (int $w) $good_w }}
|
||||
|
@ -66,7 +66,7 @@
|
|||
{{ $img = .Resources.GetMatch "banner*" }}
|
||||
<div style="background-image:url({{- $img.Permalink -}})" class="banner {{ $css }}">
|
||||
{{ if eq hugo.Environment "development" }}
|
||||
<div style="color: red; background: white;">
|
||||
<div class="dev right">
|
||||
{{ $w := (index (.Resources.Match "banner*") 0).Width }}
|
||||
{{ $h := (index (.Resources.Match "banner*") 0).Height }}
|
||||
{{ if lt (int $w) $good_w }}
|
||||
|
@ -95,7 +95,7 @@
|
|||
{{ $img = index (.Resources.ByType "image") 0 }}
|
||||
<div style="background-image: url({{- $img.Permalink -}})" class="banner {{ $css }}">
|
||||
{{ if eq hugo.Environment "development" }}
|
||||
<div style="color: red; background: white;">
|
||||
<div class="dev right">
|
||||
{{ $w := (index (.Resources.ByType "image") 0).Width }}
|
||||
{{ $h := (index (.Resources.ByType "image") 0).Height }}
|
||||
{{ if lt (int $w) $good_w }}
|
||||
|
@ -124,10 +124,10 @@
|
|||
<div class="banner b altbg">
|
||||
{{ if eq hugo.Environment "development" }}
|
||||
{{ if eq .Params.banner false }}
|
||||
<div style="color: black; background: white;">
|
||||
<div class="dev right black">
|
||||
Info: Banner is turned off for this.
|
||||
{{ else }}
|
||||
<div style="color: red; background: white;">
|
||||
<div class="dev right">
|
||||
{{ if eq $single true }}
|
||||
{{ with .File }}
|
||||
{{ printf "content/%sbanner* missing.." .Dir }}
|
||||
|
|
Loading…
Reference in New Issue