diff --git a/src/pg/core/_master-index.pug b/src/pg/core/_master-index.pug index 7a89097..5f313d5 100644 --- a/src/pg/core/_master-index.pug +++ b/src/pg/core/_master-index.pug @@ -1,82 +1,86 @@ -//- - 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" - ) - - 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 - div.container - - block header - - main#main - - h1= site - each category in content - +show-content(category, "") - - 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 + div.container + + block header + + main#main + + h1= site + each category in content + +show-content(category, "") + + script(src="assets/scaffolding-min.js")