Fix issues with bigimgs
- Fixed issue where bigimg doesn't work if only one bigimg is defined (changed `if isset .Params.bigimg 1` to `if isset .Params.bigimg 0`) - Fixed issue where title and subtitle disappear when screen width is less than 365px
This commit is contained in:
parent
b9d04230d9
commit
b665039b0f
2 changed files with 28 additions and 6 deletions
|
|
@ -7,12 +7,13 @@
|
||||||
|
|
||||||
{{ partial "nav.html" . }}
|
{{ 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>
|
<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 }}
|
{{ end }}
|
||||||
|
|
||||||
<header class="header-section {{ if isset .Site.Params.bigimg 1 }}has-img{{ end }}">
|
<header class="header-section {{ if isset .Site.Params.bigimg 0 }}has-img{{ end }}">
|
||||||
<div class="intro-header {{ if isset .Site.Params.bigimg 1 }}big-img{{ else }}no-img{{ end }}">
|
{{ if isset .Site.Params.bigimg 0 }}
|
||||||
|
<div class="intro-header big-img">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||||
|
|
@ -28,6 +29,22 @@
|
||||||
</div>
|
</div>
|
||||||
<span class="img-desc" style="display: inline;"></span>
|
<span class="img-desc" style="display: inline;"></span>
|
||||||
</div>
|
</div>
|
||||||
|
{{end}}
|
||||||
|
<div class="intro-header no-img">
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||||
|
<div class="page-heading">
|
||||||
|
<h1>{{.Site.Title}}</h1>
|
||||||
|
{{if .Site.Params.subtitle}}
|
||||||
|
<hr class="small">
|
||||||
|
<span class="page-subheading">{{.Site.Params.subtitle}}</span>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,18 @@
|
||||||
{{ if or .Params.bigimg .Title }}
|
{{ 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>
|
<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 }}
|
{{ end }}
|
||||||
|
|
||||||
<header class="header-section {{ if isset .Params.bigimg 1 }}has-img{{ end }}">
|
<header class="header-section {{ if isset .Params.bigimg 0 }}has-img{{ end }}">
|
||||||
<div class="intro-header {{ if isset .Params.bigimg 1 }}big-img{{ else }}no-img{{ end }}">
|
{{ if isset .Params.bigimg 0 }}
|
||||||
|
<div class="intro-header big-img">
|
||||||
{{ partial "header.html" . }}
|
{{ partial "header.html" . }}
|
||||||
<span class="img-desc" style="display: inline;"></span>
|
<span class="img-desc" style="display: inline;"></span>
|
||||||
</div>
|
</div>
|
||||||
|
{{end}}
|
||||||
|
<div class="intro-header no-img">
|
||||||
|
{{ partial "header.html" . }}
|
||||||
|
</div>
|
||||||
</header>
|
</header>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<div class="intro-header"></div>
|
<div class="intro-header"></div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue