Fixes #21
This commit is contained in:
parent
339e177ac4
commit
f70d94ea67
18
public/assets/scaffolding-min.js
vendored
18
public/assets/scaffolding-min.js
vendored
@ -3164,13 +3164,17 @@ function flip(e) {
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
init: function init() {
|
init: function init() {
|
||||||
var p = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document;
|
var p = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document;
|
||||||
p.querySelectorAll("[role='switch']").forEach(function (sw) {
|
try {
|
||||||
sw.innerHTML = "<span></span>";
|
p.querySelectorAll("[role='switch']").forEach(function (sw) {
|
||||||
sw.setAttribute("aria-checked", "false");
|
sw.innerHTML = "<span></span>";
|
||||||
sw.setAttribute("tabindex", "0");
|
sw.setAttribute("aria-checked", "false");
|
||||||
sw.addEventListener("click", flip, false);
|
sw.setAttribute("tabindex", "0");
|
||||||
sw.addEventListener("keypress", flip, false);
|
sw.addEventListener("click", flip, false);
|
||||||
});
|
sw.addEventListener("keypress", flip, false);
|
||||||
|
});
|
||||||
|
} catch (e) {
|
||||||
|
console.warn("Cannot initialise switches.", e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -287,23 +287,23 @@
|
|||||||
<div class="tab-group" id="colors">
|
<div class="tab-group" id="colors">
|
||||||
<div data-tab="css">
|
<div data-tab="css">
|
||||||
<pre class="language-css">:root {
|
<pre class="language-css">:root {
|
||||||
--colour-blue: #2e51a1,
|
--colour-blue: #2e51a1;
|
||||||
--colour-blue-l: #5c7abf,
|
--colour-blue-l: #5c7abf;
|
||||||
--colour-blue-xl: #b2c3ec,
|
--colour-blue-xl: #b2c3ec;
|
||||||
--colour-blue-d: #133176,
|
--colour-blue-d: #133176;
|
||||||
--colour-blue-xd: #031235,
|
--colour-blue-xd: #031235;
|
||||||
|
|
||||||
--colour-grey: #7f7f7f,
|
--colour-grey: #7f7f7f;
|
||||||
--colour-grey-l: #b2b2b2,
|
--colour-grey-l: #b2b2b2;
|
||||||
--colour-grey-xl: #d8d8d8,
|
--colour-grey-xl: #d8d8d8;
|
||||||
--colour-grey-xxl: #f0f0f0,
|
--colour-grey-xxl: #f0f0f0;
|
||||||
--colour-white: #fff,
|
--colour-white: #fff;
|
||||||
--colour-page: #fff,
|
--colour-page: #fff;
|
||||||
--colour-light: #fff,
|
--colour-light: #fff;
|
||||||
--colour-grey-d: #4c4c4c,
|
--colour-grey-d: #4c4c4c;
|
||||||
--colour-grey-xd: #4c4c4c,
|
--colour-grey-xd: #4c4c4c;
|
||||||
--colour-black: #000,
|
--colour-black: #000;
|
||||||
--colour-dark: #000,
|
--colour-dark: #000;
|
||||||
}</pre>
|
}</pre>
|
||||||
</div>
|
</div>
|
||||||
<div data-tab="scss">
|
<div data-tab="scss">
|
||||||
|
@ -82,13 +82,17 @@ function flip(e) {
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
init: (p = document) => {
|
init: (p = document) => {
|
||||||
p.querySelectorAll("[role='switch']").forEach((sw) => {
|
try {
|
||||||
sw.innerHTML = "<span></span>";
|
p.querySelectorAll("[role='switch']").forEach((sw) => {
|
||||||
sw.setAttribute("aria-checked", "false");
|
sw.innerHTML = "<span></span>";
|
||||||
sw.setAttribute("tabindex", "0");
|
sw.setAttribute("aria-checked", "false");
|
||||||
sw.addEventListener("click", flip, false);
|
sw.setAttribute("tabindex", "0");
|
||||||
sw.addEventListener("keypress", flip, false);
|
sw.addEventListener("click", flip, false);
|
||||||
})
|
sw.addEventListener("keypress", flip, false);
|
||||||
|
})
|
||||||
|
} catch (e) {
|
||||||
|
console.warn("Cannot initialise switches.", e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</pre>
|
</pre>
|
||||||
|
@ -128,15 +128,15 @@
|
|||||||
- function generateCSS(c, p) {
|
- function generateCSS(c, p) {
|
||||||
- let o = "";
|
- let o = "";
|
||||||
- for (let i = 0; i < c.length; i++) {
|
- for (let i = 0; i < c.length; i++) {
|
||||||
- o += `\n\t--${p}-${c[i].name.toLowerCase()}: ${ color(c[i].color, "hex").toLowerCase() },\n`;
|
- o += `\n\t--${p}-${c[i].name.toLowerCase()}: ${ color(c[i].color, "hex").toLowerCase() };\n`;
|
||||||
- for (let ii = 0; ii < c[i].grad.l.length; ii++) {
|
- for (let ii = 0; ii < c[i].grad.l.length; ii++) {
|
||||||
- o += `\t--${p}-${c[i].grad.l[ii].n.toLowerCase()}: ${ color(c[i].grad.l[ii].c, "hex").toLowerCase() },\n`;
|
- o += `\t--${p}-${c[i].grad.l[ii].n.toLowerCase()}: ${ color(c[i].grad.l[ii].c, "hex").toLowerCase() };\n`;
|
||||||
- }
|
- }
|
||||||
- for (let ii = 0; ii < c[i].grad.d.length; ii++) {
|
- for (let ii = 0; ii < c[i].grad.d.length; ii++) {
|
||||||
- o += `\t--${p}-${c[i].grad.d[ii].n.toLowerCase()}: ${ color(c[i].grad.d[ii].c, "hex").toLowerCase() },\n`;
|
- o += `\t--${p}-${c[i].grad.d[ii].n.toLowerCase()}: ${ color(c[i].grad.d[ii].c, "hex").toLowerCase() };\n`;
|
||||||
- }
|
- }
|
||||||
- }
|
- }
|
||||||
- return o;
|
- return o;
|
||||||
- }
|
- }
|
||||||
|
|
||||||
if !colortxt
|
if !colortxt
|
||||||
|
Loading…
Reference in New Issue
Block a user