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

85 lines
1.9 KiB
Plaintext
Raw Normal View History

2024-07-12 23:35:29 -04:00
include ../_config
2024-06-13 00:00:00 -04:00
block config
- var 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, " ");
- }
mixin show-content(items, path)
- path = (path == "" ? "" : path + "/") + items.name
- if (items.status == "deprecated") {
- articlestatus = "status-deprecated"
- } else {
- articlestatus = ""
- }
article(id=path.replace(/\//g, "-")
class=articlestatus
data-path=path
data-template=(items.template == undefined ? "pug" : items.template)
data-pattern=items.name
data-status=items.status
data-core= (items.core ? "true" : "false")
)
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-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" )
script(src="assets/jquery-min.js")
body
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")