small fixes

This commit is contained in:
teldra 2022-06-12 18:05:10 +02:00
parent 913b92800b
commit 32e098407f
3 changed files with 13 additions and 25 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 989 KiB

After

Width:  |  Height:  |  Size: 1.5 MiB

View File

@ -1,26 +1,26 @@
.banner {
height: calc(100vw / 3.5);
display: flex;
align-items: center;
width: 98vw;
height: calc((100vw - 5rem) / 3.5);
font-size: 115%;
//box-shadow: inset 0px -11px 8px -10px #444;
background-repeat: no-repeat;
background-size: 100%;
background-position: top center;
background-attachment: fixed;
display: flex;
flex-direction: column;
align-content: center;
justify-content: center;
align-items: center;
h1 {
margin-left: auto;
margin-right: auto;
text-align: center;
word-break: break-all;
}
}
@media (min-width: 640px) {
.banner {
width: 89%;
margin-left: auto;
margin-right: auto;
width: 89%;
margin-left: auto;
margin-right: auto;
}
}

View File

@ -25,13 +25,9 @@
{{ if and (resources.GetMatch $banner) (ne .Params.banner false) }}
{{ $height = safeCSS (printf "height: calc(%spx - 5rem);" (string $img.Height)) }}
<div style="background-image: url({{- $img.Permalink -}})" class="banner">
{{ if eq hugo.Environment "development" }}
<div style="display: flex; flex-direction: column;">
{{ end }}
<h1>{{ $title }}</h1>
{{ if eq hugo.Environment "development" }}
<div>
<div>Width: {{ (resources.GetMatch $banner).Width }}px</div>
<div>Height: {{ (resources.GetMatch $banner).Height }}px</div>
<div>Ratio: {{div (float (resources.GetMatch $banner).Width) (float (resources.GetMatch $banner).Height) }}</div>
@ -42,13 +38,9 @@
{{ $img = (.Resources.GetMatch "banner*").Fill $fill }}
{{ $height = safeCSS (printf "height: calc(%spx - 5rem);" (string $img.Height)) }}
<div style="background-image:url({{- $img.Permalink -}})" class="banner">
{{ if eq hugo.Environment "development" }}
<div style="display: flex; flex-direction: column;">
{{ end }}
<h1>{{ $title }}</h1>
{{ if eq hugo.Environment "development" }}
<div>
<div>Width: {{ (index (.Resources.Match "banner*") 0).Width }}px</div>
<div>Height: {{ (index (.Resources.Match "banner*") 0).Height }}px</div>
<div>Ratio: {{div (float (index (.Resources.Match "banner*") 0).Width) (float (index (.Resources.Match "banner*") 0).Height) }}</div>
@ -59,13 +51,9 @@
{{ $img = (index (.Resources.ByType "image") 0).Fill $fill }}
{{ $height = safeCSS (printf "height: calc(%spx - 5rem);" (string $img.Height)) }}
<div style="background-image: url({{- $img.Permalink -}})" class="banner">
{{ if eq hugo.Environment "development" }}
<div style="display: flex; flex-direction: column;">
{{ end }}
<h1>{{ $title }}</h1>
{{ if eq hugo.Environment "development" }}
<div>
<div>Width: {{ (index (.Resources.ByType "image") 0).Width }}px</div>
<div>Height: {{ (index (.Resources.ByType "image") 0).Height }}px</div>
<div>Ratio: {{div (float (index (.Resources.ByType "image") 0).Width) (float (index (.Resources.ByType "image") 0).Height) }}</div>