Add status prefix to page status classes
This commit is contained in:
12
README.md
12
README.md
@@ -1170,17 +1170,17 @@ Page kind classes:
|
||||
Page status classes:
|
||||
|
||||
<dl>
|
||||
<dt><code>.paige-draft</code></dt>
|
||||
<dt><code>.paige-status-draft</code></dt>
|
||||
<dd>The container element of draft pages.</dd>
|
||||
<dt><code>.paige-expired</code></dt>
|
||||
<dt><code>.paige-status-expired</code></dt>
|
||||
<dd>The container element of expired pages.</dd>
|
||||
<dt><code>.paige-future</code></dt>
|
||||
<dt><code>.paige-status-future</code></dt>
|
||||
<dd>The container element of future pages.</dd>
|
||||
<dt><code>.paige-modified</code></dt>
|
||||
<dt><code>.paige-status-modified</code></dt>
|
||||
<dd>The container element of modified pages.</dd>
|
||||
<dt><code>.paige-published</code></dt>
|
||||
<dt><code>.paige-status-published</code></dt>
|
||||
<dd>The container element of published pages.</dd>
|
||||
<dt><code>.paige-unpublished</code></dt>
|
||||
<dt><code>.paige-status-unpublished</code></dt>
|
||||
<dd>The container element of unpublished pages.</dd>
|
||||
</dl>
|
||||
|
||||
|
@@ -20,23 +20,23 @@
|
||||
{{ $words := $page.WordCount | and ($page.Parent.Param "paige.subpages.disable_word_count" | not) }}
|
||||
|
||||
{{ if $draft }}
|
||||
{{ $flags = $flags | append "paige-draft" "paige-unpublished" }}
|
||||
{{ $flags = $flags | append "paige-status-draft" "paige-status-unpublished" }}
|
||||
{{ end }}
|
||||
|
||||
{{ if $expired }}
|
||||
{{ $flags = $flags | append "paige-expired" "paige-unpublished" }}
|
||||
{{ $flags = $flags | append "paige-status-expired" "paige-status-unpublished" }}
|
||||
{{ end }}
|
||||
|
||||
{{ if $future }}
|
||||
{{ $flags = $flags | append "paige-future" "paige-unpublished" }}
|
||||
{{ $flags = $flags | append "paige-status-future" "paige-status-unpublished" }}
|
||||
{{ end }}
|
||||
|
||||
{{ if $modified }}
|
||||
{{ $flags = $flags | append "paige-modified" }}
|
||||
{{ $flags = $flags | append "paige-status-modified" }}
|
||||
{{ end }}
|
||||
|
||||
{{ if not (or $draft $expired $future) }}
|
||||
{{ $flags = $flags | append "paige-published" }}
|
||||
{{ $flags = $flags | append "paige-status-published" }}
|
||||
{{ end }}
|
||||
|
||||
{{ $class := delimit (slice "paige-page" "w-100" | append $flags | uniq | sort) " " }}
|
||||
|
@@ -9,23 +9,23 @@
|
||||
{{ $modified := and $page.PublishDate $page.Lastmod (lt $page.PublishDate $page.Lastmod) }}
|
||||
|
||||
{{ if $draft }}
|
||||
{{ $class = $class | append "paige-draft" "paige-unpublished" }}
|
||||
{{ $class = $class | append "paige-status-draft" "paige-status-unpublished" }}
|
||||
{{ end }}
|
||||
|
||||
{{ if $expired }}
|
||||
{{ $class = $class | append "paige-expired" "paige-unpublished" }}
|
||||
{{ $class = $class | append "paige-status-expired" "paige-status-unpublished" }}
|
||||
{{ end }}
|
||||
|
||||
{{ if $future }}
|
||||
{{ $class = $class | append "paige-future" "paige-unpublished" }}
|
||||
{{ $class = $class | append "paige-status-future" "paige-status-unpublished" }}
|
||||
{{ end }}
|
||||
|
||||
{{ if $modified }}
|
||||
{{ $class = $class | append "paige-modified" }}
|
||||
{{ $class = $class | append "paige-status-modified" }}
|
||||
{{ end }}
|
||||
|
||||
{{ if not (or $draft $expired $future) }}
|
||||
{{ $class = $class | append "paige-published" }}
|
||||
{{ $class = $class | append "paige-status-published" }}
|
||||
{{ end }}
|
||||
|
||||
{{ with $page.Kind }}
|
||||
|
Reference in New Issue
Block a user