diff --git a/src/pg/core/_master-pattern.pug b/src/pg/core/_master-pattern.pug index f7f4e0a..6c2c715 100644 --- a/src/pg/core/_master-pattern.pug +++ b/src/pg/core/_master-pattern.pug @@ -1,39 +1,43 @@ -//- - DS2 core (c) 2024 Alexander McIlwraith - Core licensed under CC BY-SA 4.0 - -include ../_config -block config - -mixin h(h) - if headings[h] - h2= headings[h] - -- 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, "-"); -- } - - -html - head - - title Pattern - - body(data-assetpath= assetpath data-prismjs-copy-timeout="1500") - +//- + DS2 core (c) 2024 Alexander McIlwraith + Core licensed under CC BY-SA 4.0 + +include ../_config +block config + +mixin h(h) + if headings[h] + if headings[h].indexOf("|") == -1 + h2= headings[h] + else + - var cntnt = headings[h].split("|") + | <#{cntnt[0]}>#{cntnt[1]} + +- 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, "-"); +- } + + +html + head + + title Pattern + + body(data-assetpath= assetpath data-prismjs-copy-timeout="1500") + block content \ No newline at end of file