diff --git a/.github/workflows/audit-only.yml b/.github/workflows/audit-only.yml index bdc36d3..3fb9dfd 100644 --- a/.github/workflows/audit-only.yml +++ b/.github/workflows/audit-only.yml @@ -21,9 +21,9 @@ jobs: with: base-url: "https://example.com/" build-for-downstream: true - config-file: hugo.toml + config-file: tests/config/hugo.toml hugo-version: latest - source-directory: tests/config + # source-directory: tests/config - name: Validate HTML and CSS of website uses: wildtechgarden/validator-html-action@main with: diff --git a/assets/wtg-shell/css/site-cacheable/20-colour/60-page-header-footer.css b/assets/wtg-shell/css/site-cacheable/20-colour/60-page-header-footer.css index d9d7714..8f68b56 100644 --- a/assets/wtg-shell/css/site-cacheable/20-colour/60-page-header-footer.css +++ b/assets/wtg-shell/css/site-cacheable/20-colour/60-page-header-footer.css @@ -1,9 +1,5 @@ /* CSS colours for the page header and footer */ -header:first-of-type nav details { - color: var(--header-nav-link-color); -} - header:first-of-type > details:first-of-type { background-color: var(--header-nav-background-color); border-color: var(--header-nav-border-color); diff --git a/assets/wtg-shell/css/site-cacheable/40-styles/60-page-header-footer.css b/assets/wtg-shell/css/site-cacheable/40-styles/60-page-header-footer.css index 05cfbd8..8f44089 100644 --- a/assets/wtg-shell/css/site-cacheable/40-styles/60-page-header-footer.css +++ b/assets/wtg-shell/css/site-cacheable/40-styles/60-page-header-footer.css @@ -16,13 +16,6 @@ header:first-of-type > nav { padding-top: .3em; } -header:first-of-type nav details summary { - border: solid 1px; - list-style-type: none; - padding-left: .4em; - padding-right: .4em; -} - header:first-of-type > details:first-of-type > summary { list-style-type: none; text-align: right; @@ -74,10 +67,6 @@ header:first-of-type nav menu a { text-decoration: none; } -header:first-of-type nav details > summary + div a { - text-decoration: none; -} - header:first-of-type nav > menu:first-of-type > li a { text-overflow: ellipsis; white-space: nowrap; diff --git a/assets/wtg-shell/css/site-cacheable/50-layout/40-page-header-footer.css b/assets/wtg-shell/css/site-cacheable/50-layout/40-page-header-footer.css index 03ecfb4..0d7a666 100644 --- a/assets/wtg-shell/css/site-cacheable/50-layout/40-page-header-footer.css +++ b/assets/wtg-shell/css/site-cacheable/50-layout/40-page-header-footer.css @@ -43,7 +43,16 @@ header:first-of-type > details:first-of-type + nav { position: fixed; } -header:first-of-type nav details summary { +header:first-of-type nav > div { + border: none; + list-style-type: none; + margin-bottom: 0; + margin-top: 0; + padding-left: .4em; + padding-right: .4em; +} + +header:first-of-type nav details > div { border: solid 2px; border-radius: 8px; list-style-type: none; @@ -98,11 +107,6 @@ body > div:last-of-type > footer:last-of-type > div:nth-of-type(3):nth-last-of-t text-decoration: none; } -header:first-of-type > details:first-of-type[open] + nav details summary { - margin-bottom: .6em; - margin-top: .6em; -} - body > div:last-of-type > footer:last-of-type { align-items: center; column-gap: .6em; @@ -120,17 +124,6 @@ body > div:last-of-type > footer:last-of-type { z-index: 7; } -header:first-of-type > details:first-of-type[open] + nav > details[open] > summary + div > span { - display: list-item; - list-style-type: none; -} - -header:first-of-type > details:first-of-type[open] + nav > details[open] > summary + div { - display: inline-block; - margin-top: 1em; - vertical-align: middle; -} - header:first-of-type > details:first-of-type + nav menu { padding-left: 0; } @@ -145,7 +138,7 @@ header:first-of-type > details:first-of-type[open] + nav menu li { } @media screen and (width >= 700px) and (resolution < 2dppx), screen and (width >= 1200px) and (resolution >= 2dppx) { - header:first-of-type > nav details { + header:first-of-type > nav > div { align-self: center; margin-left: auto; } @@ -159,14 +152,6 @@ header:first-of-type > details:first-of-type[open] + nav menu li { padding: 0 .6em; } - header:first-of-type > nav details[open] > div { - border-right: solid 2px; - display: inline; - flex-flow: row nowrap; - margin-left: 0; - padding-right: .8em; - } - header:first-of-type > nav menu { flex: content 0 0; margin-bottom: 0; @@ -212,22 +197,6 @@ header:first-of-type > details:first-of-type[open] + nav menu li { margin-right: 1em; } - header:first-of-type > nav details[open] span { - display: inline-block; - } - - header:first-of-type > nav details[open] span a { - display: block; - height: 100%; - padding-right: .4em; - width: 100%; - } - - header:first-of-type > nav details[open] span + span { - border-left: solid 2px; - padding-right: .6em; - } - header:first-of-type > nav menu:nth-of-type(2) li:last-of-type { margin-left: 1em; margin-right: 0; @@ -254,18 +223,4 @@ header:first-of-type > details:first-of-type[open] + nav menu li { width: 100%; z-index: 7; } - - header:first-of-type > nav details[open] { - display: block; - text-align: right; - width: 100%; - } - - header:first-of-type > nav details summary { - margin-right: 1em; - } - - header:first-of-type > nav details[open] summary { - display: inline; - } } diff --git a/layouts/_default/about.html b/layouts/_default/about.html index ad349aa..13666a0 100644 --- a/layouts/_default/about.html +++ b/layouts/_default/about.html @@ -14,7 +14,9 @@ {{- end }}
  • Tags
  • + {{- if where (site.GetPage "/").AlternativeOutputFormats "Name" "eq" "rss" }}
  • RSS feed
  • + {{- end }} {{- end -}} {{ end }} diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml deleted file mode 100644 index 0f12cb0..0000000 --- a/layouts/_default/rss.xml +++ /dev/null @@ -1,10 +0,0 @@ -{{- printf `` | safeHTML }} - - -{{- if templates.Exists "partials/wtg-theme/output/rss-channel.xml" -}} -{{- partialCached "wtg-theme/output/rss-channel.xml" . -}} -{{- else -}} -{{- partialCached "wtg-shell/output/rss-channel.xml" . -}} -{{- end }} - - diff --git a/layouts/partials/wtg-shell/output/page-header-nav.html b/layouts/partials/wtg-shell/output/page-header-nav.html index 556647b..fed86c8 100644 --- a/layouts/partials/wtg-shell/output/page-header-nav.html +++ b/layouts/partials/wtg-shell/output/page-header-nav.html @@ -12,6 +12,8 @@ {{- end }} +{{- else -}} +
    {{- end }} {{- /* Next header piece is/are menu items, if a 'main' menu is defined */}} diff --git a/layouts/partials/wtg-shell/output/rss-channel.xml b/layouts/partials/wtg-shell/output/rss-channel.xml deleted file mode 100644 index a5a2e53..0000000 --- a/layouts/partials/wtg-shell/output/rss-channel.xml +++ /dev/null @@ -1,88 +0,0 @@ -{{- /* cspell:ignore pctx gohugo plainify */ -}} -{{- $pctx := . -}} -{{- if .IsHome -}} - {{- $pctx = .Site -}} -{{- end -}} -{{- $pages := where $pctx.Pages "Params.omitFromFeeds" "ne" true -}} -{{- $limit := site.Config.Services.RSS.Limit -}} -{{- if ge $limit 1 -}} - {{- $pages = $pages | first $limit -}} -{{- end -}} -{{- $channelTitle := site.Title -}} -{{- $channelDescription := site.Title -}} -{{- if ne $pctx .Site -}} - {{ $feedPageTitle := "" -}} - {{ $feedDescription := "" -}} - {{- if templates.Exists "partial/wtg-theme/helpers/find-page-title.html" -}} - {{- $feedPageTitle = (partialCached "wtg-theme/helpers/find-page-title.html" . .) -}} - {{- else -}} - {{- $feedPageTitle = (partialCached "wtg-shell/helpers/find-page-title.html" . .) -}} - {{- end -}} - {{- $feedPageTitle = i18n "sectionOnSite" (dict - "siteTitle" site.Title - "pagetTitle" $feedPageTitle - ) -}} - {{- $channelDescription = i18n "recentContentInSectionOnSite" (dict - "siteTitle" site.Title - "pagetTitle" $feedPageTitle - ) -}} -{{- end }} - {{ $channelTitle }} - {{ .Permalink }} - {{ $channelDescription }} - Hugo -- gohugo.io -{{- with site.LanguageCode }} - {{ . }} -{{- end -}} -{{- with site.Params.editor -}} - {{- if and .email .name }} - {{ .email }} ({{ .name }}) - {{- end -}} -{{- end -}} -{{- with site.Params.webmaster -}} - {{- if and .email .name }} - {{ .email }} ({{ .name }}) - {{- end -}} -{{- end -}} -{{ with site.Copyright }} - {{ . }} -{{- end -}} -{{- if not .Lastmod.IsZero }} - {{ .Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} -{{- end -}} -{{- with .OutputFormats.Get "RSS" }} -{{ printf "\t\t" .Permalink .MediaType | safeHTML -}} -{{- end -}} -{{ range $pages -}} - {{- $curPage := .Page }} - - - {{- if templates.Exists "partial/wtg-theme/helpers/find-link-title.html" -}} - {{- partialCached "wtg-theme/helpers/find-link-title.html" . . -}} - {{- else -}} - {{- partialCached "wtg-shell/helpers/find-link-title.html" . . -}} - {{- end -}} - - {{ .Permalink }} - {{ .PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} - {{- with site.Params.authors -}} - {{- with (index . $curPage.Params.author) -}} - {{ with .email }} - {{ . }}{{ with $curPage.Params.author }} ({{ . }}){{end}} - {{- end -}} - {{- end -}} - {{- end }} - {{ .Permalink }} - - {{- if $curPage.Param "rssIncludeFullArticle" }} - {{- .Content | html -}} - {{- else if .Description }} - {{- .Description | plainify -}} - {{- else if .Summary }} - {{- .Summary | html -}} - {{- else }} - {{ errorf "%s has no description or summary, and not including content in RSS feed; empty RSS entry" .TranslationKey }} - {{- end }} - - -{{- end -}} diff --git a/tests/config/go.mod b/tests/config/go.mod index 12000e1..30a7c14 100644 --- a/tests/config/go.mod +++ b/tests/config/go.mod @@ -1,8 +1,3 @@ module github.com/wildtechgarden/wild-theme-shell-mod-hugo/tests/config go 1.21 - -require ( - github.com/wildtechgarden/demo-test-site-hugo-wtg v0.3.5 // indirect - github.com/wildtechgarden/wild-theme-shell-mod-hugo v0.1.0-beta.4 // indirect -) diff --git a/tests/config/go.sum b/tests/config/go.sum index 2f31173..e69de29 100644 --- a/tests/config/go.sum +++ b/tests/config/go.sum @@ -1,4 +0,0 @@ -github.com/wildtechgarden/demo-test-site-hugo-wtg v0.3.5 h1:ZFdQCapt+KsuIgcTyShN41kfKHsp6xrtQV/MRmIEtpc= -github.com/wildtechgarden/demo-test-site-hugo-wtg v0.3.5/go.mod h1:Bm3jUL1XjEWNb7rx+I3tBYgW5fYMpt9n0WSdysWP62Q= -github.com/wildtechgarden/wild-theme-shell-mod-hugo v0.1.0-beta.4 h1:5aNb48Apq3hiocwtEhEKQOYHXbiXv+ZX2T5S2s/g9Ng= -github.com/wildtechgarden/wild-theme-shell-mod-hugo v0.1.0-beta.4/go.mod h1:lxTwwZX9/DXBuzDwoMG/HVhNN7qRiFRZ6wLMc69QdSc= diff --git a/tests/config/hugo.toml b/tests/config/hugo.toml index f8200d3..f597967 100644 --- a/tests/config/hugo.toml +++ b/tests/config/hugo.toml @@ -17,32 +17,33 @@ timeout = "600s" [languages] [languages.fr] contentDir = "content/fr" +disabled = true languageName = "Française" title = "Une coquille de thème «sauvage» pour Hugo par WTG" weight = 10 -[languages.fr.params] -copyright = "© 2023 Wild Tech «Garden»" -description = "Une coquille de thème «sauvage» pour Hugo par Wild Tech «Garden» (WTG)" - -[languages.fr.menu] -[[languages.fr.menu.main]] -identifier = "about" -name = "À propos" -pageref = "/about" -weight = 20 - -[[languages.fr.menu.main]] -identifier = "doc" -name = "Docs" -pageRef = "/doc" -weight = 40 - -[[languages.fr.menu.main]] -identifier = "demo" -name = "Manifs" -pageRef = "/demo" -weight = 50 +# [languages.fr.params] +# copyright = "© 2023 Wild Tech «Garden»" +# description = "Une coquille de thème «sauvage» pour Hugo par Wild Tech «Garden» (WTG)" + +# [languages.fr.menu] +# [[languages.fr.menu.main]] +# identifier = "about" +# name = "À propos" +# pageref = "/about" +# weight = 20 + +# [[languages.fr.menu.main]] +# identifier = "doc" +# name = "Docs" +# pageRef = "/doc" +# weight = 40 + +# [[languages.fr.menu.main]] +# identifier = "demo" +# name = "Manifs" +# pageRef = "/demo" +# weight = 50 [languages.en] contentDir = "content/en" @@ -116,12 +117,12 @@ toRelCanonical = "https://www.wtg-demos.ca" path = "/_index.md" lang = "en" -[[cascade]] -pageCanonical = false -toRelCanonical = "https://www.wtg-demos.ca" -[cascade._target] -path = "/_index.md" -lang = "fr" +# [[cascade]] +# pageCanonical = false +# toRelCanonical = "https://www.wtg-demos.ca" +# [cascade._target] +# path = "/_index.md" +# lang = "fr" [[cascade]] pageCanonical = true @@ -129,11 +130,11 @@ pageCanonical = true path = "/{about,demo,doc}/_index.md" lang = "en" -[[cascade]] -pageCanonical = true -[cascade._target] -path = "/{about,demo,doc}/_index.md" -lang = "fr" +# [[cascade]] +# pageCanonical = true +# [cascade._target] +# path = "/{about,demo,doc}/_index.md" +# lang = "fr" [[cascade]] pageCanonical = false @@ -142,12 +143,12 @@ toRelCanonical = "https://www.wtg-demos.ca" path = "/{about,demo,doc}/[!_]*.md" lang = "en" -[[cascade]] -pageCanonical = false -toRelCanonical = "https://www.wtg-demos.ca" -[cascade._target] -path = "/{about,demo,doc}/[!_]*.md" -lang = "fr" +# [[cascade]] +# pageCanonical = false +# toRelCanonical = "https://www.wtg-demos.ca" +# [cascade._target] +# path = "/{about,demo,doc}/[!_]*.md" +# lang = "fr" [[cascade]] pageCanonical = false @@ -156,12 +157,12 @@ toRelCanonical = "https://www.wtg-demos.ca" path = "/{about,demo,doc}/**/*.md" lang = "en" -[[cascade]] -pageCanonical = false -toRelCanonical = "https://www.wtg-demos.ca" -[cascade._target] -path = "/{about,demo,doc}/**/*.md" -lang = "fr" +# [[cascade]] +# pageCanonical = false +# toRelCanonical = "https://www.wtg-demos.ca" +# [cascade._target] +# path = "/{about,demo,doc}/**/*.md" +# lang = "fr" [taxonomies] tag = "tags" @@ -203,7 +204,8 @@ notAlternative = true suffixes = ["htaccess"] [outputs] -home = ["HTML", "RSS", "htaccess"] +#home = ["HTML", "RSS", "htaccess"] +home = ["HTML", "htaccess"] section = ["HTML"] taxonomy = ["HTML"] term = ["HTML"] @@ -226,6 +228,8 @@ disabled = true disabled = true [module] +replacements = "github.com/wildtechgarden/wild-theme-shell-mod-hugo -> .." + [[module.mounts]] source = "static" target = "static" @@ -262,10 +266,10 @@ source = "content/en" target = "content" lang = "en" -[[module.imports.mounts]] -source = "content/fr" -target = "content" -lang = "fr" +# [[module.imports.mounts]] +# source = "content/fr" +# target = "content" +# lang = "fr" [[module.imports]] path = "github.com/wildtechgarden/wild-theme-shell-mod-hugo" @@ -299,18 +303,18 @@ source = "content/en/doc/wild-theme-shell" target = "content/doc/wild-theme-shell" lang = "en" -[[module.imports.mounts]] -source = "content/fr/doc/wild-theme-shell" -target = "content/doc/wild-theme-shell" -lang = "fr" +# [[module.imports.mounts]] +# source = "content/fr/doc/wild-theme-shell" +# target = "content/doc/wild-theme-shell" +# lang = "fr" [[module.imports.mounts]] source = "README.md" target = "content/doc/wild-theme-shell/README.md" -[[module.imports.mounts]] -source = "README.fr.md" -target = "content/doc/wild-theme-shell/README.fr.md" +# [[module.imports.mounts]] +# source = "README.fr.md" +# target = "content/doc/wild-theme-shell/README.fr.md" [[module.imports.mounts]] source = "LICENSE"