small fixes
This commit is contained in:
parent
d85001555c
commit
6ae758daf8
Binary file not shown.
Before Width: | Height: | Size: 558 KiB After Width: | Height: | Size: 268 KiB |
Binary file not shown.
Before Width: | Height: | Size: 92 KiB After Width: | Height: | Size: 84 KiB |
|
@ -1,11 +1,11 @@
|
||||||
.banner {
|
.banner {
|
||||||
height: calc(1em * 33vh);
|
min-height: calc(100vw / 3.5);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
font-size: 115%;
|
font-size: 115%;
|
||||||
//box-shadow: inset 0px -11px 8px -10px #444;
|
//box-shadow: inset 0px -11px 8px -10px #444;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: cover;
|
background-size: 100%;
|
||||||
background-position: top center;
|
background-position: top center;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-content: center;
|
align-content: center;
|
||||||
|
|
|
@ -37,26 +37,23 @@
|
||||||
{{ if $title }}</h3>{{ else }}</h2>{{ end }}
|
{{ if $title }}</h3>{{ else }}</h2>{{ end }}
|
||||||
{{ with .Resources.GetMatch $banner }}
|
{{ with .Resources.GetMatch $banner }}
|
||||||
{{ if eq hugo.Environment "development" }}
|
{{ if eq hugo.Environment "development" }}
|
||||||
{{ $good_ratio := "1.7777777777777777"}}
|
{{ $good_w := "1920"}}
|
||||||
|
{{ $good_h := "550"}}
|
||||||
{{ $ratio := div (float .Width) (float .Height) }}
|
{{ $ratio := div (float .Width) (float .Height) }}
|
||||||
{{ if lt $ratio $good_ratio }}
|
{{ if lt (int .Width) $good_w }}
|
||||||
Ratio: {{ $ratio }}: not a good ratio, better around {{ $good_ratio }} (lower the hight in relation to the width)<br>
|
Width: {{ .Width }}px: too small, better {{ $good_w -}}px in width<br>
|
||||||
{{ else if gt $ratio $good_ratio }}
|
{{ else if gt (int .Width) $good_w }}
|
||||||
Ratio: {{ $ratio }}: not a good ratio, better around {{ $good_ratio }}(higher)<br>
|
Width: {{ .Width }}px: too big, better {{ $good_w -}}px in width<br>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if lt (int .Width) "1920" }}
|
{{ if lt (int .Height) $good_h }}
|
||||||
Width: {{ .Width }}px: too small, better 1920px in width<br>
|
Height: {{ .Height }}px: too small, better {{ $good_h -}}px in height<br>
|
||||||
{{ else if gt (int .Width) "1920" }}
|
{{ else if gt (int .Height) $good_h }}
|
||||||
Width: {{ .Width }}px: too big, better 1920px in width<br>
|
Height: {{ .Height }}px: too big, better {{ $good_h -}}px in height<br>
|
||||||
{{ end }}
|
|
||||||
{{ if lt (int .Height) "1080" }}
|
|
||||||
Height: {{ .Height }}px: too small, better 1080px in height<br>
|
|
||||||
{{ else if gt (int .Height) "1080" }}
|
|
||||||
Height: {{ .Height }}px: too big, better 1080px in height<br>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<div class="img" style="background-image: url({{ .Permalink }})">
|
<!--<div class="img" style="background-image: url({{ .Permalink }})">
|
||||||
</div>
|
</div>-->
|
||||||
|
<img src="{{ .Permalink }}" />
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<div class="text">
|
<div class="text">
|
||||||
{{ if .Description }}
|
{{ if .Description }}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user