small fixes
This commit is contained in:
parent
18fac67a90
commit
5fc91a1191
|
@ -38,18 +38,19 @@
|
|||
{{ with .File }}
|
||||
{{ $slug = anchorize .ContentBaseName }}
|
||||
{{ end }}
|
||||
{{ if and ($img) (ne .Params.banner false) }}
|
||||
{{ if or (and $img (ne .Params.banner false)) (.Resources.ByType "image") }}1
|
||||
{{ if .Resources.Match "banner*" }}
|
||||
{{ $img = .Resources.GetMatch "banner*" }}
|
||||
{{ end }}
|
||||
{{ if .Resources.ByType "image" }}
|
||||
{{ $img = index (.Resources.ByType "image") 0 }}
|
||||
{{ end }}
|
||||
{{ if $img }}
|
||||
<div style="background-image: url({{- $img.Permalink -}})" class="banner {{ $css }}">
|
||||
{{ if eq hugo.Environment "development" }}
|
||||
<div class="dev right">
|
||||
{{ $w := (resources.GetMatch $banner).Width }}
|
||||
{{ $h := (resources.GetMatch $banner).Height }}
|
||||
{{ $w := $img.Width }}
|
||||
{{ $h := $img.Height }}
|
||||
{{ if lt (int $w) $good_w }}
|
||||
{{ $b = false }}
|
||||
{{ if eq hugo.Environment "development" }}
|
||||
|
@ -81,7 +82,8 @@
|
|||
{{ end }}
|
||||
{{ if not .IsHome }}<h1 class="{{ $title_class }}">{{ $title }}</h1> {{ end }}
|
||||
</div>
|
||||
{{ else }}
|
||||
{{ end }}
|
||||
{{ else }}2
|
||||
<div class="banner b altbg">
|
||||
{{ if eq hugo.Environment "development" }}
|
||||
{{ if eq .Params.banner false }}
|
||||
|
|
Loading…
Reference in New Issue
Block a user