themes: add bitwig theme and manage themes src as scss
This commit is contained in:
parent
086aa09572
commit
46c196992e
11 changed files with 137 additions and 56 deletions
|
|
@ -5,7 +5,8 @@ var baseDir = process.env[(process.platform == 'win32') ? 'USERPROFILE' : 'HOME'
|
|||
configPath = require('path').join(baseDir, '.open-stage-control'),
|
||||
fs = require('fs'),
|
||||
ifaces = require('os').networkInterfaces(),
|
||||
chokidar = require('chokidar')
|
||||
chokidar = require('chokidar'),
|
||||
path = require('path')
|
||||
|
||||
var options = {
|
||||
's':{alias:'send',type:'array',describe:'default targets for all widgets (ip:port pairs)',
|
||||
|
|
@ -111,25 +112,25 @@ var loadTheme = function(themes){
|
|||
var style = []
|
||||
|
||||
for (let i in themes) {
|
||||
let path = themes[i]
|
||||
if (!fs.existsSync(path)) {
|
||||
path = __dirname + '/themes/' + themes[i] + '.css'
|
||||
if (!fs.existsSync(path)) {
|
||||
path = false
|
||||
let file = themes[i]
|
||||
if (!fs.existsSync(file)) {
|
||||
file = path.resolve(__dirname + '/../browser/themes/' + themes[i] + '.css')
|
||||
if (!fs.existsSync(file)) {
|
||||
file = false
|
||||
}
|
||||
}
|
||||
|
||||
if (path) {
|
||||
if (file) {
|
||||
|
||||
let updateStyle = (i)=>{
|
||||
try {
|
||||
style[i] = fs.readFileSync(path,'utf-8')
|
||||
style[i] = fs.readFileSync(file,'utf-8')
|
||||
} catch(err) {
|
||||
throw err
|
||||
}
|
||||
}
|
||||
let watchFile = ()=>{
|
||||
var watcher = chokidar.watch(path)
|
||||
var watcher = chokidar.watch(file)
|
||||
watcher.on('change',()=>{
|
||||
updateStyle(i)
|
||||
require('./callbacks').reloadCss()
|
||||
|
|
|
|||
|
|
@ -1,16 +0,0 @@
|
|||
:root {
|
||||
--color-text: rgba(255,255,255,0.7);
|
||||
--color-text-fade: rgba(255,255,255,0.5);
|
||||
|
||||
/*--color-accent:#f58506;*/
|
||||
--color-bg: #000;
|
||||
--color-fg: #111;
|
||||
--color-raised: #1C1C1C;
|
||||
--color-track: #111;
|
||||
--color-light: rgba(255,255,255,0.03);
|
||||
|
||||
}
|
||||
|
||||
.keyboard-container {
|
||||
--color-black: #555;
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
:root {
|
||||
--color-text: rgba(0,0,0,0.7);
|
||||
--color-text-fade: rgba(0,0,0,0.5);
|
||||
|
||||
--color-accent:rgba(28, 133, 239, 1);
|
||||
--color-grid: rgba(28, 133, 239, .1);
|
||||
|
||||
--color-bg: #bbb;
|
||||
--color-fg: #ddd;
|
||||
--color-raised: #efefef;
|
||||
--color-track: #dadada;
|
||||
--color-light: rgba(255,255,255,0.5);
|
||||
|
||||
--color-white: black;
|
||||
}
|
||||
|
||||
.keyboard-container {
|
||||
--color-black-key: #ccc;
|
||||
--color-white-key: #eee;
|
||||
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
.widget .input {
|
||||
display: none;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue