nemhugo/layouts/partials/header_wp.html
Michael Romero 917f5fef57 Fix bigimg if only single bigimg is set
Fixing an off by 1 error which caused single bigimg's not to show up
2017-03-08 23:55:03 -08:00

14 lines
No EOL
658 B
HTML

{{ if or .Params.bigimg .Title }}
{{ if isset .Params.bigimg 0 }}
<div id="header-big-imgs" data-num-img={{len .Params.bigimg}} {{range $i, $img := .Params.bigimg}}data-img-src-{{add $i 1}}="{{$img.src}}" {{ if $img.desc}}data-img-desc-{{add $i 1}}="{{$img.desc}}"{{end}}{{end}}></div>
{{ end }}
<header class="header-section {{ if isset .Params.bigimg 0 }}has-img{{ end }}">
<div class="intro-header {{ if isset .Params.bigimg 0 }}big-img{{ else }}no-img{{ end }}">
{{ partial "header.html" . }}
<span class="img-desc" style="display: inline;"></span>
</div>
</header>
{{ else }}
<div class="intro-header"></div>
{{ end }}