2024-07-25 17:21:52 -04:00
|
|
|
//-
|
|
|
|
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]}</#{cntnt[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, "-");
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
|
|
html
|
|
|
|
head
|
|
|
|
|
|
|
|
title Pattern
|
2024-11-08 12:18:26 -05:00
|
|
|
script.
|
|
|
|
let u = document.location.href.substring(0, document.location.href.search(/patterns/i));
|
|
|
|
let p = document.location.pathname.substring(document.location.pathname.search(/patterns/i));
|
|
|
|
p = p.replace(/\/$|\/index\.html/i, "").substring(9);
|
|
|
|
window.location = u + "?p=" + p;
|
2024-07-25 17:21:52 -04:00
|
|
|
|
|
|
|
body(data-assetpath= assetpath data-prismjs-copy-timeout="1500")
|
|
|
|
|
2024-06-13 00:00:00 -04:00
|
|
|
block content
|