ensure there's a title for each piece of content (#165)
Signed-off-by: Daniel Holbach <daniel.holbach@gmail.com>
This commit is contained in:
parent
97cec6269d
commit
37d24211ce
1 changed files with 2 additions and 0 deletions
|
|
@ -70,6 +70,7 @@
|
|||
|
||||
<!-- Render single-page content -->
|
||||
{{ range $index_val, $elem_val := $content }}
|
||||
{{ if .Title }}
|
||||
{{ $fnav_title := .Title }}{{ with .Params.navigation_menu_title }}{{ $fnav_title = . }}{{ end }}
|
||||
<div class='post-holder{{ if and (ne .Site.Params.invertSectionColors true) (not (modBool $index_val 2)) }} dark{{ else if and (eq .Site.Params.invertSectionColors true) (modBool $index_val 2) }} dark{{ end }}'>
|
||||
<article id='{{ anchorize $fnav_title }}' class='post {{ if eq $index_val 0 }}first{{ end }} {{ if eq (add $index_val 1) (len $content) }}last{{ end }}'>
|
||||
|
|
@ -82,6 +83,7 @@
|
|||
</article>
|
||||
<div class='post-after{{ if and (ne .Site.Params.invertSectionColors true) (modBool $index_val 2) }} light{{ else if and (eq .Site.Params.invertSectionColors true) (not (modBool $index_val 2)) }} light{{ end }}'></div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</main>
|
||||
{{ end }}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue