2024-07-14 16:18:52 -04:00
|
|
|
//-
|
|
|
|
DS2 core (c) 2024 Alexander McIlwraith
|
|
|
|
Core licensed under CC BY-SA 4.0
|
2024-06-13 00:00:00 -04:00
|
|
|
|
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, "-");
|
|
|
|
- }
|
|
|
|
|
|
|
|
include ../_config
|
|
|
|
block config
|
|
|
|
|
2024-06-13 00:00:00 -04:00
|
|
|
|
|
|
|
mixin show-content(items, path)
|
2024-07-14 16:18:52 -04:00
|
|
|
|
|
|
|
- path = (path == "" ? "" : path + "/") + items.name.toPath()
|
|
|
|
|
|
|
|
article(id=path.replace(/\//g, "-").toPath()
|
|
|
|
data-name=items.name
|
2024-06-13 00:00:00 -04:00
|
|
|
data-status=items.status
|
2024-07-14 16:18:52 -04:00
|
|
|
data-display=items.display
|
|
|
|
data-template=(items.template == undefined ? "pug" : items.template)
|
2024-06-13 00:00:00 -04:00
|
|
|
data-core= (items.core ? "true" : "false")
|
2024-07-14 16:18:52 -04:00
|
|
|
data-path=path
|
2024-06-13 00:00:00 -04:00
|
|
|
)
|
2024-07-14 16:18:52 -04:00
|
|
|
|
2024-07-12 22:19:53 -04:00
|
|
|
h1(class="status-" + items.status )
|
|
|
|
span= items.name.toSentenceCase().toContent()
|
|
|
|
tool-tip(role="tooltip" inert tip-position="right")= items.status.toSentenceCase().toContent()
|
2024-06-13 00:00:00 -04:00
|
|
|
if items.files
|
|
|
|
each item in items.files
|
|
|
|
+show-content(item, path)
|
|
|
|
|
2024-07-12 22:19:53 -04:00
|
|
|
|
2024-06-13 00:00:00 -04:00
|
|
|
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
|
2024-07-14 16:18:52 -04:00
|
|
|
//
|
|
|
|
DS2 core (c) 2024 Alexander McIlwraith
|
|
|
|
Core licensed under CC BY-SA 4.0
|
|
|
|
|
|
|
|
|
2024-06-13 00:00:00 -04:00
|
|
|
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")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|