Merge branch 'patch-1' into 'master'

Fix incorrect use of isset

See merge request pages/hugo!49
This commit is contained in:
Achilleas Pipinellis 2018-04-09 09:24:00 +00:00
commit 5d0ad3d826

View File

@ -10,12 +10,12 @@
{{ $bigimg := $.Scratch.Get "bigimg" }} {{ $bigimg := $.Scratch.Get "bigimg" }}
{{ if or $bigimg ($.Scratch.Get "title") }} {{ if or $bigimg ($.Scratch.Get "title") }}
{{ if isset $bigimg 0 }} {{ if $bigimg }}
<div id="header-big-imgs" data-num-img={{len $bigimg}} {{range $i, $img := $bigimg}}data-img-src-{{add $i 1}}="{{$img.src | absURL }}" {{ if $img.desc}}data-img-desc-{{add $i 1}}="{{$img.desc}}"{{end}}{{end}}></div> <div id="header-big-imgs" data-num-img={{len $bigimg}} {{range $i, $img := $bigimg}}data-img-src-{{add $i 1}}="{{$img.src | absURL }}" {{ if $img.desc}}data-img-desc-{{add $i 1}}="{{$img.desc}}"{{end}}{{end}}></div>
{{ end }} {{ end }}
<header class="header-section {{ if isset $bigimg 0 }}has-img{{ end }}"> <header class="header-section {{ if $bigimg }}has-img{{ end }}">
{{ if isset $bigimg 0 }} {{ if $bigimg }}
<div class="intro-header big-img"> <div class="intro-header big-img">
{{ $subtitle := $.Scratch.Get "subtitle" }} {{ $subtitle := $.Scratch.Get "subtitle" }}
<div class="container"> <div class="container">