More updates

This commit is contained in:
A McIlwraith 2024-07-12 23:35:29 -04:00
parent c10125b41d
commit ef9b937d2e
36 changed files with 1311 additions and 12020 deletions

File diff suppressed because one or more lines are too long

View File

@ -1191,7 +1191,9 @@
} }
}, },
"minify-js": { "minify-js": {
"enable": false "options": {
"toplevel": true
}
} }
} }
} }
@ -1219,6 +1221,25 @@
"customOutput": "src/scss/_core.scss" "customOutput": "src/scss/_core.scss"
} }
}, },
{
"file": "src/pg/core/_core.scss.pug",
"config": {
"autoCompile": true,
"customOutput": "src/scss/_core.scss"
}
},
{
"file": "src/pg/core/core.scss.pug",
"config": {
"customOutput": "src/scss/_core.scss"
}
},
{
"file": "src/pg/core/download.php.pug",
"config": {
"customOutput": "public/download.php"
}
},
{ {
"file": "src/pg/master-index.pug", "file": "src/pg/master-index.pug",
"config": { "config": {

BIN
public/.DS_Store vendored

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -1,47 +1,58 @@
/* /*
* Variables * Variables
*/ */
/* Core Code
This file is generates _core.scss using information in ../pg/_config.pug.
Please make your changes in your _config.pug file so that they are not
overwritten.
*/
@import url("https://fonts.googleapis.com/css2?family=Kalam:wght@300;400;700&display=swap"); @import url("https://fonts.googleapis.com/css2?family=Kalam:wght@300;400;700&display=swap");
:root { :root {
--color-blue: #2e51a1; --colour-blue: #2e51a1;
--color-blue-l: #5c7abf; --colour-blue-l: #5c7abf;
--color-blue-xl: #b2c3ec; --colour-blue-xl: #b2c3ec;
--color-blue-d: #133176; --colour-blue-d: #133176;
--color-blue-xd: #031235; --colour-blue-xd: #031235;
--color-oj: #f0b031; --colour-grey: #7f7f7f;
--color-oj-l: #ffcc67; --colour-grey-l: #b2b2b2;
--color-oj-xl: #ffe4ad; --colour-grey-xl: #d8d8d8;
--color-oj-d: #cb8906; --colour-grey-xxl: #f0f0f0;
--color-oj-xd: #9d6900; --colour-white: #fff;
--color-raspberry: #da2c5b; --colour-page: #fff;
--color-raspberry-l: #ed5e85; --colour-light: #fff;
--color-raspberry-xl: #f9a4bb; --colour-grey-d: #4c4c4c;
--color-raspberry-d: #9f0c34; --colour-grey-xd: #4c4c4c;
--color-raspberry-xd: #400011; --colour-black: #000;
--color-lime: #cde92f; --colour-dark: #000;
--color-lime-l: #e2f963; }
--color-lime-xl: #effca6;
--color-lime-d: #9bb40b; h1[class^=status]::after, h2[class^=status]::after, span[class^=status]::after {
--color-lime-xd: #607100; border-radius: 50%;
--color-grey: #7f7f7f; border: 1px solid #CCC;
--color-grey-l: #b2b2b2; content: " ";
--color-grey-xl: #d8d8d8; display: inline-block;
--color-grey-xxl: #f0f0f0; height: 1.5rem;
--color-white: #fff; margin-left: 0.5rem;
--color-page: #fff; position: relative;
--color-light: #fff; top: 2px;
--color-grey-d: #4c4c4c; width: 1.5rem;
--color-grey-xd: #4c4c4c; }
--color-black: #000;
--color-dark: #000; .status-not-started::after {
--color-error: #a00109; background-color: transparent;
--color-error-text: #fff; }
--color-warn: #a38301;
--color-warn-text: #fff; .status-in-progress::after {
--color-notify: #599601; background-color: #f0b031;
--color-notify-text: #fff; }
--color-info: #b2c3ec;
--color-info-text: #000; .status-complete::after {
background-color: #2e51a1;
}
.status-deprecated::after {
background-color: #da2c5b;
} }
/* Position Options /* Position Options
@ -65,32 +76,6 @@ html {
} }
} }
div.status-report p.heading, div.status-report td[colspan="2"] {
font-size: 1.125rem;
font-weight: bolder !important;
grid-column: 1/-1;
margin: 2rem 0 0.5rem 0;
padding-top: 1.5rem !important;
}
div.status-report td:not([colspan="2"]) span {
display: -ms-grid;
display: grid;
-ms-grid-columns: auto 1rem;
grid-template-columns: auto 1rem;
margin: 0 1rem 0 0;
}
div.status-report td:not([colspan="2"]) span span[class^=status]::after {
height: 1rem !important;
width: 1rem !important;
margin-right: 1rem;
}
div.status-report td:not([colspan="2"]) a {
margin: 0 1rem 0 0;
}
div.status-report td:not([colspan="2"]).indent a {
margin: 0 1rem 0 1.5rem;
}
#copystatus { #copystatus {
left: 50%; left: 50%;
position: absolute; position: absolute;
@ -660,6 +645,32 @@ sticky-note-wrapper:has(sticky-note.green:hover) {
background-color: #bbfbc0; background-color: #bbfbc0;
} }
div.status-report p.heading, div.status-report td[colspan="2"] {
font-size: 1.125rem;
font-weight: bolder !important;
grid-column: 1/-1;
margin: 2rem 0 0.5rem 0;
padding-top: 1.5rem !important;
}
div.status-report td:not([colspan="2"]) span {
display: -ms-grid;
display: grid;
-ms-grid-columns: auto 1rem;
grid-template-columns: auto 1rem;
margin: 0 1rem 0 0;
}
div.status-report td:not([colspan="2"]) span span[class^=status]::after {
height: 1rem !important;
width: 1rem !important;
margin-right: 1rem;
}
div.status-report td:not([colspan="2"]) a {
margin: 0 1rem 0 0;
}
div.status-report td:not([colspan="2"]).indent a {
margin: 0 1rem 0 1.5rem;
}
body { body {
margin: 0; margin: 0;
padding: 0; padding: 0;
@ -700,7 +711,7 @@ body .container header svg text {
font-size: 10rem; font-size: 10rem;
font-weight: 1000; font-weight: 1000;
font-family: elvetica, Arial, sans-serif; font-family: elvetica, Arial, sans-serif;
fill: var(--color-grey-xl); fill: var(--colour-grey-xxl);
} }
body .container header > div { body .container header > div {
-ms-grid-row: 2; -ms-grid-row: 2;
@ -730,7 +741,7 @@ body .container header > div .header-title h1 a, body .container header > div .h
text-decoration: none; text-decoration: none;
} }
body .container nav { body .container nav {
background-color: var(--color-blue); background-color: var(--colour-blue);
-ms-grid-column: 2; -ms-grid-column: 2;
-ms-grid-column-span: 2; -ms-grid-column-span: 2;
grid-column: 2/4; grid-column: 2/4;
@ -744,7 +755,7 @@ body .container nav ul li {
margin-right: 1rem; margin-right: 1rem;
} }
body .container nav a { body .container nav a {
color: white; color: var(--colour-white);
text-decoration: none; text-decoration: none;
} }
@media (min-width: 768px) { @media (min-width: 768px) {
@ -753,18 +764,18 @@ body .container nav a {
} }
} }
body .container p.deprecated-switch { body .container p.deprecated-switch {
-ms-grid-row: 3;
grid-row: 3;
-ms-grid-column: 2; -ms-grid-column: 2;
-ms-grid-column-span: 2; -ms-grid-column-span: 2;
grid-column: 2/4; grid-column: 2/4;
-ms-grid-row: 3;
grid-row: 3;
text-align: right; text-align: right;
} }
body .container p.deprecated-switch [role=switch] { body .container p.deprecated-switch [role=switch] {
display: -ms-inline-grid; display: -ms-inline-grid;
display: inline-grid; display: inline-grid;
border: 1px solid #2e51a1; border: 1px solid var(--colour-blue);
background-color: #e9e9ea; background-color: var(--colour-grey-xl);
border-radius: 0.75rem; border-radius: 0.75rem;
height: 1.5rem; height: 1.5rem;
width: 3rem; width: 3rem;
@ -781,17 +792,17 @@ body .container p.deprecated-switch [role=switch] > span {
transition: all 500ms; transition: all 500ms;
} }
body .container p.deprecated-switch [role=switch][aria-checked=true] { body .container p.deprecated-switch [role=switch][aria-checked=true] {
background-color: #2e51a1; background-color: var(--colour-blue);
} }
body .container p.deprecated-switch [role=switch][aria-checked=true] > span { body .container p.deprecated-switch [role=switch][aria-checked=true] > span {
margin-left: calc(1.5rem - 5%); margin-left: calc(1.5rem - 5%);
} }
body .container main { body .container main {
display: block;
grid-column: 1/-1;
-ms-grid-row: 4; -ms-grid-row: 4;
grid-row: 4; grid-row: 4;
display: block;
padding: 0 1rem; padding: 0 1rem;
grid-column: 1/-1;
} }
@media (max-width: 768px) { @media (max-width: 768px) {
body .container main { body .container main {
@ -820,8 +831,8 @@ body .container main article {
-ms-grid-column: 2; -ms-grid-column: 2;
-ms-grid-column-span: 2; -ms-grid-column-span: 2;
grid-column: 2/4; grid-column: 2/4;
min-width: 0;
margin-top: 2rem; margin-top: 2rem;
min-width: 0;
} }
body .container main article.status-deprecated { body .container main article.status-deprecated {
display: none; display: none;
@ -837,8 +848,8 @@ body .container main article tabset > ul, body .container main article .tab-grou
padding: 0; padding: 0;
} }
body .container main article tabset > ul li.separator, body .container main article .tab-group > ul li.separator { body .container main article tabset > ul li.separator, body .container main article .tab-group > ul li.separator {
border-bottom: 1px solid var(--color-grey); border-bottom: 1px solid var(--colour-grey);
border-left: 1px solid var(--color-grey); border-left: 1px solid var(--colour-grey);
display: inline-block; display: inline-block;
margin: 0.45rem 0 0 0; margin: 0.45rem 0 0 0;
width: 100%; width: 100%;
@ -847,9 +858,9 @@ body .container main article tabset .tab-hidden, body .container main article .t
display: none; display: none;
} }
body .container main article tabset [role=tab], body .container main article .tab-group [role=tab] { body .container main article tabset [role=tab], body .container main article .tab-group [role=tab] {
background-color: var(--color-white); background-color: var(--colour-white);
border-left: 1px solid var(--color-grey); border-left: 1px solid var(--colour-grey);
border-top: 1px solid var(--color-grey); border-top: 1px solid var(--colour-grey);
border-radius: 0.5rem 0.5rem 0 0; border-radius: 0.5rem 0.5rem 0 0;
cursor: pointer; cursor: pointer;
margin: 0; margin: 0;
@ -858,19 +869,19 @@ body .container main article tabset [role=tab], body .container main article .ta
z-index: 2; z-index: 2;
} }
body .container main article tabset [role=tab]:last-of-type, body .container main article .tab-group [role=tab]:last-of-type { body .container main article tabset [role=tab]:last-of-type, body .container main article .tab-group [role=tab]:last-of-type {
border-right: 1px solid var(--color-grey); border-right: 1px solid var(--colour-grey);
} }
body .container main article tabset [role=tab]:not(.selected), body .container main article .tab-group [role=tab]:not(.selected) { body .container main article tabset [role=tab]:not(.selected), body .container main article .tab-group [role=tab]:not(.selected) {
background-color: var(--color-grey-xxl); background-color: var(--colour-grey-xxl);
border-bottom: 1px solid var(--color-grey); border-bottom: 1px solid var(--colour-grey);
} }
body .container main article tabset [role=tab] span, body .container main article .tab-group [role=tab] span { body .container main article tabset [role=tab] span, body .container main article .tab-group [role=tab] span {
display: block; display: block;
margin: 0 0 0.5rem 0; margin: 0 0 0.5rem 0;
} }
body .container main article tabset [role=tabpanel], body .container main article .tab-group [role=tabpanel] { body .container main article tabset [role=tabpanel], body .container main article .tab-group [role=tabpanel] {
background-color: var(--color-white); background-color: var(--colour-white);
border: 1px solid var(--color-grey); border: 1px solid var(--colour-grey);
border-top: none; border-top: none;
padding: 1rem; padding: 1rem;
z-index: 1; z-index: 1;
@ -897,8 +908,8 @@ body .container main article p.switch {
body .container main article p.switch [role=switch] { body .container main article p.switch [role=switch] {
display: -ms-inline-grid; display: -ms-inline-grid;
display: inline-grid; display: inline-grid;
border: 1px solid #2e51a1; border: 1px solid var(--colour-blue);
background-color: #e9e9ea; background-color: var(--colour-grey-xl);
border-radius: 0.75rem; border-radius: 0.75rem;
height: 1.5rem; height: 1.5rem;
width: 3rem; width: 3rem;
@ -915,7 +926,7 @@ body .container main article p.switch [role=switch] > span {
transition: all 500ms; transition: all 500ms;
} }
body .container main article p.switch [role=switch][aria-checked=true] { body .container main article p.switch [role=switch][aria-checked=true] {
background-color: #2e51a1; background-color: var(--colour-blue);
} }
body .container main article p.switch [role=switch][aria-checked=true] > span { body .container main article p.switch [role=switch][aria-checked=true] > span {
margin-left: calc(1.5rem - 5%); margin-left: calc(1.5rem - 5%);

View File

@ -19,7 +19,7 @@
</svg> </svg>
<div> <div>
<div class="header-title"> <div class="header-title">
<h1> <a href=".">DS2 core</a></h1> <h1> <a>DS2 core</a></h1>
</div> </div>
<!-- Other sections can go here, such as search and directory--> <!-- Other sections can go here, such as search and directory-->
</div> </div>

View File

@ -297,6 +297,32 @@
--colour-grey-xd: #4c4c4c, --colour-grey-xd: #4c4c4c,
--colour-black: #000, --colour-black: #000,
--colour-dark: #000, --colour-dark: #000,
}</pre>
</div>
<div data-tab="scss">
<pre class="language-css">$colour: (
colour-blue: #2e51a1,
colour-blue-l: #5c7abf,
colour-blue-xl: #b2c3ec,
colour-blue-d: #133176,
colour-blue-xd: #031235,
colour-grey: #7f7f7f,
colour-grey-l: #b2b2b2,
colour-grey-xl: #d8d8d8,
colour-grey-xxl: #f0f0f0,
colour-white: #fff,
colour-page: #fff,
colour-light: #fff,
colour-grey-d: #4c4c4c,
colour-grey-xd: #4c4c4c,
colour-black: #000,
colour-dark: #000,
);
:root {
@each $name, $color in $colour {
--#{$name}: #{$color};
}
}</pre> }</pre>
</div> </div>
</div> </div>

View File

@ -17,8 +17,8 @@
<pre class="language-css" data-tab="css">[role=switch] { <pre class="language-css" data-tab="css">[role=switch] {
display: -ms-inline-grid; display: -ms-inline-grid;
display: inline-grid; display: inline-grid;
border: 1px solid #2e51a1; border: 1px solid var(--colour-blue);
background-color: #e9e9ea; background-color: var(--colour-grey-xl);
border-radius: 0.75rem; border-radius: 0.75rem;
height: 1.5rem; height: 1.5rem;
width: 3rem; width: 3rem;
@ -35,7 +35,7 @@
transition: all 500ms; transition: all 500ms;
} }
[role=switch][aria-checked=true] { [role=switch][aria-checked=true] {
background-color: #2e51a1; background-color: var(--colour-blue);
} }
[role=switch][aria-checked=true] > span { [role=switch][aria-checked=true] > span {
margin-left: calc(1.5rem - 5%); margin-left: calc(1.5rem - 5%);
@ -45,9 +45,9 @@
@use "sass:math"; @use "sass:math";
$switch-accent: #2e51a1 !default; // switch background when switched right (on/ true) $switch-accent: var(--colour-blue) !default; // switch background when switched right (on/ true)
$switch-background: #e9e9ea !default; // switch background when switched left (off / false) $switch-background: var(--colour-grey-xl) !default; // switch background when switched left (off / false)
$switch-color: #ffffff !default; // the colour of the switch $switch-color: var(--colour-white) !default; // the colour of the switch
$switch-height: 1.5rem !default; $switch-height: 1.5rem !default;
@mixin switch { @mixin switch {

View File

@ -22,7 +22,7 @@
<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
$header-bg-color: var(--color-grey-xl) !default; $header-bg-color: var(--colour-grey-xxl) !default;
$font-heading: sans-serif !default; $font-heading: sans-serif !default;
$font-weight: 700 !default; $font-weight: 700 !default;
@ -97,7 +97,7 @@ header svg text {
font-size: 10rem; font-size: 10rem;
font-weight: 1000; font-weight: 1000;
font-family: sans-serif; font-family: sans-serif;
fill: var(--color-grey-xl); fill: var(--colour-grey-xxl);
} }
header > div { header > div {
-ms-grid-row: 2; -ms-grid-row: 2;

View File

@ -33,8 +33,8 @@ tabset > ul, .tab-group > ul {
padding: 0; padding: 0;
} }
tabset > ul li.separator, .tab-group > ul li.separator { tabset > ul li.separator, .tab-group > ul li.separator {
border-bottom: 1px solid var(--color-grey); border-bottom: 1px solid var(--colour-grey);
border-left: 1px solid var(--color-grey); border-left: 1px solid var(--colour-grey);
display: inline-block; display: inline-block;
margin: 0.45rem 0 0 0; margin: 0.45rem 0 0 0;
width: 100%; width: 100%;
@ -43,9 +43,9 @@ tabset .tab-hidden, .tab-group .tab-hidden {
display: none; display: none;
} }
tabset [role=tab], .tab-group [role=tab] { tabset [role=tab], .tab-group [role=tab] {
background-color: var(--color-white); background-color: var(--colour-white);
border-left: 1px solid var(--color-grey); border-left: 1px solid var(--colour-grey);
border-top: 1px solid var(--color-grey); border-top: 1px solid var(--colour-grey);
border-radius: 0.5rem 0.5rem 0 0; border-radius: 0.5rem 0.5rem 0 0;
cursor: pointer; cursor: pointer;
margin: 0; margin: 0;
@ -54,19 +54,19 @@ tabset [role=tab], .tab-group [role=tab] {
z-index: 2; z-index: 2;
} }
tabset [role=tab]:last-of-type, .tab-group [role=tab]:last-of-type { tabset [role=tab]:last-of-type, .tab-group [role=tab]:last-of-type {
border-right: 1px solid var(--color-grey); border-right: 1px solid var(--colour-grey);
} }
tabset [role=tab]:not(.selected), .tab-group [role=tab]:not(.selected) { tabset [role=tab]:not(.selected), .tab-group [role=tab]:not(.selected) {
background-color: var(--color-grey-xxl); background-color: var(--colour-grey-xxl);
border-bottom: 1px solid var(--color-grey); border-bottom: 1px solid var(--colour-grey);
} }
tabset [role=tab] span, .tab-group [role=tab] span { tabset [role=tab] span, .tab-group [role=tab] span {
display: block; display: block;
margin: 0 0 0.5rem 0; margin: 0 0 0.5rem 0;
} }
tabset [role=tabpanel], .tab-group [role=tabpanel] { tabset [role=tabpanel], .tab-group [role=tabpanel] {
background-color: var(--color-white); background-color: var(--colour-white);
border: 1px solid var(--color-grey); border: 1px solid var(--colour-grey);
border-top: none; border-top: none;
padding: 1rem; padding: 1rem;
z-index: 1; z-index: 1;
@ -74,12 +74,12 @@ tabset [role=tabpanel], .tab-group [role=tabpanel] {
tabset [role=tabpanel]:not(.open), .tab-group [role=tabpanel]:not(.open) { tabset [role=tabpanel]:not(.open), .tab-group [role=tabpanel]:not(.open) {
display: none; display: none;
}</pre> }</pre>
<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(--color-grey) !default; $tab-border: var(--colour-grey) !default;
$tab-selected: var(--color-white) !default; $tab-selected: var(--colour-white) !default;
$tab-notselected: var(--color-grey-xxl) !default; $tab-notselected: var(--colour-grey-xxl) !default;
@mixin tabs { @mixin tabs {
tabset, .tab-group { tabset, .tab-group {

View File

@ -2,7 +2,7 @@
- var lang = "en-uk" - var lang = "en-uk"
- var colorpfx = "colour" - var colorpfx = "colour"
- var headings = ["What is it", "When to use it", "How to use it"] - var headings = ["What is it", "When to use it", "How to use it"]
- var root = "." - var generateColourToken = ["colours"]
- -
var content = [ var content = [
@ -75,21 +75,18 @@
}, },
{ {
name: "in-progress", name: "in-progress",
color: "var(--color-oj)", color: "#f0b031",
}, },
{ {
name: "complete", name: "complete",
color: "var(--color-lime)", color: "#2e51a1",
}, },
{ {
name: "deprecated", name: "deprecated",
color: "var(--color-raspberry)", color: "#da2c5b",
}, },
] ]
- var generateSCSS = ["colours"]
- -
var colours = [ var colours = [
{ name: "Blue", { name: "Blue",
@ -126,3 +123,4 @@
}, },
} }
] ]

View File

@ -1,62 +0,0 @@
//- This file is used to generate ../scss/_core.scss and will overwrite what is in that include.
include _config
include _color-samples
-var out = ""
-
out = `/* Core Code
This file is generates _core.scss using information in ../pg/_config.pug.
Please make your changes in your _config.pug file so that they are not
overwritten. \n */\n\n\n`
- out += `//colour tokens\n$${colorpfx}: (`
each val in generateColourToken
- out += generateSCSS(eval(val), colorpfx)
//- var scss = $colors
| !{generateSCSS(eval(val), colorpfx)}
- out += ");\n:root {\n\t@each $name, $color in $" + colorpfx + " {\n\t\t--#{$name}: #{$color};\n\t}\n}"
//- This is the end of the statuses
- out += "\n\n\n// Statuses\n$statuses: (\n"
each status in statuses || []
- out += `\t"${status.name}": ${status.color},\n`
-out += ");"
-
out += `\n\nh1[class^="status"], h2[class^="status"], span[class^="status"] {
&::after {
$size: 1.5rem;
border-radius: 50%;
border: 1px solid #CCC;
content: " ";
display: inline-block;
height: $size;
margin-left: .5rem;
position: relative;
top: 2px;
width: $size;
}
}
@each $name, $color in $statuses {
.status-#{$name}::after {
background-color: $color;
}
}`
//- / This is the end of the statuses
- out += "\n\n//! / Core Code\n\n"
| !{out}

View File

@ -192,7 +192,7 @@ mixin accessibility-info(c)
mixin color-samples(colors, theid) mixin colour-samples(colors, theid)
color-samples color-samples
- let css = []; - let css = [];
- let scss = []; - let scss = [];

View File

@ -1,4 +1,4 @@
@mixin color-samples { @mixin core-colour-samples {
#copystatus { #copystatus {
left: 50%; left: 50%;
@ -36,8 +36,6 @@
gap: 1rem; gap: 1rem;
margin-bottom: 1rem; margin-bottom: 1rem;
@include break(-lg) { @include break(-lg) {
display: grid; display: grid;
grid-template-columns: repeat(2, 1fr); grid-template-columns: repeat(2, 1fr);

View File

@ -1,4 +1,4 @@
include _config include ../_config
block config block config
- var getDate = function(){ - var getDate = function(){

View File

@ -1,4 +1,4 @@
include _config include ../_config
block config block config
mixin h(h) mixin h(h)

311
src/pg/core/core.scss.pug Normal file
View File

@ -0,0 +1,311 @@
//- This file is used to generate ../scss/_core.scss and will overwrite what is in that include.
-
var out = `// DS2 core (c) 2024 Alexander McIlwraith\n// Licensed under CC BY-SA 4.0 \n\n\n/* Core Code\n
This file is generates _core.scss using information in ../pg/_config.pug.
Please make your changes in your _config.pug file so that they are not
overwritten. \n*/\n\n\n`
include ../_config
include _colour-samples
-
out +=`@mixin core-colour-samples {
#copystatus {
left: 50%;
position: absolute;
z-index: 100;
div {
border-radius: 1rem;
border: 1px solid green;
left: -50%;
padding: 1rem;
position: relative;
white-space: nowrap;
&::after {
clear: both;
content: " ";
display: block;
}
&.succeeded {
background-color: white;
border-color: black;
color: black;
}
&.failed {
background-color: white;
border-color: #f00;
color: #f00;
}
}
}
color-samples {
display: flex;
flex-direction: row;
flex-wrap: wrap;
gap: 1rem;
margin-bottom: 1rem;
@include break(-lg) {
display: grid;
grid-template-columns: repeat(2, 1fr);
max-width: 100%;
width: 100%;
}
@include break(-sm) {
grid-template-columns: auto;
width: 100%;
max-width: 100%;
}
color-sample {
align-items: center;
border-radius: .5rem;
border: 1px solid #CCC;
display: grid;
font-family: inherit;
gap: .5rem;
grid-template-areas: "name name name hex hex hex"
"name name name rgb rgb rgb"
"acc acc acc acc acc acc"
"lighter lighter lighter darker darker darker"
"notes notes notes notes notes notes";
grid-template-columns: repeat(6, 1fr);
grid-template-rows: repeat(2, 1.5rem) 10rem repeat(3, max-content); // 3rem repeat(2, 2rem) 1.5rem repeat(3, max-content);
padding: 1rem;
width: 20rem;
max-width: 318px;
@include break(-lg) {
width: 100%;
max-width: 100%;
}
name {
align-self: start;
font-size: 1.25rem;
grid-area: name;
span {
cursor: pointer;
}
}
rgb {
grid-area: rgb;
white-space: nowrap;
}
hex {
grid-area: hex;
white-space: nowrap;
}
> accessibility {
border-bottom: 1px solid #ccc;
border-top: 1px solid #ccc;
}
accessibility {
grid-area: acc;
grid-row: 3;
padding: .5rem 0;
display: grid;
gap: .5rem;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: 2.5rem repeat(2, max-content);
.result {
align-items: center;
border-radius: .5rem;
display: grid;
grid-template-columns: repeat(2, 1fr);
border: 1px solid #ccc;
padding: 0 1rem;
text-align: center;
&.accwaa, &.accwaaa {
background-color: white;
color: black;
}
&.accbaa, &.accbaaa {
background-color: black;
color: white;
}
span:nth-child(2) {
font-size: 2rem;
}
}
.aa, .aaa {
align-self: center;
display: block;
font-size: .75rem;
}
.acchb {
grid-column: 2;
}
.acchb, .acchw {
display: grid;
grid-tempate-columns: auto;
grid-template-rows: repeat(2, max-content);
align-self: start;
text-align: center;
padding: 0;
span {
grid-row: 1;
grid-column: 1 / -1;
font-size: .9rem;
}
small {
text-align: center;
grid-row: 2;
grid-column: 1 / -1;
font-size: .75rem;
}
}
}
sample-block {
align-self: start;
grid-column: span 3;
grid-row: 4;
color-pill {
display: grid;
grid-gap: .5rem;
grid-template-columns: 20px max-content auto;
:nth-child(1) {
align-self: center;
border-radius: 5px;
border: 1px solid #CCC;
display: inline-block;
height: 10px;
width: 20px;
}
span {
cursor: pointer;
.tooltip-tc {
padding: .5rem;
width: 20rem;
max-width: 318px;
height: 10.5rem;
display: grid;
gap: .5rem;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: repeat(3, max-content);
.result {
align-items: center;
border-radius: .5rem;
display: grid;
grid-template-columns: repeat(2, 1fr);
border: 1px solid #ccc;
padding: 0 1rem;
text-align: center;
&.accwaa, &.accwaaa {
background-color: white;
color: black;
}
&.accbaa, &.accbaaa {
background-color: black;
color: white;
}
span{ border: none;
&:nth-child(2) {
font-size: 2rem;
}
}
}
.aa, .aaa {
align-self: center;
display: block;
font-size: .75rem;
}
.acchb {
grid-column: 2;
}
.acchb, .acchw {
border: none;
display: block;
width: 100%;
place-self: stretch;
span {
border: none;
font-size: .9rem;
width: 100%;
&::after, &::before {
display: none;
}
}
small {
font-size: .75rem;
text-align: center;
}
}
}
}
}
}
notes {
border-top: 1px solid #ccc;
grid-column: 1 / -1;
padding-top: .5rem;
}
}
}
}`
- out += `\n\n//colour tokens\n$${colorpfx}: (`
each val in generateColourToken
- out += generateSCSS(eval(val), colorpfx)
//- var scss = $colors
| !{generateSCSS(eval(val), colorpfx)}
- out += ");\n:root {\n\t@each $name, $color in $" + colorpfx + " {\n\t\t--#{$name}: #{$color};\n\t}\n}"
//- This is the end of the statuses
- out += "\n\n\n// Statuses\n$statuses: (\n"
each status in statuses || []
- out += `\t"${status.name}": ${status.color},\n`
-out += ");"
-
out += `\n\nh1[class^="status"], h2[class^="status"], span[class^="status"] {
&::after {
$size: 1.5rem;
border-radius: 50%;
border: 1px solid #CCC;
content: " ";
display: inline-block;
height: $size;
margin-left: .5rem;
position: relative;
top: 2px;
width: $size;
}
}
@each $name, $color in $statuses {
.status-#{$name}::after {
background-color: $color;
}
}`
//- / This is the end of the statuses
- out += "\n\n//! / Core Code\n\n"
| !{out}

View File

@ -1,4 +1,4 @@
extends _master-index.pug extends core/_master-index.pug
block config block config

View File

@ -1,7 +1,7 @@
extends ../../_master-pattern extends ../../core/_master-pattern
block content block content
include ../../_color-samples include ../../core/_colour-samples
h2 Primary colours h2 Primary colours
+color-samples(colours, "colors") +colour-samples(colours, "colors")

View File

@ -1,4 +1,4 @@
extends ../../../_master-pattern.pug extends ../../../core/_master-pattern.pug
block content block content
+h(0) +h(0)
+h(1) +h(1)

View File

@ -3,9 +3,9 @@
@use "sass:math"; @use "sass:math";
$switch-accent: #2e51a1 !default; // switch background when switched right (on/ true) $switch-accent: var(--colour-blue) !default; // switch background when switched right (on/ true)
$switch-background: #e9e9ea !default; // switch background when switched left (off / false) $switch-background: var(--colour-grey-xl) !default; // switch background when switched left (off / false)
$switch-color: #ffffff !default; // the colour of the switch $switch-color: var(--colour-white) !default; // the colour of the switch
$switch-height: 1.5rem !default; $switch-height: 1.5rem !default;
@mixin switch { @mixin switch {

View File

@ -1,4 +1,4 @@
extends ../../../_master-pattern.pug extends ../../../core/_master-pattern.pug
block content block content

View File

@ -1,8 +1,8 @@
[role=switch] { [role=switch] {
display: -ms-inline-grid; display: -ms-inline-grid;
display: inline-grid; display: inline-grid;
border: 1px solid #2e51a1; border: 1px solid var(--colour-blue);
background-color: #e9e9ea; background-color: var(--colour-grey-xl);
border-radius: 0.75rem; border-radius: 0.75rem;
height: 1.5rem; height: 1.5rem;
width: 3rem; width: 3rem;
@ -19,7 +19,7 @@
transition: all 500ms; transition: all 500ms;
} }
[role=switch][aria-checked=true] { [role=switch][aria-checked=true] {
background-color: #2e51a1; background-color: var(--colour-blue);
} }
[role=switch][aria-checked=true] > span { [role=switch][aria-checked=true] > span {
margin-left: calc(1.5rem - 5%); margin-left: calc(1.5rem - 5%);

View File

@ -1,4 +1,4 @@
extends ../../../_master-pattern.pug extends ../../../core/_master-pattern.pug
block content block content

View File

@ -1,4 +1,4 @@
extends ../../../_master-pattern.pug extends ../../../core/_master-pattern.pug
block content block content

View File

@ -1,7 +1,7 @@
//- DS2 core (c) 2024 Alexander McIlwraith //- DS2 core (c) 2024 Alexander McIlwraith
//- Licensed under CC BY-SA 4.0 //- Licensed under CC BY-SA 4.0
$header-bg-color: var(--color-grey-xl) !default; $header-bg-color: var(--colour-grey-xxl) !default;
$font-heading: sans-serif !default; $font-heading: sans-serif !default;
$font-weight: 700 !default; $font-weight: 700 !default;

View File

@ -22,7 +22,7 @@ header svg text {
font-size: 10rem; font-size: 10rem;
font-weight: 1000; font-weight: 1000;
font-family: sans-serif; font-family: sans-serif;
fill: var(--color-grey-xl); fill: var(--colour-grey-xxl);
} }
header > div { header > div {
-ms-grid-row: 2; -ms-grid-row: 2;

View File

@ -1,4 +1,4 @@
extends ../../../_master-pattern.pug extends ../../../core/_master-pattern.pug
block content block content

View File

@ -1,49 +0,0 @@
$font-body: sans-serif !default;
@mixin table {
table:not([role="presentation"]) {
border-collapse: collapse;
border-top: 2px solid var(--color-grey);
margin: 0 0 1rem 0;
caption {
font-family: $font-body;
font-family: 1.25rem;
}
thead {
tr {
td, th {
border-bottom: 1px solid var(--color-grey);
border-right: 1px solid var(--color-white);
background-color: var(--color-grey-xxl);
font-family: $font-body;
font-weight: bold;
padding: .25rem .5rem;
&:last-of-type {
border-right: none;
}
}
}
}
tbody {
tr {
td {
border-bottom: 1px solid var(--color-grey-xl);
border-right: 1px solid var(--color-grey-xl);
font-family: $font-body;
padding: .25rem .5rem;
&:last-of-type {
border-right: none;
}
}
&:last-child td {
border-bottom: 1px solid var(--color-grey);
}
}
+ caption {
font-family: $font-body;
font-size: .9rem;
caption-side: bottom;
}
}
}
}

View File

@ -1,9 +1,9 @@
//- DS2 core (c) 2024 Alexander McIlwraith // DS2 core (c) 2024 Alexander McIlwraith
//- Licensed under CC BY-SA 4.0 // Licensed under CC BY-SA 4.0
$tab-border: var(--color-grey) !default; $tab-border: var(--colour-grey) !default;
$tab-selected: var(--color-white) !default; $tab-selected: var(--colour-white) !default;
$tab-notselected: var(--color-grey-xxl) !default; $tab-notselected: var(--colour-grey-xxl) !default;
@mixin tabs { @mixin tabs {
tabset, .tab-group { tabset, .tab-group {

View File

@ -1,7 +1,7 @@
//- DS2 core (c) 2024 Alexander McIlwraith //- DS2 core (c) 2024 Alexander McIlwraith
//- Licensed under CC BY-SA 4.0 //- Licensed under CC BY-SA 4.0
extends ../../../_master-pattern.pug extends ../../../core/_master-pattern.pug
block content block content

View File

@ -9,8 +9,8 @@ tabset > ul, .tab-group > ul {
padding: 0; padding: 0;
} }
tabset > ul li.separator, .tab-group > ul li.separator { tabset > ul li.separator, .tab-group > ul li.separator {
border-bottom: 1px solid var(--color-grey); border-bottom: 1px solid var(--colour-grey);
border-left: 1px solid var(--color-grey); border-left: 1px solid var(--colour-grey);
display: inline-block; display: inline-block;
margin: 0.45rem 0 0 0; margin: 0.45rem 0 0 0;
width: 100%; width: 100%;
@ -19,9 +19,9 @@ tabset .tab-hidden, .tab-group .tab-hidden {
display: none; display: none;
} }
tabset [role=tab], .tab-group [role=tab] { tabset [role=tab], .tab-group [role=tab] {
background-color: var(--color-white); background-color: var(--colour-white);
border-left: 1px solid var(--color-grey); border-left: 1px solid var(--colour-grey);
border-top: 1px solid var(--color-grey); border-top: 1px solid var(--colour-grey);
border-radius: 0.5rem 0.5rem 0 0; border-radius: 0.5rem 0.5rem 0 0;
cursor: pointer; cursor: pointer;
margin: 0; margin: 0;
@ -30,19 +30,19 @@ tabset [role=tab], .tab-group [role=tab] {
z-index: 2; z-index: 2;
} }
tabset [role=tab]:last-of-type, .tab-group [role=tab]:last-of-type { tabset [role=tab]:last-of-type, .tab-group [role=tab]:last-of-type {
border-right: 1px solid var(--color-grey); border-right: 1px solid var(--colour-grey);
} }
tabset [role=tab]:not(.selected), .tab-group [role=tab]:not(.selected) { tabset [role=tab]:not(.selected), .tab-group [role=tab]:not(.selected) {
background-color: var(--color-grey-xxl); background-color: var(--colour-grey-xxl);
border-bottom: 1px solid var(--color-grey); border-bottom: 1px solid var(--colour-grey);
} }
tabset [role=tab] span, .tab-group [role=tab] span { tabset [role=tab] span, .tab-group [role=tab] span {
display: block; display: block;
margin: 0 0 0.5rem 0; margin: 0 0 0.5rem 0;
} }
tabset [role=tabpanel], .tab-group [role=tabpanel] { tabset [role=tabpanel], .tab-group [role=tabpanel] {
background-color: var(--color-white); background-color: var(--colour-white);
border: 1px solid var(--color-grey); border: 1px solid var(--colour-grey);
border-top: none; border-top: none;
padding: 1rem; padding: 1rem;
z-index: 1; z-index: 1;

View File

@ -1,4 +1,4 @@
extends ../../_master-pattern.pug extends ../../core/_master-pattern.pug
block content block content
- -

View File

@ -1,68 +1,316 @@
// This file is geneated by ../pg/_config.pug. Please make your changes there so they are not overwritten // DS2 core (c) 2024 Alexander McIlwraith
// Licensed under CC BY-SA 4.0
$colors: (
color-blue: #2e51a1,
color-blue-l: #5c7abf,
color-blue-xl: #b2c3ec,
color-blue-d: #133176,
color-blue-xd: #031235,
color-oj: #f0b031, /* Core Code
color-oj-l: #ffcc67,
color-oj-xl: #ffe4ad,
color-oj-d: #cb8906,
color-oj-xd: #9d6900,
color-raspberry: #da2c5b, This file is generates _core.scss using information in ../pg/_config.pug.
color-raspberry-l: #ed5e85, Please make your changes in your _config.pug file so that they are not
color-raspberry-xl: #f9a4bb, overwritten.
color-raspberry-d: #9f0c34, */
color-raspberry-xd: #400011,
color-lime: #cde92f,
color-lime-l: #e2f963,
color-lime-xl: #effca6,
color-lime-d: #9bb40b,
color-lime-xd: #607100,
color-grey: #7f7f7f, @mixin core-colour-samples {
color-grey-l: #b2b2b2,
color-grey-xl: #d8d8d8,
color-grey-xxl: #f0f0f0,
color-white: #fff,
color-page: #fff,
color-light: #fff,
color-grey-d: #4c4c4c,
color-grey-xd: #4c4c4c,
color-black: #000,
color-dark: #000,
color-error: #a00109, #copystatus {
color-error-text: #fff, left: 50%;
position: absolute;
z-index: 100;
div {
border-radius: 1rem;
border: 1px solid green;
left: -50%;
padding: 1rem;
position: relative;
white-space: nowrap;
&::after {
clear: both;
content: " ";
display: block;
}
&.succeeded {
background-color: white;
border-color: black;
color: black;
}
&.failed {
background-color: white;
border-color: #f00;
color: #f00;
}
}
}
color-warn: #a38301, color-samples {
color-warn-text: #fff, display: flex;
flex-direction: row;
flex-wrap: wrap;
gap: 1rem;
margin-bottom: 1rem;
color-notify: #599601, @include break(-lg) {
color-notify-text: #fff, display: grid;
grid-template-columns: repeat(2, 1fr);
max-width: 100%;
width: 100%;
}
color-info: #b2c3ec, @include break(-sm) {
color-info-text: #000, grid-template-columns: auto;
width: 100%;
max-width: 100%;
}
color-sample {
align-items: center;
border-radius: .5rem;
border: 1px solid #CCC;
display: grid;
font-family: inherit;
gap: .5rem;
grid-template-areas: "name name name hex hex hex"
"name name name rgb rgb rgb"
"acc acc acc acc acc acc"
"lighter lighter lighter darker darker darker"
"notes notes notes notes notes notes";
grid-template-columns: repeat(6, 1fr);
grid-template-rows: repeat(2, 1.5rem) 10rem repeat(3, max-content); // 3rem repeat(2, 2rem) 1.5rem repeat(3, max-content);
padding: 1rem;
width: 20rem;
max-width: 318px;
@include break(-lg) {
width: 100%;
max-width: 100%;
}
name {
align-self: start;
font-size: 1.25rem;
grid-area: name;
span {
cursor: pointer;
}
}
rgb {
grid-area: rgb;
white-space: nowrap;
}
hex {
grid-area: hex;
white-space: nowrap;
}
> accessibility {
border-bottom: 1px solid #ccc;
border-top: 1px solid #ccc;
}
accessibility {
grid-area: acc;
grid-row: 3;
padding: .5rem 0;
display: grid;
gap: .5rem;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: 2.5rem repeat(2, max-content);
.result {
align-items: center;
border-radius: .5rem;
display: grid;
grid-template-columns: repeat(2, 1fr);
border: 1px solid #ccc;
padding: 0 1rem;
text-align: center;
&.accwaa, &.accwaaa {
background-color: white;
color: black;
}
&.accbaa, &.accbaaa {
background-color: black;
color: white;
}
span:nth-child(2) {
font-size: 2rem;
}
}
.aa, .aaa {
align-self: center;
display: block;
font-size: .75rem;
}
.acchb {
grid-column: 2;
}
.acchb, .acchw {
display: grid;
grid-tempate-columns: auto;
grid-template-rows: repeat(2, max-content);
align-self: start;
text-align: center;
padding: 0;
span {
grid-row: 1;
grid-column: 1 / -1;
font-size: .9rem;
}
small {
text-align: center;
grid-row: 2;
grid-column: 1 / -1;
font-size: .75rem;
}
}
}
sample-block {
align-self: start;
grid-column: span 3;
grid-row: 4;
color-pill {
display: grid;
grid-gap: .5rem;
grid-template-columns: 20px max-content auto;
:nth-child(1) {
align-self: center;
border-radius: 5px;
border: 1px solid #CCC;
display: inline-block;
height: 10px;
width: 20px;
}
span {
cursor: pointer;
.tooltip-tc {
padding: .5rem;
width: 20rem;
max-width: 318px;
height: 10.5rem;
display: grid;
gap: .5rem;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: repeat(3, max-content);
.result {
align-items: center;
border-radius: .5rem;
display: grid;
grid-template-columns: repeat(2, 1fr);
border: 1px solid #ccc;
padding: 0 1rem;
text-align: center;
&.accwaa, &.accwaaa {
background-color: white;
color: black;
}
&.accbaa, &.accbaaa {
background-color: black;
color: white;
}
span{ border: none;
&:nth-child(2) {
font-size: 2rem;
}
}
}
.aa, .aaa {
align-self: center;
display: block;
font-size: .75rem;
}
.acchb {
grid-column: 2;
}
.acchb, .acchw {
border: none;
display: block;
width: 100%;
place-self: stretch;
span {
border: none;
font-size: .9rem;
width: 100%;
&::after, &::before {
display: none;
}
}
small {
font-size: .75rem;
text-align: center;
}
}
}
}
}
}
notes {
border-top: 1px solid #ccc;
grid-column: 1 / -1;
padding-top: .5rem;
}
}
}
}
//colour tokens
$colour: (
colour-blue: #2e51a1,
colour-blue-l: #5c7abf,
colour-blue-xl: #b2c3ec,
colour-blue-d: #133176,
colour-blue-xd: #031235,
colour-grey: #7f7f7f,
colour-grey-l: #b2b2b2,
colour-grey-xl: #d8d8d8,
colour-grey-xxl: #f0f0f0,
colour-white: #fff,
colour-page: #fff,
colour-light: #fff,
colour-grey-d: #4c4c4c,
colour-grey-xd: #4c4c4c,
colour-black: #000,
colour-dark: #000,
); );
:root { :root {
@each $name, $color in $colors { @each $name, $color in $colour {
--#{$name}: #{$color}; --#{$name}: #{$color};
} }
} }
@import "color-samples";
// Statuses
$statuses: ( $statuses: (
"not-started": transparent, "not-started": transparent,
"another-status": red, "in-progress": #f0b031,
"in-progress": var(--color-oj), "complete": #2e51a1,
"complete": var(--color-lime), "deprecated": #da2c5b,
"needs-review": var(--color-oj-xd),
"deprecated": var(--color-raspberry),
); );
h1[class^="status"], h2[class^="status"], span[class^="status"] {
&::after {
$size: 1.5rem;
border-radius: 50%;
border: 1px solid #CCC;
content: " ";
display: inline-block;
height: $size;
margin-left: .5rem;
position: relative;
top: 2px;
width: $size;
}
}
@each $name, $color in $statuses {
.status-#{$name}::after {
background-color: $color;
}
}
//! / Core Code

View File

@ -12,12 +12,11 @@ $tooltip-dark-allow: false;
@use 'sass:math'; @use 'sass:math';
@import "core";
// We recommend explicitly using the underscore when referring to pattern scss // We recommend explicitly using the underscore when referring to pattern scss
// as you may have also created a version that compiles to css to display in // as you may have also created a version that compiles to css to display in
// your pattern. // your pattern.
@import "color-samples"; @import "core";
@import "../pg/patterns/components/sticky-note-core/_sticky-note"; @import "../pg/patterns/components/sticky-note-core/_sticky-note";
@import "../pg/patterns/components/tooltip-core/_tooltip"; @import "../pg/patterns/components/tooltip-core/_tooltip";
@ -27,8 +26,6 @@ $tooltip-dark-allow: false;
@import "../pg/patterns/layouts/header-core/_header"; @import "../pg/patterns/layouts/header-core/_header";
@import "../pg/patterns/layouts/tabs-core/_tabs"; @import "../pg/patterns/layouts/tabs-core/_tabs";
@import "../pg/patterns/status-core/_status"; @import "../pg/patterns/status-core/_status";
* { * {
@ -43,10 +40,11 @@ html {
} }
} }
@include status; @include core-colour-samples;
@include color-samples;
@include tooltip; @include tooltip;
@include sticky-note; @include sticky-note;
@include status;
body { body {
margin: 0; margin: 0;
@ -56,10 +54,8 @@ body {
left: -9999px; left: -9999px;
} }
.container { .container {
display: grid; display: grid;
grid-template-columns: auto repeat(2, 22rem) auto; grid-template-columns: auto repeat(2, 22rem) auto;
margin: 0 auto; margin: 0 auto;
@ -67,20 +63,21 @@ body {
@include header; @include header;
nav { nav {
background-color: var(--color-blue); background-color: var(--colour-blue);
grid-column: 2 / 4; grid-column: 2 / 4;
display: none; display: none;
ul { ul {
margin: 1rem 0; margin: 1rem 0;
li { li {
display: inline-block; display: inline-block;
margin-right: 1rem; margin-right: 1rem;
} }
} }
a { a {
color: white; color: var(--colour-white);
text-decoration: none; text-decoration: none;
} }
@include break(md-) { @include break(md-) {
@ -90,32 +87,22 @@ body {
p.deprecated-switch { p.deprecated-switch {
grid-row: 3;
// @include break(-md) {
// grid-row: 2;
// grid-column: 2 / 4;
// }
grid-column: 2 / 4; grid-column: 2 / 4;
grid-row: 3;
text-align: right; text-align: right;
// align-items: center;
// display: grid;
// grid-gap: .5rem;
// grid-template-columns: auto max-content max-content;
// grid-area: dp;
// margin: 1rem .25rem;
@include switch; @include switch;
} }
main { main {
display: block;
grid-column: 1 / -1;
grid-row: 4; grid-row: 4;
padding: 0 1rem;
@include break(-md) { @include break(-md) {
grid-row: 3; grid-row: 3;
padding: 0; padding: 0;
} }
display: block;
padding: 0 1rem;
// grid-area: main;
grid-column: 1 / -1;
@supports(grid-area: auto) { @supports(grid-area: auto) {
display: grid; display: grid;
@ -131,8 +118,8 @@ body {
article { article {
grid-column: 2 / 4; grid-column: 2 / 4;
min-width: 0;
margin-top: 2rem; margin-top: 2rem;
min-width: 0;
&.status-deprecated { &.status-deprecated {
display: none; display: none;