Files
ds2-core/src/pg/core/_master-pattern.pug

39 lines
992 B
Plaintext
Raw Normal View History

2024-07-14 16:18:52 -04:00
//-
DS2 core (c) 2024 Alexander McIlwraith
Core licensed under CC BY-SA 4.0
2024-07-12 23:35:29 -04:00
include ../_config
2024-06-13 00:00:00 -04:00
block config
2024-07-11 21:05:34 -04:00
mixin h(h)
if headings[h]
h2= headings[h]
2024-07-14 16:18:52 -04:00
- const getDate = function(){
2024-06-13 00:00:00 -04:00
- 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, " ");
- }
2024-07-14 16:18:52 -04:00
- String.prototype.toPath = function() {
- return this.trim().replace(/ /g, "_").replace(/-/g, "_").replace(/[\/\W]/g, "").replace(/_/g, "-");
- }
2024-06-13 00:00:00 -04:00
html
head
title Pattern
body(data-assetpath= assetpath data-prismjs-copy-timeout="1500")
block content