Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
74fc7a4c11 | |||
9cba20c39c | |||
3c261881e9 | |||
c0ea225d03 | |||
ce98e0c488 | |||
fa708175b7 | |||
0036bcf0fd | |||
0708328647 | |||
74abc40dc4 | |||
4c394e5215 |
18
Readme.md
18
Readme.md
@@ -34,3 +34,21 @@ The content variable in \_config.pug defines your array of patterns. It is made
|
|||||||
|
|
||||||
By changing and resaving the \_config.pug file, (our change is often adding or removing a random space) all of the pug patterns will recompile. Note that md templates will not recompile automatically when config is saved and updated as markdown files don't have an include.
|
By changing and resaving the \_config.pug file, (our change is often adding or removing a random space) all of the pug patterns will recompile. Note that md templates will not recompile automatically when config is saved and updated as markdown files don't have an include.
|
||||||
|
|
||||||
|
## Including PugJS in Pug files without compiling
|
||||||
|
If you wish to include Pug output as code in your instance, you can do this without manually creating a second 'dot container' version of the file. Including files with 'unrecognised' extensions does not compile them.
|
||||||
|
|
||||||
|
1. In your project config, create a Custom Tool called Pug pattern to pug file
|
||||||
|
1. Check Process automatically and set the command to 'cp {{input}} {{output}}' on Mac/Linux and 'copy {{input}} {{output}}' on Windows. (This is just your operating system's command line file copy executable.)
|
||||||
|
1. Set the Output to Relative to input
|
||||||
|
1. Set the Output Extension to .pug
|
||||||
|
|
||||||
|
In your design system implementation,
|
||||||
|
1. Create the files that you edit as _[pattern].pp files, and set them to auto compile. (You may wish to let your text editor know what they are, so the syntax highlighting works.
|
||||||
|
1. Save the file, ensure that it is set to in prepros it is set to process automatically.
|
||||||
|
1. Include the .pp file as your pug pattern with .language-pug and include the .pug file as your html output.
|
||||||
|
|
||||||
|
This will ensure that the .pug file will get processed and the .pp file will be handled as text will get compiled, but they should display correctly and remain in sync while maintaining the minimum number of files.
|
||||||
|
|
||||||
|
|
||||||
|
## Credits
|
||||||
|
This framework includes [PrismJS](https://prismjs.com/) for code syntax highlighting. PrismJS is released under the [MIT license](https://opensource.org/licenses/MIT)>
|
||||||
|
@@ -2,7 +2,11 @@
|
|||||||
"folders":
|
"folders":
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"path": "."
|
"path": ".",
|
||||||
|
"folder_exclude_patterns": ["src/pg/patterns"]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "./src/pg/patterns"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
@@ -492,6 +492,9 @@
|
|||||||
"resolveJsonModule": false,
|
"resolveJsonModule": false,
|
||||||
"esModuleInterop": false,
|
"esModuleInterop": false,
|
||||||
"useDefineForClassFields": false
|
"useDefineForClassFields": false
|
||||||
|
},
|
||||||
|
"custom-gzg6caunrh": {
|
||||||
|
"command": "cp {{input}} {{output}}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"fileTypes": {
|
"fileTypes": {
|
||||||
@@ -955,6 +958,26 @@
|
|||||||
"type": "SOURCE_RELATIVE",
|
"type": "SOURCE_RELATIVE",
|
||||||
"relativePath": ""
|
"relativePath": ""
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"custom-sm9kzo2npr": {
|
||||||
|
"autoCompile": true,
|
||||||
|
"label": "Pug pattern to pug file",
|
||||||
|
"extensions": [
|
||||||
|
".pp"
|
||||||
|
],
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"task": "custom-gzg6caunrh",
|
||||||
|
"enable": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"output": {
|
||||||
|
"extension": ".pug",
|
||||||
|
"type": "SOURCE_RELATIVE",
|
||||||
|
"relativePath": "",
|
||||||
|
"suffix": "-dist",
|
||||||
|
"alwaysSuffix": false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
@@ -1346,6 +1369,30 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"file": "src/pg/patterns/core/sticky-note/_sticky-note.pp",
|
||||||
|
"config": {
|
||||||
|
"autoCompile": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "src/pg/patterns/core/switch/_switch.pp",
|
||||||
|
"config": {
|
||||||
|
"autoCompile": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "src/pg/patterns/core/tabs/_tabs.pp",
|
||||||
|
"config": {
|
||||||
|
"autoCompile": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "src/pg/patterns/core/tooltip/_tooltip.pp",
|
||||||
|
"config": {
|
||||||
|
"autoCompile": true
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"file": "src/pg/patterns/layouts/header-core/header.scss",
|
"file": "src/pg/patterns/layouts/header-core/header.scss",
|
||||||
"config": {
|
"config": {
|
||||||
|
199
public/assets/scaffolding-min.js
vendored
199
public/assets/scaffolding-min.js
vendored
@@ -187,96 +187,110 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof args.beforeArticleLoad == "function") args.beforeArticleLoad(a);
|
if (typeof args.beforeArticleLoad == "function") args.beforeArticleLoad();
|
||||||
|
|
||||||
document.querySelectorAll("article").forEach((a) => {
|
document.querySelectorAll("article").forEach((a) => {
|
||||||
if ( a.getAttribute("data-template") != "none" ) {
|
if ( a.getAttribute("data-template") != "none" ) {
|
||||||
let path = a.getAttribute("data-path");
|
const observer = new IntersectionObserver(articles => {
|
||||||
path = "patterns/" +
|
articles.forEach(article => {
|
||||||
(a.getAttribute("data-core") == "true" ?
|
let a = article.target;
|
||||||
"core/" + path.substring(path.lastIndexOf("/") + 1) :
|
|
||||||
a.getAttribute("data-path"))
|
|
||||||
+ "/index.html";
|
|
||||||
const ASYNC = true;
|
|
||||||
let ajx = new XMLHttpRequest();
|
|
||||||
ajx.onreadystatechange = () => {
|
|
||||||
if (ajx.readyState == 4) {
|
|
||||||
|
|
||||||
switch (ajx.status) {
|
|
||||||
case 200:
|
|
||||||
a.innerHTML = a.innerHTML + ajx.responseText;
|
|
||||||
|
|
||||||
switch (a.getAttribute("data-template")) {
|
|
||||||
case "pug":
|
|
||||||
a.querySelectorAll("pre").forEach((aa) => {
|
|
||||||
aa.innerHTML = `<code class="${aa.getAttribute("class")}">${aa.innerHTML}</code>`;
|
|
||||||
})
|
|
||||||
break;
|
|
||||||
case "md":
|
|
||||||
a.querySelectorAll("code").forEach((aa) => {
|
|
||||||
aa.classList.add("language-html");
|
|
||||||
})
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
a.querySelectorAll("code").forEach((c)=> {
|
if (article.isIntersecting) {
|
||||||
c.classList.add("line-numbers");
|
|
||||||
c.innerHTML = c.innerHTML.replace(/</g, "<");
|
|
||||||
c.classList.add("copy-to-clipboard-button");
|
|
||||||
})
|
|
||||||
if (typeof args.success == "function") args.success(a);
|
|
||||||
|
|
||||||
Prism.highlightAll();
|
let path = a.getAttribute("data-path");
|
||||||
|
path = "patterns/" +
|
||||||
|
(a.getAttribute("data-core") == "true" ?
|
||||||
|
"core/" + path.substring(path.lastIndexOf("/") + 1) :
|
||||||
|
a.getAttribute("data-path"))
|
||||||
|
+ "/index.html";
|
||||||
|
const ASYNC = true;
|
||||||
|
let ajx = new XMLHttpRequest();
|
||||||
|
ajx.onreadystatechange = () => {
|
||||||
|
if (ajx.readyState == 4) {
|
||||||
|
|
||||||
a.querySelectorAll("code").forEach((c)=> {
|
observer.unobserve(article.target);
|
||||||
c.onclick = (e) => {
|
switch (ajx.status) {
|
||||||
oneClickSelect(e);
|
case 200:
|
||||||
|
a.innerHTML = a.innerHTML + ajx.responseText;
|
||||||
|
|
||||||
|
switch (a.getAttribute("data-template")) {
|
||||||
|
case "pug":
|
||||||
|
a.querySelectorAll("pre").forEach((aa) => {
|
||||||
|
aa.innerHTML = `<code class="${aa.getAttribute("class")}">${aa.innerHTML}</code>`;
|
||||||
|
})
|
||||||
|
break;
|
||||||
|
case "md":
|
||||||
|
a.querySelectorAll("code").forEach((aa) => {
|
||||||
|
aa.classList.add("language-html");
|
||||||
|
})
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.querySelectorAll("code").forEach((c)=> {
|
||||||
|
c.classList.add("line-numbers");
|
||||||
|
c.innerHTML = c.innerHTML.replace(/</g, "<");
|
||||||
|
c.classList.add("copy-to-clipboard-button");
|
||||||
|
})
|
||||||
|
if (typeof args.success == "function") args.success(a);
|
||||||
|
|
||||||
|
Prism.highlightAll();
|
||||||
|
|
||||||
|
a.querySelectorAll("code").forEach((c)=> {
|
||||||
|
c.onclick = (e) => {
|
||||||
|
oneClickSelect(e);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
module.exports.colour.positionTooltip();
|
||||||
|
window.onresize = () => {
|
||||||
|
module.exports.colour.positionTooltip();
|
||||||
|
}
|
||||||
|
|
||||||
|
a.querySelectorAll("name > span, color-pill > span").forEach((pill) => {
|
||||||
|
pill.onclick = (e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
let w = "";
|
||||||
|
if (e.metaKey || e.ctrlKey || e.keyCode == 91 || e.keyCode == 224) {
|
||||||
|
w = "var";
|
||||||
|
} else if (e.altKey) {
|
||||||
|
w = "token"
|
||||||
|
} else if (e.shiftKey) {
|
||||||
|
w = "rgb";
|
||||||
|
} else {
|
||||||
|
w = "hex";
|
||||||
|
}
|
||||||
|
module.exports.colour.copy(w, pill);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 404:
|
||||||
|
|
||||||
|
if (typeof args.notFound == "function") args.notFound(a, path);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
console.log("uncaught http error", { status: ajx.status, path: a.getAttribute("data-path") });
|
||||||
}
|
}
|
||||||
})
|
|
||||||
|
|
||||||
|
if (typeof args.done == "function") args.done(a);
|
||||||
|
|
||||||
module.exports.colour.positionTooltip();
|
|
||||||
window.onresize = () => {
|
|
||||||
module.exports.colour.positionTooltip();
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
ajx.open("GET", path, ASYNC);
|
||||||
|
ajx.send();
|
||||||
|
|
||||||
a.querySelectorAll("name > span, color-pill > span").forEach((pill) => {
|
|
||||||
pill.onclick = (e) => {
|
|
||||||
e.preventDefault();
|
|
||||||
let w = "";
|
|
||||||
if (e.metaKey || e.ctrlKey || e.keyCode == 91 || e.keyCode == 224) {
|
|
||||||
w = "var";
|
|
||||||
} else if (e.altKey) {
|
|
||||||
w = "token"
|
|
||||||
} else if (e.shiftKey) {
|
|
||||||
w = "rgb";
|
|
||||||
} else {
|
|
||||||
w = "hex";
|
|
||||||
}
|
|
||||||
module.exports.colour.copy(w, pill);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 404:
|
|
||||||
|
|
||||||
if (typeof args.notFound == "function") args.notFound(a, path);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
console.log("uncaught http error", { status: ajx.status, path: a.getAttribute("data-path") });
|
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
}, { threshold: 0, rootMargin: (document.body.clientHeight / 2) + "px" })
|
||||||
|
|
||||||
if (typeof args.done == "function") args.done(a);
|
observer.observe(a);
|
||||||
|
|
||||||
}
|
|
||||||
};
|
|
||||||
ajx.open("GET", path, ASYNC);
|
|
||||||
ajx.send();
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
if (typeof args.afterArticleLoad == "function") args.afterArticleLoad(a);
|
if (typeof args.afterArticleLoad == "function") args.afterArticleLoad();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -3354,12 +3368,26 @@ _core_core_js__WEBPACK_IMPORTED_MODULE_0__.init({
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// deprecated switch handler
|
// deprecated switch handler
|
||||||
const flipDeprecated = (e, s = e.currentTarget) => {
|
const flipInfoSwitch = (e, s = e.currentTarget) => {
|
||||||
_core_core_js__WEBPACK_IMPORTED_MODULE_0__.cookie.set("show-deprecated", s.getAttribute("aria-checked"), 30, "/");
|
|
||||||
document.querySelector("main").querySelectorAll("article[data-status=deprecated]").forEach((a) => {
|
switch(s.getAttribute("id")) {
|
||||||
a.classList[( s.getAttribute("aria-checked") == "true" ? "add" : "remove" )]("show-deprecated")
|
|
||||||
});
|
case "deprecated" :
|
||||||
|
_core_core_js__WEBPACK_IMPORTED_MODULE_0__.cookie.set("show-deprecated", s.getAttribute("aria-checked"), 30, "/");
|
||||||
|
document.querySelector("main").querySelectorAll("article[data-status=deprecated]").forEach((a) => {
|
||||||
|
a.classList[( s.getAttribute("aria-checked") == "true" ? "add" : "remove" )]("show-deprecated");
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "breakpoints" :
|
||||||
|
console.log("here")
|
||||||
|
_core_core_js__WEBPACK_IMPORTED_MODULE_0__.cookie.set("show-breakpoints", s.getAttribute("aria-checked"), 30, "/");
|
||||||
|
document.querySelector("html").classList[( s.getAttribute("aria-checked") == "true" ? "add" : "remove" )]("show-breakpoints");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// create a pure JS mouse click event
|
// create a pure JS mouse click event
|
||||||
@@ -3370,15 +3398,24 @@ const click = new MouseEvent('click', {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// get the switch, initialize it and add the handler
|
// get the switch, initialize it and add the handler
|
||||||
|
let switches = document.querySelector(".info-switches");
|
||||||
|
_pg_patterns_core_switch_switch_js__WEBPACK_IMPORTED_MODULE_8__.init(switches);
|
||||||
|
|
||||||
let deprecated = document.querySelector("#deprecated");
|
let deprecated = document.querySelector("#deprecated");
|
||||||
_pg_patterns_core_switch_switch_js__WEBPACK_IMPORTED_MODULE_8__.init(deprecated.parentNode)
|
let breakpoints = document.querySelector("#breakpoints");
|
||||||
deprecated.onclick = flipDeprecated;
|
|
||||||
deprecated.keypress = flipDeprecated;
|
deprecated.onclick = flipInfoSwitch;
|
||||||
|
deprecated.keypress = flipInfoSwitch;
|
||||||
|
breakpoints.onclick = flipInfoSwitch;
|
||||||
|
breakpoints.keypress = flipInfoSwitch;
|
||||||
|
|
||||||
// check a cookie to get the switch's state
|
// check a cookie to get the switch's state
|
||||||
if (_core_core_js__WEBPACK_IMPORTED_MODULE_0__.cookie.get("show-deprecated") == "true") {
|
if (_core_core_js__WEBPACK_IMPORTED_MODULE_0__.cookie.get("show-deprecated") == "true") {
|
||||||
deprecated.dispatchEvent(click);
|
deprecated.dispatchEvent(click);
|
||||||
}
|
}
|
||||||
|
if (_core_core_js__WEBPACK_IMPORTED_MODULE_0__.cookie.get("show-breakpoints") == "true") {
|
||||||
|
breakpoints.dispatchEvent(click);
|
||||||
|
}
|
||||||
|
|
||||||
// just for fun... We'll show deprecated if they match the path
|
// just for fun... We'll show deprecated if they match the path
|
||||||
// document.querySelector(`#${core.url.p.replace(/\//g, "-")}`).classList.add("show-deprecated");
|
// document.querySelector(`#${core.url.p.replace(/\//g, "-")}`).classList.add("show-deprecated");
|
||||||
|
File diff suppressed because one or more lines are too long
@@ -38,8 +38,9 @@
|
|||||||
<li><a href="./?p=status">Status</a></li>
|
<li><a href="./?p=status">Status</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
<p class="deprecated-switch"><span></span><span id="deprecated" role="switch"></span>
|
<p class="info-switches"><span></span><span id="deprecated" role="switch"></span>
|
||||||
<label for="deprecated">Show deprecated patterns</label>
|
<label for="deprecated">Show deprecated patterns</label><span></span><span id="breakpoints" role="switch"></span>
|
||||||
|
<label for="breakpoints">Show breakpoint information</label>
|
||||||
</p>
|
</p>
|
||||||
<main id="main">
|
<main id="main">
|
||||||
<h1>DS2 core</h1>
|
<h1>DS2 core</h1>
|
||||||
@@ -59,29 +60,29 @@
|
|||||||
<h1 class="status-complete"><span>Sticky note
|
<h1 class="status-complete"><span>Sticky note
|
||||||
<tool-tip role="tooltip" inert="inert" tip-position="right">Complete</tool-tip></span></h1>
|
<tool-tip role="tooltip" inert="inert" tip-position="right">Complete</tool-tip></span></h1>
|
||||||
</article>
|
</article>
|
||||||
<article id="components-switch" data-name="switch" data-status="in-progress" data-template="pug" data-core="true" data-path="components/switch">
|
<article id="components-switch" data-name="switch" data-status="complete" data-template="pug" data-core="true" data-path="components/switch">
|
||||||
<h1 class="status-in-progress"><span>Switch
|
<h1 class="status-complete"><span>Switch
|
||||||
<tool-tip role="tooltip" inert="inert" tip-position="right">In progress</tool-tip></span></h1>
|
<tool-tip role="tooltip" inert="inert" tip-position="right">Complete</tool-tip></span></h1>
|
||||||
</article>
|
</article>
|
||||||
<article id="components-tooltip" data-name="tooltip" data-status="in-progress" data-template="pug" data-core="true" data-path="components/tooltip">
|
<article id="components-tooltip" data-name="tooltip" data-status="complete" data-template="pug" data-core="true" data-path="components/tooltip">
|
||||||
<h1 class="status-in-progress"><span>Tooltip
|
<h1 class="status-complete"><span>Tooltip
|
||||||
<tool-tip role="tooltip" inert="inert" tip-position="right">In progress</tool-tip></span></h1>
|
<tool-tip role="tooltip" inert="inert" tip-position="right">Complete</tool-tip></span></h1>
|
||||||
</article>
|
</article>
|
||||||
<article id="layouts" data-name="layouts" data-status="complete" data-template="none" data-core="true" data-path="layouts">
|
<article id="layouts" data-name="layouts" data-status="complete" data-template="none" data-core="true" data-path="layouts">
|
||||||
<h1 class="status-complete"><span>Layouts
|
<h1 class="status-complete"><span>Layouts
|
||||||
<tool-tip role="tooltip" inert="inert" tip-position="right">Complete</tool-tip></span></h1>
|
<tool-tip role="tooltip" inert="inert" tip-position="right">Complete</tool-tip></span></h1>
|
||||||
</article>
|
</article>
|
||||||
<article id="layouts-header" data-name="header" data-status="in-progress" data-template="pug" data-core="true" data-path="layouts/header">
|
<article id="layouts-header" data-name="header" data-status="complete" data-template="pug" data-core="true" data-path="layouts/header">
|
||||||
<h1 class="status-in-progress"><span>Header
|
<h1 class="status-complete"><span>Header
|
||||||
<tool-tip role="tooltip" inert="inert" tip-position="right">In progress</tool-tip></span></h1>
|
<tool-tip role="tooltip" inert="inert" tip-position="right">Complete</tool-tip></span></h1>
|
||||||
</article>
|
</article>
|
||||||
<article id="layouts-breakpoints" data-name="breakpoints" data-status="in-progress" data-template="pug" data-core="true" data-path="layouts/breakpoints">
|
<article id="layouts-breakpoints" data-name="breakpoints" data-status="complete" data-template="pug" data-core="true" data-path="layouts/breakpoints">
|
||||||
<h1 class="status-in-progress"><span>Breakpoints
|
<h1 class="status-complete"><span>Breakpoints
|
||||||
<tool-tip role="tooltip" inert="inert" tip-position="right">In progress</tool-tip></span></h1>
|
<tool-tip role="tooltip" inert="inert" tip-position="right">Complete</tool-tip></span></h1>
|
||||||
</article>
|
</article>
|
||||||
<article id="layouts-tabs" data-name="tabs" data-status="in-progress" data-template="pug" data-core="true" data-path="layouts/tabs">
|
<article id="layouts-tabs" data-name="tabs" data-status="complete" data-template="pug" data-core="true" data-path="layouts/tabs">
|
||||||
<h1 class="status-in-progress"><span>Tabs
|
<h1 class="status-complete"><span>Tabs
|
||||||
<tool-tip role="tooltip" inert="inert" tip-position="right">In progress</tool-tip></span></h1>
|
<tool-tip role="tooltip" inert="inert" tip-position="right">Complete</tool-tip></span></h1>
|
||||||
</article>
|
</article>
|
||||||
<article id="status" data-name="status" data-status="complete" data-template="pug" data-core="true" data-path="status">
|
<article id="status" data-name="status" data-status="complete" data-template="pug" data-core="true" data-path="status">
|
||||||
<h1 class="status-complete"><span>Status
|
<h1 class="status-complete"><span>Status
|
||||||
|
@@ -5,8 +5,12 @@
|
|||||||
</head>
|
</head>
|
||||||
<body data-prismjs-copy-timeout="1500">
|
<body data-prismjs-copy-timeout="1500">
|
||||||
<h2>What is it</h2>
|
<h2>What is it</h2>
|
||||||
|
<p>Breakpoints enable responsive mobile design.</p>
|
||||||
<h2>When to use it</h2>
|
<h2>When to use it</h2>
|
||||||
|
<p>Use breakpoints when designing for different screen sizes. </p>
|
||||||
|
<p>The breakpoints SCSS mixin included implements media queries to allow for the change of the layout and design based on pre-defined screen sizes. </p>
|
||||||
<h2>How to use it</h2>
|
<h2>How to use it</h2>
|
||||||
|
<p>This pattern is only available for SCSS breakpoints. The mixin is avai</p>
|
||||||
<p>When using this, use the default break points as they are set to the same as the Bootstrap framework. The grid for the design system at large break point has been widened to accompdate 3 colour cards across. </p>
|
<p>When using this, use the default break points as they are set to the same as the Bootstrap framework. The grid for the design system at large break point has been widened to accompdate 3 colour cards across. </p>
|
||||||
<div class="tab-group" id="breakpoints">
|
<div class="tab-group" id="breakpoints">
|
||||||
<pre class="language-css" data-tab="scss">//- DS2 core (c) 2024 Alexander McIlwraith
|
<pre class="language-css" data-tab="scss">//- DS2 core (c) 2024 Alexander McIlwraith
|
||||||
|
@@ -5,8 +5,11 @@
|
|||||||
</head>
|
</head>
|
||||||
<body data-prismjs-copy-timeout="1500">
|
<body data-prismjs-copy-timeout="1500">
|
||||||
<h2>What is it</h2>
|
<h2>What is it</h2>
|
||||||
|
<p>A header is layout pattern that helps the user identify the site. </p>
|
||||||
<h2>When to use it</h2>
|
<h2>When to use it</h2>
|
||||||
|
<p>Use a header at the top of every page. The 'front page' of a site may have a different header than the rest of the pages. </p>
|
||||||
<h2>How to use it</h2>
|
<h2>How to use it</h2>
|
||||||
|
<p>Place the header at the top of the page after the skip to main content link. This basic header should be replaced with your own site's header. </p>
|
||||||
<div class="tab-group" id="header">
|
<div class="tab-group" id="header">
|
||||||
<pre class="language-html" data-tab="html">
|
<pre class="language-html" data-tab="html">
|
||||||
<!-- create temp variables and store the design system values-->
|
<!-- create temp variables and store the design system values-->
|
||||||
@@ -22,6 +25,89 @@
|
|||||||
<!-- Other sections can go here, such as search and directory-->
|
<!-- Other sections can go here, such as search and directory-->
|
||||||
</div>
|
</div>
|
||||||
</header></pre>
|
</header></pre>
|
||||||
|
<pre class="language-html" data-tab="html">
|
||||||
|
<header>
|
||||||
|
<!-- The headline banner area -->
|
||||||
|
<svg height="5.5rem" width="100%" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
||||||
|
<text>DS2 core</text>
|
||||||
|
</svg>
|
||||||
|
<div>
|
||||||
|
<div class="header-title">
|
||||||
|
<h1> <a href="./">DS2 core</a></h1>
|
||||||
|
</div>
|
||||||
|
<!-- Other sections can go here, such as search and directory-->
|
||||||
|
</div>
|
||||||
|
</header></pre>
|
||||||
|
<pre class="language-pug" data-tab="pug">//- DS2 core (c) 2024 Alexander McIlwraith
|
||||||
|
//- Licensed under CC BY-SA 4.0
|
||||||
|
|
||||||
|
//- required variables
|
||||||
|
//- site - the site name that goes in the site title
|
||||||
|
//- root - the path to the root of the site
|
||||||
|
|
||||||
|
header
|
||||||
|
// The headline banner area
|
||||||
|
svg(height='5.5rem' width='100%' xmlns='http://www.w3.org/2000/svg' aria-hidden='true')
|
||||||
|
text= site
|
||||||
|
div
|
||||||
|
div.header-title
|
||||||
|
h1
|
||||||
|
a(href="./")= site
|
||||||
|
// Other sections can go here, such as search and directory
|
||||||
|
</pre>
|
||||||
|
<pre class="language-css" data-tab="css">header {
|
||||||
|
display: -ms-grid;
|
||||||
|
display: grid;
|
||||||
|
-ms-grid-rows: 1.75rem 3.5rem;
|
||||||
|
grid-template-rows: 1.75rem 3.5rem;
|
||||||
|
-ms-grid-column: 2;
|
||||||
|
-ms-grid-column-span: 2;
|
||||||
|
grid-column: 2/4;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
header svg {
|
||||||
|
grid-column: 1/-1;
|
||||||
|
grid-row: 1/-1;
|
||||||
|
-ms-grid-row-align: stretch;
|
||||||
|
-ms-grid-column-align: stretch;
|
||||||
|
place-self: stretch;
|
||||||
|
}
|
||||||
|
header svg text {
|
||||||
|
-webkit-transform: translate(-1rem, 7.25rem);
|
||||||
|
-ms-transform: translate(-1rem, 7.25rem);
|
||||||
|
transform: translate(-1rem, 7.25rem);
|
||||||
|
font-size: 10rem;
|
||||||
|
font-weight: 1000;
|
||||||
|
font-family: sans-serif;
|
||||||
|
fill: var(--colour-grey-xxl);
|
||||||
|
}
|
||||||
|
header > div {
|
||||||
|
-ms-grid-row: 2;
|
||||||
|
grid-row: 2;
|
||||||
|
grid-column: 1/-1;
|
||||||
|
display: -ms-grid;
|
||||||
|
display: grid;
|
||||||
|
grid-column-gap: 1rem;
|
||||||
|
-ms-grid-columns: auto -webkit-max-content -webkit-max-content;
|
||||||
|
-ms-grid-columns: auto max-content max-content;
|
||||||
|
grid-template-columns: auto -webkit-max-content -webkit-max-content;
|
||||||
|
grid-template-columns: auto max-content max-content;
|
||||||
|
}
|
||||||
|
header > div .header-title h1 {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0 1rem;
|
||||||
|
}
|
||||||
|
header > div .header-title h1 a, header > div .header-title h1 a:visited {
|
||||||
|
border-bottom: none;
|
||||||
|
color: var(--colour-black);
|
||||||
|
font-family: sans-serif;
|
||||||
|
font-size: 2.5rem;
|
||||||
|
font-size: 32px;
|
||||||
|
font-weight: 700;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
text-decoration: none;
|
||||||
|
}</pre>
|
||||||
<pre class="language-sass" data-tab="scss">//- DS2 core (c) 2024 Alexander McIlwraith
|
<pre class="language-sass" data-tab="scss">//- DS2 core (c) 2024 Alexander McIlwraith
|
||||||
//- Licensed under CC BY-SA 4.0
|
//- Licensed under CC BY-SA 4.0
|
||||||
|
|
||||||
@@ -75,59 +161,6 @@ $font-weight: 700 !default;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}</pre>
|
|
||||||
<pre class="language-css" data-tab="css">header {
|
|
||||||
display: -ms-grid;
|
|
||||||
display: grid;
|
|
||||||
-ms-grid-rows: 1.75rem 3.5rem;
|
|
||||||
grid-template-rows: 1.75rem 3.5rem;
|
|
||||||
-ms-grid-column: 2;
|
|
||||||
-ms-grid-column-span: 2;
|
|
||||||
grid-column: 2/4;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
header svg {
|
|
||||||
grid-column: 1/-1;
|
|
||||||
grid-row: 1/-1;
|
|
||||||
-ms-grid-row-align: stretch;
|
|
||||||
-ms-grid-column-align: stretch;
|
|
||||||
place-self: stretch;
|
|
||||||
}
|
|
||||||
header svg text {
|
|
||||||
-webkit-transform: translate(-1rem, 7.25rem);
|
|
||||||
-ms-transform: translate(-1rem, 7.25rem);
|
|
||||||
transform: translate(-1rem, 7.25rem);
|
|
||||||
font-size: 10rem;
|
|
||||||
font-weight: 1000;
|
|
||||||
font-family: sans-serif;
|
|
||||||
fill: var(--colour-grey-xxl);
|
|
||||||
}
|
|
||||||
header > div {
|
|
||||||
-ms-grid-row: 2;
|
|
||||||
grid-row: 2;
|
|
||||||
grid-column: 1/-1;
|
|
||||||
display: -ms-grid;
|
|
||||||
display: grid;
|
|
||||||
grid-column-gap: 1rem;
|
|
||||||
-ms-grid-columns: auto -webkit-max-content -webkit-max-content;
|
|
||||||
-ms-grid-columns: auto max-content max-content;
|
|
||||||
grid-template-columns: auto -webkit-max-content -webkit-max-content;
|
|
||||||
grid-template-columns: auto max-content max-content;
|
|
||||||
}
|
|
||||||
header > div .header-title h1 {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0 1rem;
|
|
||||||
}
|
|
||||||
header > div .header-title h1 a, header > div .header-title h1 a:visited {
|
|
||||||
border-bottom: none;
|
|
||||||
color: var(--colour-black);
|
|
||||||
font-family: sans-serif;
|
|
||||||
font-size: 2.5rem;
|
|
||||||
font-size: 32px;
|
|
||||||
font-weight: 700;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
text-decoration: none;
|
|
||||||
}</pre>
|
}</pre>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
@@ -34,11 +34,11 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="./?p=components/switch"> Switch</a></td>
|
<td><a href="./?p=components/switch"> Switch</a></td>
|
||||||
<td><span class="status-in-progress">In progress</span></td>
|
<td><span class="status-complete">Complete</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="./?p=components/tooltip"> Tooltip</a></td>
|
<td><a href="./?p=components/tooltip"> Tooltip</a></td>
|
||||||
<td><span class="status-in-progress">In progress</span></td>
|
<td><span class="status-complete">Complete</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -49,15 +49,15 @@
|
|||||||
<td><span class="status-complete">Complete</span></td>
|
<td><span class="status-complete">Complete</span></td>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="./?p=layouts/header"> Header</a></td>
|
<td><a href="./?p=layouts/header"> Header</a></td>
|
||||||
<td><span class="status-in-progress">In progress</span></td>
|
<td><span class="status-complete">Complete</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="./?p=layouts/breakpoints"> Breakpoints</a></td>
|
<td><a href="./?p=layouts/breakpoints"> Breakpoints</a></td>
|
||||||
<td><span class="status-in-progress">In progress</span></td>
|
<td><span class="status-complete">Complete</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="./?p=layouts/tabs"> Tabs</a></td>
|
<td><a href="./?p=layouts/tabs"> Tabs</a></td>
|
||||||
<td><span class="status-in-progress">In progress</span></td>
|
<td><span class="status-complete">Complete</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -77,31 +77,15 @@
|
|||||||
<td colspan="2"><span class="status-not-started">Not started (0)</span></td>
|
<td colspan="2"><span class="status-not-started">Not started (0)</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"><span class="status-in-progress">In progress (5)</span></td>
|
<td colspan="2"><span class="status-in-progress">In progress (0)</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"><span class="status-complete">Complete (10)</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <a href="./?p=layouts/breakpoints">Breakpoints</a></td>
|
<td> <a href="./?p=layouts/breakpoints">Breakpoints</a></td>
|
||||||
<td>Layouts</td>
|
<td>Layouts</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td> <a href="./?p=layouts/header">Header</a></td>
|
|
||||||
<td>Layouts</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td> <a href="./?p=components/switch">Switch</a></td>
|
|
||||||
<td>Components</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td> <a href="./?p=layouts/tabs">Tabs</a></td>
|
|
||||||
<td>Layouts</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td> <a href="./?p=components/tooltip">Tooltip</a></td>
|
|
||||||
<td>Components</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2"><span class="status-complete">Complete (5)</span></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td> <a href="./?p=colours">Colours</a></td>
|
<td> <a href="./?p=colours">Colours</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
@@ -110,6 +94,10 @@
|
|||||||
<td> <a href="./?p=components">Components</a></td>
|
<td> <a href="./?p=components">Components</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> <a href="./?p=layouts/header">Header</a></td>
|
||||||
|
<td>Layouts</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <a href="./?p=layouts">Layouts</a></td>
|
<td> <a href="./?p=layouts">Layouts</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
@@ -122,6 +110,18 @@
|
|||||||
<td> <a href="./?p=components/sticky-note">Sticky note</a></td>
|
<td> <a href="./?p=components/sticky-note">Sticky note</a></td>
|
||||||
<td>Components</td>
|
<td>Components</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> <a href="./?p=components/switch">Switch</a></td>
|
||||||
|
<td>Components</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> <a href="./?p=layouts/tabs">Tabs</a></td>
|
||||||
|
<td>Layouts</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> <a href="./?p=components/tooltip">Tooltip</a></td>
|
||||||
|
<td>Components</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"><span class="status-deprecated">Deprecated (1)</span></td>
|
<td colspan="2"><span class="status-deprecated">Deprecated (1)</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -137,7 +137,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <a href="./?p=layouts/breakpoints">Breakpoints</a></td>
|
<td> <a href="./?p=layouts/breakpoints">Breakpoints</a></td>
|
||||||
<td><span><span class="status-in-progress">In Progress</span></span></td>
|
<td><span><span class="status-complete">Complete</span></span></td>
|
||||||
<td>Layouts</td>
|
<td>Layouts</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -152,7 +152,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <a href="./?p=layouts/header">Header</a></td>
|
<td> <a href="./?p=layouts/header">Header</a></td>
|
||||||
<td><span><span class="status-in-progress">In Progress</span></span></td>
|
<td><span><span class="status-complete">Complete</span></span></td>
|
||||||
<td>Layouts</td>
|
<td>Layouts</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -172,12 +172,12 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <a href="./?p=components/switch">Switch</a></td>
|
<td> <a href="./?p=components/switch">Switch</a></td>
|
||||||
<td><span><span class="status-in-progress">In Progress</span></span></td>
|
<td><span><span class="status-complete">Complete</span></span></td>
|
||||||
<td>Components</td>
|
<td>Components</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <a href="./?p=layouts/tabs">Tabs</a></td>
|
<td> <a href="./?p=layouts/tabs">Tabs</a></td>
|
||||||
<td><span><span class="status-in-progress">In Progress</span></span></td>
|
<td><span><span class="status-complete">Complete</span></span></td>
|
||||||
<td>Layouts</td>
|
<td>Layouts</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -187,7 +187,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <a href="./?p=components/tooltip">Tooltip</a></td>
|
<td> <a href="./?p=components/tooltip">Tooltip</a></td>
|
||||||
<td><span><span class="status-in-progress">In Progress</span></span></td>
|
<td><span><span class="status-complete">Complete</span></span></td>
|
||||||
<td>Components</td>
|
<td>Components</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
<tabset id="sticky-note">
|
<tabset id="sticky-note">
|
||||||
<pre class="language-html" tab="html">
|
<pre class="language-html" tab="html">
|
||||||
<sticky-note class="blue" float="right">This <strong>is</strong> a sample sticky. You can drag it out of the way if you need to see the content under it.</sticky-note></pre>
|
<sticky-note class="blue" float="right">This <strong>is</strong> a sample sticky. You can drag it out of the way if you need to see the content under it.</sticky-note></pre>
|
||||||
<pre class="language-pug" tab="pug">sticky-note(float="right").blue This <strong>is</strong> a sample sticky.
|
<pre class="language-pug" tab="pug">sticky-note(float="right").blue This #[strong is] a sample sticky.
|
||||||
| You can drag it out of the way if you need to see the content under it.</pre>
|
| You can drag it out of the way if you need to see the content under it.</pre>
|
||||||
<pre class="language-css" data-tab="css"> @import url("https://fonts.googleapis.com/css2?family=Kalam:wght@300;400;700&display=swap");
|
<pre class="language-css" data-tab="css"> @import url("https://fonts.googleapis.com/css2?family=Kalam:wght@300;400;700&display=swap");
|
||||||
sticky-note-wrapper {
|
sticky-note-wrapper {
|
||||||
|
@@ -5,12 +5,15 @@
|
|||||||
</head>
|
</head>
|
||||||
<body data-prismjs-copy-timeout="1500">
|
<body data-prismjs-copy-timeout="1500">
|
||||||
<h2>What is it</h2>
|
<h2>What is it</h2>
|
||||||
<p>Switches are used to toggle application state between two mutually exlusive values. </p>
|
<p>Switches are used to toggle application state between two mutually exclusive values. </p>
|
||||||
<h2>When to use it</h2>
|
<h2>When to use it</h2>
|
||||||
|
<p>Use a switch when the user will see an immediate visible state change. Do not use a switch when the state change will affect future results. The user should not have to perform another action (search, save, etc) for the result to take affect. If the change in state does not take effect immediately, consider a checkbox. </p>
|
||||||
<h2>How to use it</h2>
|
<h2>How to use it</h2>
|
||||||
|
<p>The switch label should describe what will happen when the switch is turned to the on state. Frontload labels with keywords. </p>
|
||||||
|
<p>Include the CSS and JavaScript. An additional handler will need to be created for the actual state change. The CSS implements the visual design of the switch, which is based on the accessibility properties, which are implemented by the JavaScript.</p>
|
||||||
<h2>Example</h2>
|
<h2>Example</h2>
|
||||||
<p class="switch">
|
<p class="switch">
|
||||||
<label for="example-switch">Switch label</label><span id="example-switch" role="switch"></span>
|
<label for="example-switch">Switch label (states the on state)</label><span id="example-switch" role="switch"></span>
|
||||||
</p>
|
</p>
|
||||||
<div class="tab-group" id="switches">
|
<div class="tab-group" id="switches">
|
||||||
<pre class="language-html" data-tab="html"><span id="example-id" role="switch"></span></pre>
|
<pre class="language-html" data-tab="html"><span id="example-id" role="switch"></span></pre>
|
||||||
@@ -46,9 +49,9 @@
|
|||||||
|
|
||||||
@use "sass:math";
|
@use "sass:math";
|
||||||
|
|
||||||
$switch-accent: var(--colour-blue) !default; // switch background when switched right (on/ true)
|
$switch-accent: #2e51a1 !default; // switch background when switched right (on/ true)
|
||||||
$switch-background: var(--colour-grey-xl) !default; // switch background when switched left (off / false)
|
$switch-background: #d8d8d8 !default; // switch background when switched left (off / false)
|
||||||
$switch-color: var(--colour-white) !default; // the colour of the switch
|
$switch-color: white !default; // the colour of the switch
|
||||||
$switch-height: 1.5rem !default;
|
$switch-height: 1.5rem !default;
|
||||||
|
|
||||||
@mixin switch {
|
@mixin switch {
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
</head>
|
</head>
|
||||||
<body data-prismjs-copy-timeout="1500">
|
<body data-prismjs-copy-timeout="1500">
|
||||||
<h2>What is it</h2>
|
<h2>What is it</h2>
|
||||||
<h2>When to use it</h2>
|
<p>A tabs component that provides different sections of content that are displayed one at a time when the user selects that information. </p>
|
||||||
<h2>How to use it</h2>
|
<h2>How to use it</h2>
|
||||||
<p>The tabbed user interface enables users to jump to their target section quickly. Tabs present like logically group information on the same page. Information should </p>
|
<p>The tabbed user interface enables users to jump to their target section quickly. Tabs present like logically group information on the same page. Information should </p>
|
||||||
<ul>
|
<ul>
|
||||||
@@ -15,6 +15,7 @@
|
|||||||
<li>obvious where they begin and end </li>
|
<li>obvious where they begin and end </li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>Users should not need to see content of multiple tabs simultaneously and the user should be able to easily recognise where they are within the content. </p>
|
<p>Users should not need to see content of multiple tabs simultaneously and the user should be able to easily recognise where they are within the content. </p>
|
||||||
|
<h2>When to use it</h2>
|
||||||
<p>The tab module can be initialised by importing a file with the javascript module using import * as tabs from "../pg/patterns/layouts/tabs/_tabs.js"; contains a modularized version of the jQuery code, so that it can be called on demand. It is what is used in the design system so that the JavaScript can be called at run time (after loading content).</p>
|
<p>The tab module can be initialised by importing a file with the javascript module using import * as tabs from "../pg/patterns/layouts/tabs/_tabs.js"; contains a modularized version of the jQuery code, so that it can be called on demand. It is what is used in the design system so that the JavaScript can be called at run time (after loading content).</p>
|
||||||
<tabset id="tabs">
|
<tabset id="tabs">
|
||||||
<pre class="language-html" tab="html">
|
<pre class="language-html" tab="html">
|
||||||
@@ -22,6 +23,10 @@
|
|||||||
<div data-tab="[tab title]"></div>
|
<div data-tab="[tab title]"></div>
|
||||||
<div data-tab="[tab title]"></div>
|
<div data-tab="[tab title]"></div>
|
||||||
</div></pre>
|
</div></pre>
|
||||||
|
<pre class="language-pug" tab="pug">div#uniqueID.tab-group
|
||||||
|
div(data-tab="[tab title]")
|
||||||
|
div(data-tab="[tab title]")
|
||||||
|
</pre>
|
||||||
<pre class="language-css" tab="css">tabset, .tab-group {
|
<pre class="language-css" tab="css">tabset, .tab-group {
|
||||||
margin: 2rem 0 1rem 0;
|
margin: 2rem 0 1rem 0;
|
||||||
}
|
}
|
||||||
@@ -77,9 +82,9 @@ tabset [role=tabpanel]:not(.open), .tab-group [role=tabpanel]:not(.open) {
|
|||||||
<pre class="language-css" tab="scss">// DS2 core (c) 2024 Alexander McIlwraith
|
<pre class="language-css" tab="scss">// DS2 core (c) 2024 Alexander McIlwraith
|
||||||
// Licensed under CC BY-SA 4.0
|
// Licensed under CC BY-SA 4.0
|
||||||
|
|
||||||
$tab-border: var(--colour-grey) !default;
|
$tab-border: #7f7f7f !default;
|
||||||
$tab-selected: var(--colour-white) !default;
|
$tab-selected: #FFF !default;
|
||||||
$tab-notselected: var(--colour-grey-xxl) !default;
|
$tab-notselected: #f0f0f0 !default;
|
||||||
|
|
||||||
@mixin tabs {
|
@mixin tabs {
|
||||||
tabset, .tab-group {
|
tabset, .tab-group {
|
||||||
|
@@ -5,9 +5,13 @@
|
|||||||
</head>
|
</head>
|
||||||
<body data-prismjs-copy-timeout="1500">
|
<body data-prismjs-copy-timeout="1500">
|
||||||
<h2>What is it</h2>
|
<h2>What is it</h2>
|
||||||
|
<p>Tooltips provide brief information messaging through a mouse or keyboard hover. </p>
|
||||||
<h2>When to use it</h2>
|
<h2>When to use it</h2>
|
||||||
|
<p>Use tool tips to provide additional information. Don't use tooltips for that is required to complete an interaction as the information disappears when it loses the hover state. </p>
|
||||||
|
<p>Use tooltips to help differentiate between multiple, close, similar options. </p>
|
||||||
<h2>How to use it</h2>
|
<h2>How to use it</h2>
|
||||||
<p>Either form works. Place this inside another element for the tooltip to be "linked to that element."</p>
|
<p class="notification-box info">Currently, there is no easy way to activate a hover without with pure CSS without using a keyboard or mouse. Level4 media queries aim to solve that.</p>
|
||||||
|
<p>Either form works. Place this inside another element for the tooltip to be 'linked to that element.' A container element may need to be added for a single tag element, such as a input field. </p>
|
||||||
<p>Tool tip positions are: </p>
|
<p>Tool tip positions are: </p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>top / block-start</li>
|
<li>top / block-start</li>
|
||||||
@@ -15,15 +19,11 @@
|
|||||||
<li>bottom / block-end</li>
|
<li>bottom / block-end</li>
|
||||||
<li>left / inline-start</li>
|
<li>left / inline-start</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<p><a href="#">Link with a tool tip<span role="tooltip" inert="inert" tip-position="right">Tool tip content</span></a></p>
|
||||||
<div class="tab-group" id="tooltip">
|
<div class="tab-group" id="tooltip">
|
||||||
<pre class="language-html" data-tab="html"><a href="#">Link with a tool tip
|
<pre class="language-html" data-tab="html"><a href="#">Link with a tool tip<span role="tooltip" inert="inert" tip-position="right">Tool tip content</span></a></pre>
|
||||||
<div role="tooltip" inert="inert" tip-position="bottom">Tool tip content</div></a><a href="#">Link with a tool tip
|
|
||||||
<tool-tip role="tooltip" inert="inert" tip-position="bottom">Tool tip content</tool-tip></a></pre>
|
|
||||||
<pre class="language-pug" data-tab="pug">a(href="#") Link with a tool tip
|
<pre class="language-pug" data-tab="pug">a(href="#") Link with a tool tip
|
||||||
div(role="tooltip" inert tip-position="bottom") Tool tip content
|
span(role="tooltip" inert tip-position="right") Tool tip content</pre>
|
||||||
|
|
||||||
a(href="#") Link with a tool tip
|
|
||||||
tool-tip(role="tooltip" inert tip-position="bottom") Tool tip content</pre>
|
|
||||||
<pre class="language-css" data-tab="css">/* Position Options
|
<pre class="language-css" data-tab="css">/* Position Options
|
||||||
- top / block-start
|
- top / block-start
|
||||||
- right / inline-end
|
- right / inline-end
|
||||||
|
@@ -185,8 +185,7 @@ module.exports = {
|
|||||||
|
|
||||||
document.querySelectorAll("article").forEach((a) => {
|
document.querySelectorAll("article").forEach((a) => {
|
||||||
if ( a.getAttribute("data-template") != "none" ) {
|
if ( a.getAttribute("data-template") != "none" ) {
|
||||||
|
const observer = new IntersectionObserver(articles => {
|
||||||
const observer = new IntersectionObserver((articles, { threshold: 0, rootMargin: 50vh}) => {
|
|
||||||
articles.forEach(article => {
|
articles.forEach(article => {
|
||||||
let a = article.target;
|
let a = article.target;
|
||||||
|
|
||||||
@@ -202,7 +201,8 @@ module.exports = {
|
|||||||
let ajx = new XMLHttpRequest();
|
let ajx = new XMLHttpRequest();
|
||||||
ajx.onreadystatechange = () => {
|
ajx.onreadystatechange = () => {
|
||||||
if (ajx.readyState == 4) {
|
if (ajx.readyState == 4) {
|
||||||
|
|
||||||
|
observer.unobserve(article.target);
|
||||||
switch (ajx.status) {
|
switch (ajx.status) {
|
||||||
case 200:
|
case 200:
|
||||||
a.innerHTML = a.innerHTML + ajx.responseText;
|
a.innerHTML = a.innerHTML + ajx.responseText;
|
||||||
@@ -277,7 +277,7 @@ module.exports = {
|
|||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
}, { threshold: 0, rootMargin: (document.body.clientHeight / 2) + "px" })
|
||||||
|
|
||||||
observer.observe(a);
|
observer.observe(a);
|
||||||
|
|
||||||
|
@@ -26,12 +26,26 @@ core.init({
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// deprecated switch handler
|
// deprecated switch handler
|
||||||
const flipDeprecated = (e, s = e.currentTarget) => {
|
const flipInfoSwitch = (e, s = e.currentTarget) => {
|
||||||
core.cookie.set("show-deprecated", s.getAttribute("aria-checked"), 30, "/");
|
|
||||||
document.querySelector("main").querySelectorAll("article[data-status=deprecated]").forEach((a) => {
|
switch(s.getAttribute("id")) {
|
||||||
a.classList[( s.getAttribute("aria-checked") == "true" ? "add" : "remove" )]("show-deprecated")
|
|
||||||
});
|
case "deprecated" :
|
||||||
|
core.cookie.set("show-deprecated", s.getAttribute("aria-checked"), 30, "/");
|
||||||
|
document.querySelector("main").querySelectorAll("article[data-status=deprecated]").forEach((a) => {
|
||||||
|
a.classList[( s.getAttribute("aria-checked") == "true" ? "add" : "remove" )]("show-deprecated");
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "breakpoints" :
|
||||||
|
console.log("here")
|
||||||
|
core.cookie.set("show-breakpoints", s.getAttribute("aria-checked"), 30, "/");
|
||||||
|
document.querySelector("html").classList[( s.getAttribute("aria-checked") == "true" ? "add" : "remove" )]("show-breakpoints");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// create a pure JS mouse click event
|
// create a pure JS mouse click event
|
||||||
@@ -42,15 +56,24 @@ const click = new MouseEvent('click', {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// get the switch, initialize it and add the handler
|
// get the switch, initialize it and add the handler
|
||||||
|
let switches = document.querySelector(".info-switches");
|
||||||
|
swtch.init(switches);
|
||||||
|
|
||||||
let deprecated = document.querySelector("#deprecated");
|
let deprecated = document.querySelector("#deprecated");
|
||||||
swtch.init(deprecated.parentNode)
|
let breakpoints = document.querySelector("#breakpoints");
|
||||||
deprecated.onclick = flipDeprecated;
|
|
||||||
deprecated.keypress = flipDeprecated;
|
deprecated.onclick = flipInfoSwitch;
|
||||||
|
deprecated.keypress = flipInfoSwitch;
|
||||||
|
breakpoints.onclick = flipInfoSwitch;
|
||||||
|
breakpoints.keypress = flipInfoSwitch;
|
||||||
|
|
||||||
// check a cookie to get the switch's state
|
// check a cookie to get the switch's state
|
||||||
if (core.cookie.get("show-deprecated") == "true") {
|
if (core.cookie.get("show-deprecated") == "true") {
|
||||||
deprecated.dispatchEvent(click);
|
deprecated.dispatchEvent(click);
|
||||||
}
|
}
|
||||||
|
if (core.cookie.get("show-breakpoints") == "true") {
|
||||||
|
breakpoints.dispatchEvent(click);
|
||||||
|
}
|
||||||
|
|
||||||
// just for fun... We'll show deprecated if they match the path
|
// just for fun... We'll show deprecated if they match the path
|
||||||
// document.querySelector(`#${core.url.p.replace(/\//g, "-")}`).classList.add("show-deprecated");
|
// document.querySelector(`#${core.url.p.replace(/\//g, "-")}`).classList.add("show-deprecated");
|
||||||
|
@@ -27,12 +27,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "switch",
|
name: "switch",
|
||||||
status: "in-progress",
|
status: "complete",
|
||||||
core: true,
|
core: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "tooltip",
|
name: "tooltip",
|
||||||
status: "in-progress",
|
status: "complete",
|
||||||
core: true,
|
core: true,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
@@ -45,17 +45,17 @@
|
|||||||
files: [
|
files: [
|
||||||
{
|
{
|
||||||
name: "header",
|
name: "header",
|
||||||
status: "in-progress",
|
status: "complete",
|
||||||
core: true,
|
core: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "breakpoints",
|
name: "breakpoints",
|
||||||
status: "in-progress",
|
status: "complete",
|
||||||
core: true,
|
core: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "tabs",
|
name: "tabs",
|
||||||
status: "in-progress",
|
status: "complete",
|
||||||
core: true,
|
core: true,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
@@ -16,7 +16,10 @@ block header
|
|||||||
li(class= navClass)
|
li(class= navClass)
|
||||||
a(href="./?p=" + first.name.toPath() )= first.name.toContent().toSentenceCase()
|
a(href="./?p=" + first.name.toPath() )= first.name.toContent().toSentenceCase()
|
||||||
|
|
||||||
p.deprecated-switch
|
p.info-switches
|
||||||
span
|
span
|
||||||
span#deprecated(role="switch")
|
span#deprecated(role="switch")
|
||||||
label(for="deprecated") Show deprecated patterns
|
label(for="deprecated") Show deprecated patterns
|
||||||
|
span
|
||||||
|
span#breakpoints(role="switch")
|
||||||
|
label(for="breakpoints") Show breakpoint information
|
@@ -5,8 +5,15 @@ extends ../../../core/_master-pattern
|
|||||||
block content
|
block content
|
||||||
|
|
||||||
+h(0)
|
+h(0)
|
||||||
|
p Breakpoints enable responsive mobile design.
|
||||||
|
|
||||||
+h(1)
|
+h(1)
|
||||||
|
p Use breakpoints when designing for different screen sizes.
|
||||||
|
|
||||||
|
p The breakpoints SCSS mixin included implements media queries to allow for the change of the layout and design based on pre-defined screen sizes.
|
||||||
|
|
||||||
+h(2)
|
+h(2)
|
||||||
|
p This pattern is only available for SCSS breakpoints. The mixin is avai
|
||||||
|
|
||||||
p When using this, use the default break points as they are set to the same as the Bootstrap framework. The grid for the design system at large break point has been widened to accompdate 3 colour cards across.
|
p When using this, use the default break points as they are set to the same as the Bootstrap framework. The grid for the design system at large break point has been widened to accompdate 3 colour cards across.
|
||||||
|
|
||||||
|
16
src/pg/patterns/core/header/_header.pp
Normal file
16
src/pg/patterns/core/header/_header.pp
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
//- DS2 core (c) 2024 Alexander McIlwraith
|
||||||
|
//- Licensed under CC BY-SA 4.0
|
||||||
|
|
||||||
|
//- required variables
|
||||||
|
//- site - the site name that goes in the site title
|
||||||
|
//- root - the path to the root of the site
|
||||||
|
|
||||||
|
header
|
||||||
|
// The headline banner area
|
||||||
|
svg(height='5.5rem' width='100%' xmlns='http://www.w3.org/2000/svg' aria-hidden='true')
|
||||||
|
text= site
|
||||||
|
div
|
||||||
|
div.header-title
|
||||||
|
h1
|
||||||
|
a(href="./")= site
|
||||||
|
// Other sections can go here, such as search and directory
|
@@ -5,8 +5,13 @@ extends ../../../core/_master-pattern
|
|||||||
block content
|
block content
|
||||||
|
|
||||||
+h(0)
|
+h(0)
|
||||||
|
p A header is layout pattern that helps the user identify the site.
|
||||||
+h(1)
|
+h(1)
|
||||||
|
p Use a header at the top of every page. The 'front page' of a site may have a different header than the rest of the pages.
|
||||||
|
|
||||||
+h(2)
|
+h(2)
|
||||||
|
p Place the header at the top of the page after the skip to main content link. This basic header should be replaced with your own site's header.
|
||||||
|
|
||||||
|
|
||||||
div.tab-group#header
|
div.tab-group#header
|
||||||
pre.language-html(data-tab="html")
|
pre.language-html(data-tab="html")
|
||||||
@@ -22,7 +27,11 @@ block content
|
|||||||
- site= tmpsite
|
- site= tmpsite
|
||||||
- root= tmproot
|
- root= tmproot
|
||||||
|
|
||||||
pre.language-sass(data-tab="scss")
|
pre.language-html(data-tab="html")
|
||||||
include _header.scss
|
include _header.pug
|
||||||
|
pre.language-pug(data-tab="pug")
|
||||||
|
include _header.pp
|
||||||
pre.language-css(data-tab="css")
|
pre.language-css(data-tab="css")
|
||||||
include header.css
|
include header.css
|
||||||
|
pre.language-sass(data-tab="scss")
|
||||||
|
include _header.scss
|
2
src/pg/patterns/core/sticky-note/_sticky-note.pp
Normal file
2
src/pg/patterns/core/sticky-note/_sticky-note.pp
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
sticky-note(float="right").blue This #[strong is] a sample sticky.
|
||||||
|
| You can drag it out of the way if you need to see the content under it.
|
2
src/pg/patterns/core/sticky-note/_sticky-note.pug
Normal file
2
src/pg/patterns/core/sticky-note/_sticky-note.pug
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
sticky-note(float="right").blue This #[strong is] a sample sticky.
|
||||||
|
| You can drag it out of the way if you need to see the content under it.
|
@@ -18,11 +18,9 @@ block content
|
|||||||
|
|
||||||
tabset#sticky-note
|
tabset#sticky-note
|
||||||
pre.language-html(tab="html")
|
pre.language-html(tab="html")
|
||||||
sticky-note(float="right").blue This #[strong is] a sample sticky.
|
include _sticky-note.pug
|
||||||
| You can drag it out of the way if you need to see the content under it.
|
pre.language-pug(tab="pug")
|
||||||
pre.language-pug(tab="pug").
|
include _sticky-note.pp
|
||||||
sticky-note(float="right").blue This #[strong is] a sample sticky.
|
|
||||||
| You can drag it out of the way if you need to see the content under it.
|
|
||||||
pre.language-css(data-tab="css")
|
pre.language-css(data-tab="css")
|
||||||
include sticky-note.css
|
include sticky-note.css
|
||||||
pre.language-css(data-tab="scss")
|
pre.language-css(data-tab="scss")
|
||||||
|
1
src/pg/patterns/core/switch/_switch.pp
Normal file
1
src/pg/patterns/core/switch/_switch.pp
Normal file
@@ -0,0 +1 @@
|
|||||||
|
span#example-id(role="switch")
|
@@ -5,20 +5,26 @@ extends ../../../core/_master-pattern
|
|||||||
block content
|
block content
|
||||||
|
|
||||||
+h(0)
|
+h(0)
|
||||||
p Switches are used to toggle application state between two mutually exlusive values.
|
p Switches are used to toggle application state between two mutually exclusive values.
|
||||||
|
|
||||||
+h(1)
|
+h(1)
|
||||||
|
p Use a switch when the user will see an immediate visible state change. Do not use a switch when the state change will affect future results. The user should not have to perform another action (search, save, etc) for the result to take affect. If the change in state does not take effect immediately, consider a checkbox.
|
||||||
|
|
||||||
+h(2)
|
+h(2)
|
||||||
|
p The switch label should describe what will happen when the switch is turned to the on state. Frontload labels with keywords.
|
||||||
|
|
||||||
|
p Include the CSS and JavaScript. An additional handler will need to be created for the actual state change. The CSS implements the visual design of the switch, which is based on the accessibility properties, which are implemented by the JavaScript.
|
||||||
|
|
||||||
h2 Example
|
h2 Example
|
||||||
p.switch
|
p.switch
|
||||||
label(for="example-switch") Switch label
|
label(for="example-switch") Switch label (states the on state)
|
||||||
span#example-switch(role="switch")
|
span#example-switch(role="switch")
|
||||||
|
|
||||||
div#switches.tab-group
|
div#switches.tab-group
|
||||||
pre.language-html(data-tab="html")
|
pre.language-html(data-tab="html")
|
||||||
include _switch.pug
|
include _switch.pug
|
||||||
pre.language-pug(data-tab="pug")
|
pre.language-pug(data-tab="pug")
|
||||||
include switch.pug
|
include _switch.pp
|
||||||
pre.language-css(data-tab="css")
|
pre.language-css(data-tab="css")
|
||||||
include switch.css
|
include switch.css
|
||||||
pre.language-css(data-tab="scss")
|
pre.language-css(data-tab="scss")
|
||||||
|
@@ -1,2 +0,0 @@
|
|||||||
.
|
|
||||||
span#example-id(role="switch")
|
|
4
src/pg/patterns/core/tabs/_tabs.pp
Normal file
4
src/pg/patterns/core/tabs/_tabs.pp
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
div#uniqueID.tab-group
|
||||||
|
div(data-tab="[tab title]")
|
||||||
|
div(data-tab="[tab title]")
|
||||||
|
|
@@ -5,9 +5,9 @@ extends ../../../core/_master-pattern
|
|||||||
block content
|
block content
|
||||||
|
|
||||||
+h(0)
|
+h(0)
|
||||||
+h(1)
|
p A tabs component that provides different sections of content that are displayed one at a time when the user selects that information.
|
||||||
+h(2)
|
|
||||||
|
|
||||||
|
+h(2)
|
||||||
p The tabbed user interface enables users to jump to their target section quickly. Tabs present like logically group information on the same page. Information should
|
p The tabbed user interface enables users to jump to their target section quickly. Tabs present like logically group information on the same page. Information should
|
||||||
|
|
||||||
ul
|
ul
|
||||||
@@ -19,24 +19,18 @@ block content
|
|||||||
p Users should not need to see content of multiple tabs simultaneously and the user should be able to easily recognise where they are within the content.
|
p Users should not need to see content of multiple tabs simultaneously and the user should be able to easily recognise where they are within the content.
|
||||||
|
|
||||||
|
|
||||||
|
+h(1)
|
||||||
p The tab module can be initialised by importing a file with the javascript module using import * as tabs from "../pg/patterns/layouts/tabs/_tabs.js"; contains a modularized version of the jQuery code, so that it can be called on demand. It is what is used in the design system so that the JavaScript can be called at run time (after loading content).
|
p The tab module can be initialised by importing a file with the javascript module using import * as tabs from "../pg/patterns/layouts/tabs/_tabs.js"; contains a modularized version of the jQuery code, so that it can be called on demand. It is what is used in the design system so that the JavaScript can be called at run time (after loading content).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
tabset#tabs
|
tabset#tabs
|
||||||
pre.language-html(tab="html")
|
pre.language-html(tab="html")
|
||||||
include _tabs.pug
|
include _tabs.pug
|
||||||
|
pre.language-pug(tab="pug")
|
||||||
//- pre.language-pug(tab="pug").
|
include _tabs.pp
|
||||||
include _tabs.pug
|
|
||||||
|
|
||||||
pre.language-css(tab="css")
|
pre.language-css(tab="css")
|
||||||
include tabs.css
|
include tabs.css
|
||||||
|
|
||||||
pre.language-css(tab="scss")
|
pre.language-css(tab="scss")
|
||||||
include _tabs.scss
|
include _tabs.scss
|
||||||
|
|
||||||
pre.language-css(tab="js")
|
pre.language-css(tab="js")
|
||||||
include _tabs.js
|
include _tabs.js
|
||||||
|
|
||||||
|
2
src/pg/patterns/core/tooltip/_tooltip.pp
Normal file
2
src/pg/patterns/core/tooltip/_tooltip.pp
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
a(href="#") Link with a tool tip
|
||||||
|
span(role="tooltip" inert tip-position="right") Tool tip content
|
@@ -1,5 +1,2 @@
|
|||||||
a(href="#") Link with a tool tip
|
a(href="#") Link with a tool tip
|
||||||
div(role="tooltip" inert tip-position="bottom") Tool tip content
|
span(role="tooltip" inert tip-position="right") Tool tip content
|
||||||
|
|
||||||
a(href="#") Link with a tool tip
|
|
||||||
tool-tip(role="tooltip" inert tip-position="bottom") Tool tip content
|
|
@@ -5,13 +5,17 @@ extends ../../../core/_master-pattern
|
|||||||
block content
|
block content
|
||||||
|
|
||||||
+h(0)
|
+h(0)
|
||||||
|
p Tooltips provide brief information messaging through a mouse or keyboard hover.
|
||||||
+h(1)
|
+h(1)
|
||||||
|
p Use tool tips to provide additional information. Don't use tooltips for that is required to complete an interaction as the information disappears when it loses the hover state.
|
||||||
|
|
||||||
|
p Use tooltips to help differentiate between multiple, close, similar options.
|
||||||
|
|
||||||
+h(2)
|
+h(2)
|
||||||
|
|
||||||
p Either form works. Place this inside another element for the tooltip to be "linked to that element."
|
p.notification-box.info Currently, there is no easy way to activate a hover without with pure CSS without using a keyboard or mouse. Level4 media queries aim to solve that.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
p Either form works. Place this inside another element for the tooltip to be 'linked to that element.' A container element may need to be added for a single tag element, such as a input field.
|
||||||
|
|
||||||
p Tool tip positions are:
|
p Tool tip positions are:
|
||||||
ul
|
ul
|
||||||
@@ -20,12 +24,15 @@ block content
|
|||||||
li bottom / block-end
|
li bottom / block-end
|
||||||
li left / inline-start
|
li left / inline-start
|
||||||
|
|
||||||
|
p
|
||||||
|
include _tooltip.pug
|
||||||
|
|
||||||
|
|
||||||
div#tooltip.tab-group
|
div#tooltip.tab-group
|
||||||
pre.language-html(data-tab="html")
|
pre.language-html(data-tab="html")
|
||||||
include _tooltip.pug
|
include _tooltip.pug
|
||||||
pre.language-pug(data-tab="pug")
|
pre.language-pug(data-tab="pug")
|
||||||
include tooltip.pug
|
include _tooltip.pp
|
||||||
pre.language-css(data-tab="css")
|
pre.language-css(data-tab="css")
|
||||||
include tooltip.css
|
include tooltip.css
|
||||||
pre.language-css(data-tab="scss")
|
pre.language-css(data-tab="scss")
|
||||||
|
@@ -1,6 +0,0 @@
|
|||||||
.
|
|
||||||
a(href="#") Link with a tool tip
|
|
||||||
div(role="tooltip" inert tip-position="bottom") Tool tip content
|
|
||||||
|
|
||||||
a(href="#") Link with a tool tip
|
|
||||||
tool-tip(role="tooltip" inert tip-position="bottom") Tool tip content
|
|
@@ -35,6 +35,9 @@ html {
|
|||||||
@include break(-md) {
|
@include break(-md) {
|
||||||
font-size: calc($font-size + 2pt);
|
font-size: calc($font-size + 2pt);
|
||||||
}
|
}
|
||||||
|
&.show-breakpoints {
|
||||||
|
@include breakpoint-debug;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@include core-colour-samples;
|
@include core-colour-samples;
|
||||||
@@ -87,11 +90,18 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
p.deprecated-switch {
|
p.info-switches {
|
||||||
|
align-items: center;
|
||||||
|
display: grid;
|
||||||
|
gap: .25rem;
|
||||||
grid-column: 2 / 4;
|
grid-column: 2 / 4;
|
||||||
grid-row: 3;
|
grid-row: 3;
|
||||||
|
grid-template-columns: auto repeat(2, max-content);
|
||||||
text-align: right;
|
text-align: right;
|
||||||
@include switch;
|
@include switch;
|
||||||
|
label {
|
||||||
|
text-align: left;;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
main {
|
main {
|
||||||
|
Reference in New Issue
Block a user