Fix bigimg if only single bigimg is set
Fixing an off by 1 error which caused single bigimg's not to show up
This commit is contained in:
parent
d0ec5b480e
commit
917f5fef57
@ -7,12 +7,12 @@
|
||||
|
||||
{{ partial "nav.html" . }}
|
||||
|
||||
{{ if isset .Site.Params.bigimg 1 }}
|
||||
{{ if isset .Site.Params.bigimg 0 }}
|
||||
<div id="header-big-imgs" data-num-img={{len .Site.Params.bigimg}} {{range $i, $img := .Site.Params.bigimg}}data-img-src-{{add $i 1}}="{{$img.src}}" data-img-desc-{{add $i 1}}="{{$img.desc}}"{{end}}></div>
|
||||
{{ end }}
|
||||
|
||||
<header class="header-section {{ if isset .Site.Params.bigimg 1 }}has-img{{ end }}">
|
||||
<div class="intro-header {{ if isset .Site.Params.bigimg 1 }}big-img{{ else }}no-img{{ end }}">
|
||||
<header class="header-section {{ if isset .Site.Params.bigimg 0 }}has-img{{ end }}">
|
||||
<div class="intro-header {{ if isset .Site.Params.bigimg 0 }}big-img{{ else }}no-img{{ end }}">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||
|
@ -1,10 +1,10 @@
|
||||
{{ if or .Params.bigimg .Title }}
|
||||
{{ if isset .Params.bigimg 1 }}
|
||||
{{ 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 1 }}has-img{{ end }}">
|
||||
<div class="intro-header {{ if isset .Params.bigimg 1 }}big-img{{ else }}no-img{{ 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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user