From aabb52bd64e34795fbce9238946b46558f5983c5 Mon Sep 17 00:00:00 2001 From: Will Faught Date: Sat, 8 Feb 2025 22:12:05 -0800 Subject: [PATCH] Add page, site prefixes to all CSS names --- README.md | 131 ++++++++++---------- exampleSite/content/customizations/style.md | 64 +++++----- layouts/_default/paige/cloud.html | 2 +- layouts/partials/paige/list-item.html | 14 +-- layouts/partials/paige/list.html | 14 +-- layouts/partials/paige/page-footer.html | 12 +- layouts/partials/paige/page-header.html | 20 +-- layouts/partials/paige/page.html | 2 +- layouts/partials/paige/site-footer.html | 6 +- layouts/partials/paige/site-header.html | 6 +- layouts/partials/paige/style.html | 2 +- 11 files changed, 139 insertions(+), 134 deletions(-) diff --git a/README.md b/README.md index 8ec2c089..1c4ad052 100644 --- a/README.md +++ b/README.md @@ -1035,107 +1035,112 @@ Use CSS selectors to extend the default styling. Page identifiers:
-
#paige-alert
+
#paige-page-alert
The page alert.
-
#paige-authors
+
#paige-page-authors
The page authors.
-
#paige-breadcrumbs
-
The site breadcrumbs.
-
#paige-collections
-
The site collection pages.
-
#paige-collections-header
-
The site collection pages header.
-
#paige-content
+
#paige-page-collections
+
The page collections.
+
#paige-page-collections-header
+
The page collections header.
+
#paige-page-content
The page content.
-
#paige-copyright
-
The site copyright.
-
#paige-credit
-
The site credit.
-
#paige-date
+
#paige-page-date
The page date.
-
#paige-edit
-
The page edit link.
-
#paige-file
-
The page edit and history links.
-
#paige-history
-
The page history link.
-
#paige-keywords
-
The page keywords.
-
#paige-license
-
The site license.
-
#paige-menu
-
The site menu.
-
#paige-metadata
-
The page metadata.
-
#paige-next
-
The next page link.
#paige-page-description
The page description.
+
#paige-page-edit
+
The page edit link.
+
#paige-page-file
+
The container of the page edit and history links.
#paige-page-footer
The page footer that contains the page edit, history, next, and previous links.
#paige-page-header
The page header that contains the page title, description, metadata, and table of contents.
-
#paige-page-title
-
The page title.
-
#paige-subpages
-
The page sub-pages.
-
#paige-subpages-header
-
The page subpages header.
-
#paige-pagination
+
#paige-page-history
+
The page history link.
+
#paige-page-keywords
+
The page keywords.
+
#paige-page-metadata
+
The page metadata.
+
#paige-page-next
+
The next page link.
+
#paige-page-pages
+
The page pages.
+
#paige-page-pages-header
+
The page pages header.
+
#paige-page-pagination
The pagination of sub-pages.
-
#paige-prev
+
#paige-page-prev
The previous page link.
-
#paige-reading-time
+
#paige-page-reading-time
The page reading time.
-
#paige-sections
-
The page section sub-pages.
-
#paige-sections-header
-
The page section sub-pages header.
-
#paige-series
+
#paige-page-sections
+
The page sections.
+
#paige-page-sections-header
+
The page sections header.
+
#paige-page-series
The page series.
-
#paige-siblings
-
The page next and previous links.
+
#paige-page-siblings
+
The container of the page next and previous links.
+
#paige-page-title
+
The page title.
+
#paige-page-toc
+
The page table of contents.
+
+ +Site identifiers: + +
+
#paige-site-breadcrumbs
+
The site breadcrumbs.
+
#paige-site-copyright
+
The site copyright.
+
#paige-site-credit
+
The site credit.
#paige-site-description
The site description.
#paige-site-footer
The site footer that contains the site copyright, license, and credit.
#paige-site-header
The site header that contains the site title, description, menu, and breadcrumbs.
+
#paige-site-license
+
The site license.
+
#paige-site-menu
+
The site menu.
#paige-site-title
The site title.
-
#paige-toc
-
The table of contents.
Page classes:
-
.paige-keyword
+
.paige-page-keyword
A keyword.
-
.paige-keyword-category
+
.paige-page-keyword-category
A category keyword.
-
.paige-keyword-tag
+
.paige-page-keyword-tag
A tag keyword.
-
.paige-keywords
+
.paige-page-keywords
The keywords.
Sub-page classes:
-
.paige-authors
+
.paige-page-authors
The authors.
-
.paige-date
+
.paige-page-date
The date.
.paige-description
The description.
-
.paige-metadata
+
.paige-page-metadata
The metadata.
.paige-page
A page.
-
.paige-reading-time
+
.paige-page-reading-time
The reading time.
-
.paige-series
+
.paige-page-series
The series.
.paige-summary
The summary.
@@ -1234,7 +1239,7 @@ try the following in `yoursite/hugo.toml`: ```toml [params.paige] style = """ -#paige-content > * { margin-left: auto; margin-right: auto; max-width: 40rem; } +#paige-page-content > * { margin-left: auto; margin-right: auto; max-width: 40rem; } """ ``` @@ -1249,11 +1254,11 @@ try the following in `yoursite/hugo.toml`: ```toml [params.paige] style = """ -#paige-content > * { margin-left: auto; margin-right: auto; max-width: 40rem; } -#paige-content > img, -#paige-content > .paige-image, -#paige-content > .paige-vimeo, -#paige-content > .paige-youtube { max-width: 100%; } +#paige-page-content > * { margin-left: auto; margin-right: auto; max-width: 40rem; } +#paige-page-content > img, +#paige-page-content > .paige-image, +#paige-page-content > .paige-vimeo, +#paige-page-content > .paige-youtube { max-width: 100%; } """ ``` diff --git a/exampleSite/content/customizations/style.md b/exampleSite/content/customizations/style.md index 547e009e..98c76ce9 100644 --- a/exampleSite/content/customizations/style.md +++ b/exampleSite/content/customizations/style.md @@ -8,25 +8,25 @@ tags = ["singles", "style"] title = "Style Data" [paige] style = """ -#paige-authors, -#paige-breadcrumbs, -#paige-content, -#paige-copyright, -#paige-credit, -#paige-date, #paige-description, -#paige-file, -#paige-keywords, -#paige-license, -#paige-menu, -#paige-page-title, +#paige-page-authors, +#paige-page-content, +#paige-page-date, #paige-page-description, -#paige-reading-time, -#paige-series, -#paige-siblings, -#paige-site-title, +#paige-page-file, +#paige-page-keywords, +#paige-page-reading-time, +#paige-page-series, +#paige-page-siblings, +#paige-page-title, +#paige-page-toc, +#paige-site-breadcrumbs, +#paige-site-copyright, +#paige-site-credit, #paige-site-description, -#paige-toc { +#paige-site-license, +#paige-site-menu, +#paige-site-title { font-style: italic; } """ @@ -101,25 +101,25 @@ This page has the following parameters: [paige] style = """ -#paige-authors, -#paige-breadcrumbs, -#paige-content, -#paige-copyright, -#paige-credit, -#paige-date, #paige-description, -#paige-file, -#paige-keywords, -#paige-license, -#paige-menu, -#paige-page-title, +#paige-page-authors, +#paige-page-content, +#paige-page-date, #paige-page-description, -#paige-reading-time, -#paige-series, -#paige-siblings, -#paige-site-title, +#paige-page-file, +#paige-page-keywords, +#paige-page-reading-time, +#paige-page-series, +#paige-page-siblings, +#paige-page-title, +#paige-page-toc, +#paige-site-breadcrumbs, +#paige-site-copyright, +#paige-site-credit, #paige-site-description, -#paige-toc { +#paige-site-license, +#paige-site-menu, +#paige-site-title { font-style: italic; } """ diff --git a/layouts/_default/paige/cloud.html b/layouts/_default/paige/cloud.html index 872dff5e..30563e0d 100644 --- a/layouts/_default/paige/cloud.html +++ b/layouts/_default/paige/cloud.html @@ -4,7 +4,7 @@ {{ partial "paige/page.html" $page }} {{ with $page.Pages }} -
+
    {{ range (sort . "LinkTitle") }}
  • diff --git a/layouts/partials/paige/list-item.html b/layouts/partials/paige/list-item.html index f7998561..3775edb0 100644 --- a/layouts/partials/paige/list-item.html +++ b/layouts/partials/paige/list-item.html @@ -55,7 +55,7 @@ {{ end }} {{ with $keywords }} -

    +

    {{ range $i, $term := . -}} {{- $kind := false -}} @@ -68,18 +68,18 @@ {{- if $normal -}} {{- if gt $i 0 }} · {{ end -}} - {{ .LinkTitle }} + {{ .LinkTitle }} {{- else -}} {{- if gt $i 0 }} {{ end -}} - {{ .LinkTitle }} + {{ .LinkTitle }} {{- end -}} {{- end }}

    {{ end }} {{ with $series }} -

    +

    {{ range $i, $series := . -}} {{- if gt $i 0 }} · {{ end -}} @@ -89,7 +89,7 @@ {{ end }} {{ with $authors }} -

    +

    {{ range $i, $author := . -}} {{- if gt $i 0 }} · {{ end -}} @@ -99,12 +99,12 @@ {{ end }} {{ with $date }} -

    +

    {{ end }} {{ with $time }} -

    {{ . }} {{ i18n "paige_minutes" . }}

    +

    {{ . }} {{ i18n "paige_minutes" . }}

    {{ end }}
diff --git a/layouts/partials/paige/list.html b/layouts/partials/paige/list.html index 1935734f..032d5050 100644 --- a/layouts/partials/paige/list.html +++ b/layouts/partials/paige/list.html @@ -7,7 +7,7 @@ {{ $pager := .pager }} {{ if or $pager.HasPrev $pager.HasNext }} -
+