move patterns and javascript to core directories
This commit is contained in:
@@ -173,7 +173,7 @@ module.exports = {
|
||||
|
||||
document.querySelectorAll("article").forEach((a) => {
|
||||
if ( a.getAttribute("data-template") != "none" ) {
|
||||
let path = "patterns/" + a.getAttribute("data-path") + (a.getAttribute("data-core") == "true" ? "-core" : "") + "/index.html";
|
||||
let path = "patterns/" + (a.getAttribute("data-core") == "true" ? "core/" : "") + a.getAttribute("data-path") + "/index.html";
|
||||
const ASYNC = true;
|
||||
let ajx = new XMLHttpRequest();
|
||||
ajx.onreadystatechange = () => {
|
@@ -1,5 +1,5 @@
|
||||
// core and prism
|
||||
import * as core from './_core.js';
|
||||
import * as core from './core/_core.js';
|
||||
import * as Prism from "../../node_modules/prismjs/prism";
|
||||
import '../../node_modules/prismjs/components/prism-json';
|
||||
import '../../node_modules/prismjs/components/prism-pug';
|
||||
@@ -8,9 +8,9 @@ import "../../node_modules/prismjs/plugins/toolbar/prism-toolbar";
|
||||
import "../../node_modules/prismjs/plugins/line-numbers/prism-line-numbers";
|
||||
|
||||
// import pattern stuff.
|
||||
import * as swtch from "../pg/patterns/components/switch-core/_switch.js";
|
||||
import * as stickynote from "../pg/patterns/components/sticky-note-core/_sticky-note.js";
|
||||
import * as tabs from "../pg/patterns/layouts/tabs-core/_tabs.js";
|
||||
import * as swtch from "../pg/patterns/core/components/switch/_switch.js";
|
||||
import * as stickynote from "../pg/patterns/core/components/sticky-note/_sticky-note.js";
|
||||
import * as tabs from "../pg/patterns/core/layouts/tabs/_tabs.js";
|
||||
|
||||
// init core
|
||||
core.init({
|
||||
@@ -24,34 +24,6 @@ core.init({
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// handler for the deprecated switch
|
||||
|
||||
/*
|
||||
// selectable content
|
||||
jQuery.fn.OneClickSelect = function () {
|
||||
return jQuery(this).on('click', function () {
|
||||
// In here, "this" is the element
|
||||
var range, selection;
|
||||
if (window.getSelection) {
|
||||
selection = window.getSelection();
|
||||
range = document.createRange();
|
||||
range.selectNodeContents(this);
|
||||
selection.removeAllRanges();
|
||||
selection.addRange(range);
|
||||
} else if (document.body.createTextRange) {
|
||||
range = document.body.createTextRange();
|
||||
range.moveToElementText(this);
|
||||
range.select();
|
||||
}
|
||||
});
|
||||
};
|
||||
*/
|
||||
|
||||
jQuery(document).ready(function($){
|
||||
// show deprecated switch
|
||||
function flipDeprecated() {
|
||||
|
@@ -8,7 +8,7 @@ block head
|
||||
link(rel="icon" href="https://assets.gamv.ca/favicon-dark.svg" media="(prefers-color-scheme:dark)")
|
||||
|
||||
block header
|
||||
include patterns/layouts/header-core/_header.pug
|
||||
include patterns/core/layouts/header/_header.pug
|
||||
|
||||
nav
|
||||
ul
|
||||
|
@@ -1,7 +0,0 @@
|
||||
extends ../../core/_master-pattern
|
||||
|
||||
|
||||
block content
|
||||
include ../../core/_colour-samples
|
||||
h2 Primary colours
|
||||
+colour-samples(colours, "colors")
|
7
src/pg/patterns/core/colours/index.pug
Normal file
7
src/pg/patterns/core/colours/index.pug
Normal file
@@ -0,0 +1,7 @@
|
||||
extends ../../../core/_master-pattern
|
||||
|
||||
|
||||
block content
|
||||
include ../../../core/_colour-samples
|
||||
h2 Primary colours
|
||||
+colour-samples(colours, "colors")
|
@@ -1,4 +1,4 @@
|
||||
extends ../../../core/_master-pattern.pug
|
||||
extends ../../../../core/_master-pattern.pug
|
||||
block content
|
||||
+h(0)
|
||||
+h(1)
|
@@ -1,4 +1,4 @@
|
||||
extends ../../../core/_master-pattern.pug
|
||||
extends ../../../../core/_master-pattern.pug
|
||||
|
||||
|
||||
block content
|
@@ -1,4 +1,4 @@
|
||||
extends ../../../core/_master-pattern.pug
|
||||
extends ../../../../core/_master-pattern.pug
|
||||
|
||||
block content
|
||||
|
@@ -1,4 +1,4 @@
|
||||
extends ../../../core/_master-pattern.pug
|
||||
extends ../../../../core/_master-pattern.pug
|
||||
|
||||
|
||||
block content
|
@@ -1,7 +1,7 @@
|
||||
//- DS2 core (c) 2024 Alexander McIlwraith
|
||||
//- Licensed under CC BY-SA 4.0
|
||||
|
||||
extends ../../../core/_master-pattern.pug
|
||||
extends ../../../../core/_master-pattern.pug
|
||||
|
||||
|
||||
block content
|
@@ -1,4 +1,4 @@
|
||||
extends ../../core/_master-pattern.pug
|
||||
extends ../../../core/_master-pattern.pug
|
||||
|
||||
block content
|
||||
-
|
Reference in New Issue
Block a user