Initial Commit
This commit is contained in:
80
src/pg/_master-index.pug
Normal file
80
src/pg/_master-index.pug
Normal file
@@ -0,0 +1,80 @@
|
||||
include _config
|
||||
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")
|
||||
)
|
||||
if items.files
|
||||
each item in items.files
|
||||
+show-content(item, path)
|
||||
|
||||
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")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user