Update to handle multiple level statuses.

This commit is contained in:
A McIlwraith 2024-07-25 17:21:52 -04:00
parent bdb7f0e0aa
commit 77a13bbd46

View File

@ -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]}</#{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
body(data-assetpath= assetpath data-prismjs-copy-timeout="1500")
block content