From 11bc4f438f4e25b98f46c76bca110c56f6732a31 Mon Sep 17 00:00:00 2001 From: A McIlwraith Date: Wed, 15 Apr 2026 17:34:07 -0400 Subject: [PATCH] Move header and footer outside the container. Header and footer can be wrapped in a separate div.container if your header and footer patter need to be inside a container class. --- public/index.html | 2 + src/pg/core/_master-index.pug | 180 ++++++++++++++++------------------ src/pg/index.pug | 17 ++-- 3 files changed, 99 insertions(+), 100 deletions(-) diff --git a/public/index.html b/public/index.html index 374b809..4133e3a 100644 --- a/public/index.html +++ b/public/index.html @@ -38,6 +38,8 @@
  • Status
  • + +

    diff --git a/src/pg/core/_master-index.pug b/src/pg/core/_master-index.pug index 86493aa..4e39ec9 100644 --- a/src/pg/core/_master-index.pug +++ b/src/pg/core/_master-index.pug @@ -1,93 +1,87 @@ -//- - DS2 core (c) 2024 Alexander McIlwraith - Core licensed under CC BY-SA 4.0 - -- const getDate = function(){ -- var d = new Date(); -- return d.toLocaleDateString(lang, {day: "numeric", month: "long", year: "numeric"}); -- } -- String.prototype.toTitleCase = function() { -- return this.replace(/\w\S*/g, function(txt) { -- return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); -- }); -- } -- String.prototype.toSentenceCase = function() { -- return this.charAt(0).toUpperCase() + this.substr(1).toLowerCase(); -- } -- String.prototype.toContent = function() { -- return this.replace(/-/g, " "); -- } -- String.prototype.toPath = function() { -- return this.trim().replace(/ /g, "_").replace(/-/g, "_").replace(/[\/\W]/g, "").replace(/_/g, "-"); -- } - -include ../_config -block config - - -mixin show-content(items, path) - - - path = (path == "" ? "" : path + "/") + items.name.toPath() - - if items.core == true - - items.status = "complete" - - article(id=path.replace(/\//g, "-").toPath() - data-name=items.name - data-status=items.status - data-display=items.display - data-template=(items.template == undefined ? "pug" : items.template) - data-core= (items.core ? "true" : "false") - data-path=path - style="height: 100vh" - ) - if items.display - h1(class="status-" + items.status ) - span= items.display - tool-tip(role="tooltip" inert tip-position="right")= items.status.toSentenceCase().toContent() - else - h1(class="status-" + items.status ) - span= items.name.toSentenceCase().toContent() - tool-tip(role="tooltip" inert tip-position="right")= items.status.toSentenceCase().toContent() - if items.files - each item in items.files - +show-content(item, path) - - -doctype html -html(lang= lang ) - head - meta(charset="utf-8") - meta(http-equiv="X-UA-Compatible" content="IE=edge") - meta(name="viewport" content="width=device-width, initial-scale=1") - - title(data-site= site )= site - - block head - link( href="assets/scaffolding.css" rel="stylesheet" ) - - body - // - DS2 core (c) 2024 Alexander McIlwraith - Core licensed under CC BY-SA 4.0 - - - a.skip(href="#main") Skip to main content - - block top - - div.container - - block header - - main#main - - h1= site - each category in content - +show-content(category, "") - - block footer - - block bottom - - script(src="assets/scaffolding-min.js") +//- + DS2 core (c) 2024 Alexander McIlwraith + Core licensed under CC BY-SA 4.0 + +- const getDate = function(){ +- var d = new Date(); +- return d.toLocaleDateString(lang, {day: "numeric", month: "long", year: "numeric"}); +- } +- String.prototype.toTitleCase = function() { +- return this.replace(/\w\S*/g, function(txt) { +- return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); +- }); +- } +- String.prototype.toSentenceCase = function() { +- return this.charAt(0).toUpperCase() + this.substr(1).toLowerCase(); +- } +- String.prototype.toContent = function() { +- return this.replace(/-/g, " "); +- } +- String.prototype.toPath = function() { +- return this.trim().replace(/ /g, "_").replace(/-/g, "_").replace(/[\/\W]/g, "").replace(/_/g, "-"); +- } + +include ../_config +block config + + +mixin show-content(items, path) + + - path = (path == "" ? "" : path + "/") + items.name.toPath() + + if items.core == true + - items.status = "complete" + + article(id=path.replace(/\//g, "-").toPath() + data-name=items.name + data-status=items.status + data-display=items.display + data-template=(items.template == undefined ? "pug" : items.template) + data-core= (items.core ? "true" : "false") + data-path=path + style="height: 100vh" + ) + if items.display + h1(class="status-" + items.status ) + span= items.display + tool-tip(role="tooltip" inert tip-position="right")= items.status.toSentenceCase().toContent() + else + h1(class="status-" + items.status ) + span= items.name.toSentenceCase().toContent() + tool-tip(role="tooltip" inert tip-position="right")= items.status.toSentenceCase().toContent() + if items.files + each item in items.files + +show-content(item, path) + + +doctype html +html(lang= lang ) + head + meta(charset="utf-8") + meta(http-equiv="X-UA-Compatible" content="IE=edge") + meta(name="viewport" content="width=device-width, initial-scale=1") + + title(data-site= site )= site + + block head + link( href="assets/scaffolding.css" rel="stylesheet" ) + + body + // + DS2 core (c) 2024 Alexander McIlwraith + Core licensed under CC BY-SA 4.0 + + + a.skip(href="#main") Skip to main content + + block header + div.container + block body-top + main#main + h1= site + each category in content + +show-content(category, "") + block body-bottom + block footer + + script(src="assets/scaffolding-min.js") diff --git a/src/pg/index.pug b/src/pg/index.pug index 78f3703..499d11d 100644 --- a/src/pg/index.pug +++ b/src/pg/index.pug @@ -8,14 +8,17 @@ block head link(rel="icon" href="https://assets.gamv.ca/favicon-dark.svg" media="(prefers-color-scheme:dark)") block header - include patterns/core/header/_header.pug - - nav - ul - each first in content - li(class= navClass) - a(href="./?p=" + first.name.toPath() )= first.name.toContent().toSentenceCase() + div.container + include patterns/core/header/_header.pug + + nav + ul + each first in content + li(class= navClass) + a(href="./?p=" + first.name.toPath() )= first.name.toContent().toSentenceCase() + +block body-top p.info-switches span span#deprecated(role="switch")