63 lines
1.3 KiB
Plaintext
63 lines
1.3 KiB
Plaintext
|
//- 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}
|