Add paige-published flag

This commit is contained in:
Will Faught
2023-02-05 21:02:26 -08:00
parent beb3538b48
commit ee6abedf82
2 changed files with 6 additions and 0 deletions

View File

@@ -783,6 +783,8 @@ These optional CSS classes can be defined how you want:
<dd>Applied to the title of future pages in the list and term default layouts.</dd>
<dt><code>.paige-modified</code></dt>
<dd>Applied to the title of modified pages in the list and term default layouts.</dd>
<dt><code>.paige-published</code></dt>
<dd>Applied to the title of published pages in the list and term default layouts.</dd>
<dt><code>.paige-unpublished</code></dt>
<dd>Applied to the title of unpublished (draft, expired, future) pages in the list and term default layouts.</dd>
</dl>

View File

@@ -67,6 +67,10 @@
{{ $flags = $flags | append "paige-modified" }}
{{ end }}
{{ if not (or $draft $expired $future) }}
{{ $flags = $flags | append "paige-published" }}
{{ end }}
{{ $flags = delimit ($flags | sort | uniq) " " }}
{{ $sectionclass = delimit (split $sectionclass " " | append $flags | sort | uniq) " " }}