Fix issues with title, subtitle, and bigimg on page 2
This commit is contained in:
parent
4d866ddfd7
commit
5e287b6705
1 changed files with 7 additions and 7 deletions
|
|
@ -1,17 +1,17 @@
|
||||||
{{ if .IsHome }}
|
{{ if .IsHome }}
|
||||||
{{ $.Scratch.Add "title" .Site.Title }}
|
{{ $.Scratch.Set "title" .Site.Title }}
|
||||||
{{ if .Site.Params.subtitle }}{{ $.Scratch.Add "subtitle" .Site.Params.subtitle }}{{ end }}
|
{{ if .Site.Params.subtitle }}{{ $.Scratch.Set "subtitle" .Site.Params.subtitle }}{{ end }}
|
||||||
{{ if .Site.Params.bigimg }}{{ $.Scratch.Add "bigimg" .Site.Params.bigimg }}{{ end }}
|
{{ if .Site.Params.bigimg }}{{ $.Scratch.Set "bigimg" .Site.Params.bigimg }}{{ end }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ $.Scratch.Add "title" .Title }}
|
{{ $.Scratch.Set "title" .Title }}
|
||||||
{{ if .Params.subtitle }}{{ $.Scratch.Add "subtitle" .Params.subtitle }}{{ end }}
|
{{ if .Params.subtitle }}{{ $.Scratch.Set "subtitle" .Params.subtitle }}{{ end }}
|
||||||
{{ if .Params.bigimg }}{{ $.Scratch.Add "bigimg" .Params.bigimg }}{{ end }}
|
{{ if .Params.bigimg }}{{ $.Scratch.Set "bigimg" .Params.bigimg }}{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ $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 isset $bigimg 0 }}
|
||||||
<div id="header-big-imgs" data-num-img={{len $bigimg}} {{range $i, $img := $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 $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 isset $bigimg 0 }}has-img{{ end }}">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue