From ee6abedf82dd852f2639f912edc3752639c427d5 Mon Sep 17 00:00:00 2001 From: Will Faught Date: Sun, 5 Feb 2023 21:02:26 -0800 Subject: [PATCH] Add paige-published flag --- README.md | 2 ++ layouts/partials/paige/pages.html | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/README.md b/README.md index 24802d03..18c3b4c4 100644 --- a/README.md +++ b/README.md @@ -783,6 +783,8 @@ These optional CSS classes can be defined how you want:
Applied to the title of future pages in the list and term default layouts.
.paige-modified
Applied to the title of modified pages in the list and term default layouts.
+
.paige-published
+
Applied to the title of published pages in the list and term default layouts.
.paige-unpublished
Applied to the title of unpublished (draft, expired, future) pages in the list and term default layouts.
diff --git a/layouts/partials/paige/pages.html b/layouts/partials/paige/pages.html index 203cfc5d..2cbe244a 100644 --- a/layouts/partials/paige/pages.html +++ b/layouts/partials/paige/pages.html @@ -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) " " }}