Change "invert" Param to "invertSectionColors"

This commit is contained in:
Ian Cook 2023-03-21 10:12:20 -05:00
parent 390ad61694
commit 104cb84570
No known key found for this signature in database
GPG key ID: AC42F59CF2D8F367
2 changed files with 3 additions and 3 deletions

View file

@ -46,7 +46,7 @@ title = "Jane Doe - Nutrition Coach & Chef Consultant"
hidedesignbyline = false hidedesignbyline = false
# The sections of the home page alternate styling. Mark invert as true to swap the styling of the sections # The sections of the home page alternate styling. Mark invert as true to swap the styling of the sections
invert = false invertSectionColors = false
[params.meta] [params.meta]
keywords = "some, keywords, for, seo, you, know, google, duckduckgo, and, such" keywords = "some, keywords, for, seo, you, know, google, duckduckgo, and, such"

View file

@ -28,7 +28,7 @@
<div class='fixed-nav'> <div class='fixed-nav'>
</div> </div>
{{ range $index_val, $elem_val := $filtered }} {{ range $index_val, $elem_val := $filtered }}
<div class='post-holder{{ if and (ne .Site.Params.invert true) (not (modBool $index_val 2)) }} odd{{ else if and (eq .Site.Params.invert true) (modBool $index_val 2) }} odd{{ end }}'> <div class='post-holder{{ if and (ne .Site.Params.invertSectionColors true) (not (modBool $index_val 2)) }} odd{{ else if and (eq .Site.Params.invertSectionColors true) (modBool $index_val 2) }} odd{{ end }}'>
<article id='{{ anchorize .Title }}' class='post {{ if eq $index_val 0 }}first{{ end }} {{ if eq (add $index_val 1) (len $sections) }}last{{ end }}'> <article id='{{ anchorize .Title }}' class='post {{ if eq $index_val 0 }}first{{ end }} {{ if eq (add $index_val 1) (len $sections) }}last{{ end }}'>
<header class="post-header"> <header class="post-header">
<h2 class="post-title">{{ .Title | safeHTML }}</h2> <h2 class="post-title">{{ .Title | safeHTML }}</h2>
@ -37,7 +37,7 @@
{{ .Content }} {{ .Content }}
</section> </section>
</article> </article>
<div class='post-after{{ if and (ne .Site.Params.invert true) (modBool $index_val 2) }} even{{ else if and (eq .Site.Params.invert true) (not (modBool $index_val 2)) }} even{{ end }}'></div> <div class='post-after{{ if and (ne .Site.Params.invertSectionColors true) (modBool $index_val 2) }} even{{ else if and (eq .Site.Params.invertSectionColors true) (not (modBool $index_val 2)) }} even{{ end }}'></div>
</div> </div>
{{ end }} {{ end }}
</main> </main>