Fix incorrect use of isset

This commit is contained in:
Michael Romero 2017-06-04 23:14:38 -07:00
commit f86398e399

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">