Fix incorrect use of isset

This commit is contained in:
Avinash Sonawane 2018-02-03 13:30:43 +00:00
parent 77ba641331
commit 5bf3497d89

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