Update the default archetype to specify all relevant frontmatter fields. Updated the bigimg and comments features to handle "unset" or "null" values in the frontmatter and default appropriately. Also updated the bigimg sample to explain both the default and "flow" YAML syntax.
14 lines
No EOL
658 B
HTML
14 lines
No EOL
658 B
HTML
{{ if or .Params.bigimg .Title }}
|
|
{{ if isset .Params.bigimg 1 }}
|
|
<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 }}">
|
|
{{ partial "header.html" . }}
|
|
<span class="img-desc" style="display: inline;"></span>
|
|
</div>
|
|
</header>
|
|
{{ else }}
|
|
<div class="intro-header"></div>
|
|
{{ end }} |