Load the Material colour scheme directly from the source YAML, rather than hardcoding it into Stylus format
parent
9d91cec6f9
commit
0419a844ce
@ -0,0 +1,3 @@
|
||||
[submodule "lemoncurry/static/base16-materialtheme-scheme"]
|
||||
path = lemoncurry/static/base16-materialtheme-scheme
|
||||
url = git://github.com/ntpeters/base16-materialtheme-scheme.git
|
@ -0,0 +1 @@
|
||||
Subproject commit cbbc47444208fb8f28dbc48ea986c9dc81843e9a
|
@ -1,17 +0,0 @@
|
||||
// Source: https://github.com/ntpeters/base16-materialtheme-scheme/blob/cbbc474/material-darker.yaml
|
||||
$base00 = #212121
|
||||
$base01 = #303030
|
||||
$base02 = #353535
|
||||
$base03 = #4A4A4A
|
||||
$base04 = #B2CCD6
|
||||
$base05 = #EEFFFF
|
||||
$base06 = #EEFFFF
|
||||
$base07 = #FFFFFF
|
||||
$base08 = #F07178
|
||||
$base09 = #F78C6C
|
||||
$base0A = #FFCB6B
|
||||
$base0B = #C3E88D
|
||||
$base0C = #89DDFF
|
||||
$base0D = #82AAFF
|
||||
$base0E = #C792EA
|
||||
$base0F = #FF5370
|
@ -0,0 +1,18 @@
|
||||
const {join} = require('path');
|
||||
const {readFileSync} = require('fs');
|
||||
|
||||
const stylus = require('stylus');
|
||||
const {safeLoad} = require('js-yaml');
|
||||
|
||||
const themePath = join(__dirname, '..', '..', 'base16-materialtheme-scheme', 'material-darker.yaml');
|
||||
|
||||
module.exports = function() {
|
||||
const theme = safeLoad(readFileSync(themePath, 'utf8'));
|
||||
return function(style) {
|
||||
for (let i = 0; i < 16; i++) {
|
||||
const key = 'base0' + i.toString(16).toUpperCase();
|
||||
|
||||
style.define('$' + key, new stylus.nodes.Literal('#' + theme[key]));
|
||||
}
|
||||
};
|
||||
};
|
Loading…
Reference in new issue