- major style refactoring, we're going flat flat flat

- stylesheets splitting !
- removed sync.sass.js and css recompile switch : now using node sass and watcher during dev
  - no need to restart the whole app now, ctrl+r just refreshes the window
This commit is contained in:
jean-emmanuel 2016-03-18 01:34:41 +01:00
parent 417436bc34
commit bbb1080b93
36 changed files with 3309 additions and 2548 deletions

File diff suppressed because one or more lines are too long

View file

@ -69,7 +69,10 @@ var updateDom = function(container,data) {
if (data.widgets && data.widgets.length) parsewidgets(data.widgets,container)
if (data.tabs && data.tabs.length) {
parsetabs(data.tabs,container)
parsetabs(data.tabs,container,false,data.label)
container.addClass('has-tabs')
} else {
container.removeClass('has-tabs')
}
$(`[data-tab="#${container.attr('id')}"]`).html(`<a><span>${data.label}</span></a>`)

View file

@ -8,6 +8,9 @@ var editObject = function(container, data, refresh){
var isWidget = container.hasClass('widget')
$('.editing').removeClass('editing')
$('.widget.ui-resizable').resizable('destroy')
$('.widget.ui-draggable').draggable('destroy').find('.ui-draggable-handle').remove()
if (isWidget) {
$(container).addClass('editing')
@ -39,7 +42,8 @@ var editObject = function(container, data, refresh){
var type = typeof data[i],
value = type == 'object'?JSON.stringify(data[i]):data[i],
label = $(`<label>${i}</label>`).appendTo(form),
wrapper = $('<div class="input-wrapper"></div>').appendTo(form),
label = $(`<label>${i}</label>`).appendTo(wrapper),
input
if (i=='type') {
@ -50,7 +54,7 @@ var editObject = function(container, data, refresh){
input.append(`<option ${t==value?'selected=':''} value="${t}">${t}</option>`)
}
select = $('<div class="select-wrapper"></div>').append(input)
select.appendTo(form)
select.appendTo(wrapper)
} else if (typeof params[i]=='boolean') {
@ -58,12 +62,12 @@ var editObject = function(container, data, refresh){
input.click(function(){
$(this).val(!eval($(this).val())).trigger('change')
})
input.appendTo(form)
input.appendTo(wrapper)
} else {
input = $(`<input data-type="${type}" value='${value}' title="${i}"/>`)
input.appendTo(form)
input.appendTo(wrapper)
}
@ -89,7 +93,8 @@ var editObject = function(container, data, refresh){
// widget list edit
if (((isWidget&&widgetOptions[data.type].widgets) || (container.hasClass('tab'))) && (!data.tabs||!data.tabs.length)) {
var list = $('<ul class="input"></ul>')
var list = $('<ul class="input"></ul>'),
wrapper = $('<div class="input-wrapper column"></div>').appendTo(form)
var editItem = function(i) {
return function(){
@ -134,15 +139,17 @@ var editObject = function(container, data, refresh){
updateDom(container,data)
})
$('<label>widgets</label>').appendTo(form)
list.appendTo(form)
$('<label>widgets</label>').appendTo(wrapper)
list.appendTo(wrapper)
}
// tab list edit
if (((isWidget&&widgetOptions[data.type].tabs) || (container.hasClass('tab'))) && (!data.widgets||!data.widgets.length)) {
//tabs
var list = $('<ul class="input"></ul>')
var list = $('<ul class="input"></ul>'),
wrapper = $('<div class="input-wrapper column"></div>').appendTo(form)
var editItem = function(i) {
return function(){
@ -184,12 +191,11 @@ var editObject = function(container, data, refresh){
updateDom(container,data)
})
$('<label>tabs</label>').appendTo(form)
list.appendTo(form)
$('<label>tabs</label>').appendTo(wrapper)
list.appendTo(wrapper)
}
$('.widget.ui-resizable').resizable('destroy')
if (data.hasOwnProperty('width')) {
var handleTarget
container.resizable({
@ -208,7 +214,6 @@ var editObject = function(container, data, refresh){
})
}
$('.widget.ui-draggable').draggable('destroy').find('.ui-draggable-handle').remove()
if (data.hasOwnProperty('top')) {
container.draggable({
stop: function( event, ui ) {
@ -243,7 +248,9 @@ var editSession = function(container,data,refresh){
var form = $('<div class="form"></div>').appendTo('.editor-container'),
list = $('<ul class="input"></ul>')
list = $('<ul class="input"></ul>'),
wrapper = $('<div class="input-wrapper column"></div>').appendTo(form)
var editItem = function(i) {
return function(){
@ -287,8 +294,8 @@ var editSession = function(container,data,refresh){
updateDom(container,data)
})
$('<label>tabs</label>').appendTo(form)
list.appendTo(form)
$('<label>tabs</label>').appendTo(wrapper)
list.appendTo(wrapper)
$('.editor-container').append(form)

View file

@ -13,7 +13,7 @@ var hashCode = function(s){
return s.split("").reduce(function(a,b){a=((a<<5)-a)+b.charCodeAt(0);return a&a},0);
}
module.exports.tabs = function(data,parent,main){
module.exports.tabs = function(data,parent,main,parentLabel){
if (main) {
// Reset Globals
@ -34,6 +34,7 @@ module.exports.tabs = function(data,parent,main){
content = $(document.createElement('div')).addClass('content')
if (parentLabel) navtabs.append(`<li class="parent"><a><span>${parentLabel}</span></a></li>`)
for (i in data) {
var tabData = data[i]
@ -48,12 +49,12 @@ module.exports.tabs = function(data,parent,main){
navtabs.append(`<li data-tab="#${id}"><a><span>${label}</span></a></li>`)
var tabContent = $(`<div class="tab" id="${id}" data-index="${i}"></div>`)
var tabContent = $(`<div class="tab ${tabData.tabs&&tabData.tabs.length?'has-tabs':''}" id="${id}" data-index="${i}"></div>`)
tabContent.data(tabData)
if (tabData.tabs && tabData.tabs.length) {
module.exports.tabs(tabData.tabs,tabContent)
module.exports.tabs(tabData.tabs,tabContent,false,label)
} else if (tabData.widgets && tabData.widgets.length) {
module.exports.widgets(tabData.widgets,tabContent)
}
@ -77,7 +78,7 @@ module.exports.widgets = function(data,parent) {
for (i in data) {
var widgetData = data[i]
widgetData.type = widgetData.type || 'fader'
var tmpWidgetOptions = JSON.parse(JSON.stringify(widgetOptions))

View file

@ -97,7 +97,7 @@ var sidepanel = function(data){
inner = $('<div></div>').appendTo(item)
wrapper = $('<div class="actions"></div>').appendTo(inner)
if (itemData.title) $('<div class="title">'+itemData.title+'</div>').prependTo(inner)
if (itemData.title) $('<div class="title">'+itemData.title+'</div>').prependTo(wrapper)
if (itemData.class) inner.attr('class',itemData.class)
for (j in itemData.actions) {
@ -117,7 +117,7 @@ var sidepanel = function(data){
}(data)
var toggle = function(){
$(`<a id="open-toggle">${icon('navicon')}</a>`).appendTo('#container').click(function(e){
$(`<li><a id="open-toggle">${icon('navicon')}</a></li>`).appendTo('.navigation.main ul').click(function(e){
$('#open-toggle, #sidepanel, #container').toggleClass('sidepanel-open')
}).on('mousedown touchstart',function(e){e.stopPropagation()})

View file

@ -18,9 +18,9 @@ var tabs = function() {
TABS[id].tab.appendTo(TABS[id].parent)
$(previous).detach()
$(id).find('li[data-tab]:first-child:not(.on)').each(function(){
$(id).find('li[data-tab]:first-child, li.parent + li[data-tab]').each(function(){
if (!$(this).siblings('.on').length) $(this).click()
})

View file

@ -49,7 +49,7 @@ module.exports.create = function(widgetData,container) {
wrapper = widget.find('.fader-wrapper'),
fader = widget.find('.fader'),
pips = widget.find('.pips'),
input = widget.find('.input').fakeInput(),
input = widget.find('.input').fakeInput({align:'center'}),
unit = widgetData.unit?' '+widgetData.unit.trim(): '',
dimension = widgetData.horizontal?'width':'height',
axe = dimension=='height'?'X':'Y',
@ -79,7 +79,7 @@ module.exports.create = function(widgetData,container) {
var piptext = range[i]!=undefined?`<span>${Math.abs(range[i])>=1000?range[i]/1000+'k':range[i]}</span>`:''
pipsInner += `
<div class="pip ${range[i]!=undefined?'val':''}">${piptext}</div>
<div class="pip ${range[i]!=undefined?'val':''}">${piptext}${piptext}</div>
`
}
pips[0].innerHTML = pipsInner

View file

@ -51,7 +51,7 @@ module.exports.create = function(widgetData,container) {
mask = widget.find('.knob-mask'),
knob = widget.find('.knob'),
handle = widget.find('.handle'),
input = widget.find('.input').fakeInput(),
input = widget.find('.input').fakeInput({align:'center'}),
range = widgetData.range,
unit = widgetData.unit?' '+widgetData.unit.trim(): '',
absolute = widgetData.absolute,

View file

@ -32,6 +32,7 @@ module.exports.create = function(widgetData,container) {
if (widgetData.tabs.length) {
parsetabs(widgetData.tabs,widget)
widget.addClass('has-tabs')
} else {
parsewidgets(widgetData.widgets,widget)
}

View file

@ -27,7 +27,6 @@ module.exports.create = function(widgetData,container) {
var widget = $(`
<div class="push toggle">
<div class="light"></div>
</div>\
`),
$document = $(document)

View file

@ -22,7 +22,7 @@
canvas.resize(function(e){
e.stopPropagation()
var width = canvas.width(),
height = canvas.height()
@ -50,7 +50,7 @@
if (!self.height || !self.width || (self.height==100 && self.width==100)) return
ctx.clearRect(0,0,self.width,self.height)
ctx.font = '13px sans-serif'
ctx.font = '13px Droid Sans'
ctx.textBaseline = "top"
ctx.fillStyle = self.color

Binary file not shown.

File diff suppressed because one or more lines are too long

256
browser/scss/_editor.scss Normal file
View file

@ -0,0 +1,256 @@
.form {
.input-wrapper {
display: flex;
margin-bottom:$gutter;
background:$color-bg;
align-items: center;
&:last-child {
margin-bottom:0;
}
label {
background: $color-fg;
flex-shrink: 0;
padding: 5rem;
border:1rem solid $color-bg;
}
.input, input {
background: $color-bg;
width:100%;
padding:5rem;
}
&.column {
flex-direction: column;
label {
width:100%;
padding:7rem;
margin-bottom: 0;
}
}
}
label {
display: block;
font-size: 10rem;
background: $color-faded;
}
.info {
color:$color-text-fade;
margin-bottom:10rem;
}
input, .input {
display:block;
border:0;
font:inherit;
color:$color-text;
width:100%;
&:focus {
border-color:$color-accent;
}
.btn {
background:$color-raised-top;
box-shadow: 0 0 0 1rem $color-bg;
}
}
.checkbox {
background:$color-raised;
cursor: pointer;
}
.select-wrapper {
position: relative;
width:100%;
&:after{
content:"\f107";
font-family: FontAwesome;
position: absolute;
padding:5rem;
right:0;
top:0;
font-size: 20rem;
}
}
select {
-webkit-appearance:none;
}
.submit {
margin-top:30rem;
}
.separator {
line-height: 30rem;
height: 30rem;
margin-bottom: 5rem;
position: relative;
display: flex;
align-items: center;
&:before, &:after {
content:"";
top:14rem;
width: 100%;
height: 1rem;
background: $color-text-fade;
}
span {
font-variant: small-caps;
position: relative;
display: block;
width:100%;
text-align:center;
}
}
}
.widget.editing {
z-index: 11!important;
}
.widget.editing:after, li.editing a:before, a.editing:before, .content.editing:before, #container.editing:before{
content:"";
z-index: 999;
position: absolute;
top:0;
left:0;
right:0;
bottom:0;
border:1px dashed $color-accent;
pointer-events: none;
}
.context-menu {
position:fixed;
z-index: 999999999;
background: $color-raised-top;
box-shadow: 0 0 4rem 0 $color-border;
.context-menu {
position: absolute;
left:100%;
top:0;
opacity:0;
pointer-events: none;
margin-left: 2rem;
&:before {
content:"";
position: absolute;
top:0;
bottom:0;
left:-2rem;
width:2rem;
}
}
> .item {
padding: 10rem 15rem 10rem 10rem;
position:relative;
cursor: pointer;
i {
margin-right:5rem;
width: 15rem;
text-align: center;
}
&:hover, &:focus {
> .context-menu {
pointer-events: auto;
opacity: 1;
}
background:$color-accent;
}
&.has-sub:before {
content:"\f105";
display: block;
font-family: FontAwesome;
float:right;
margin-right:-10rem;
padding-left: 10rem;
}
}
}
.ui-resizable-handle {
position: absolute;
z-index: 1000000;
display: flex;
justify-content: center;
align-items: center;
background: $color-accent;
width:20rem;
height:20rem;
border-radius:100%;
box-shadow: 0 0 4rem 0 $color-bg;
&:after {
content:"";
position: absolute;
top:-5rem;
right:-5rem;
left:-5rem;
bottom:-5rem;
}
&.ui-resizable-se {
content:"";
bottom: 5rem;
right: 5rem;
cursor: se-resize;
&:before {
content:"\f065";
font-family: FontAwesome;
transform:rotate(90deg)
}
}
&.ui-resizable-e {
top: 50%;
margin-top:-10rem;
right: 5rem;
cursor: e-resize;
&:before {
content:"\f051";
font-family: FontAwesome;
}
}
&.ui-resizable-s {
bottom: 5rem;
left: 50%;
margin-left:-10rem;
cursor: s-resize;
&:before {
content:"\f051";
font-family: FontAwesome;
transform: rotate(90deg);
}
}
}
.ui-helper {
border: 1rem dashed $color-accent;
background: rgba($color-accent,.25);
min-width:30rem!important;
min-height:30rem!important;
z-index: 12!important;
opacity: 1!important;
}
:not(.absolute-position) .ui-helper:not(.ui-draggable-dragging) {
margin-top:-$gutter*2;
margin-left:-$gutter*2;
}
.ui-draggable-handle {
position: absolute;
top: 5rem;
left: 5rem;
z-index: 100000;
cursor: -webkit-grab;
height:20rem;
width: 20rem;
display: flex;
justify-content: center;
align-items: center;
border-radius:100%;
background: $color-accent;
box-shadow: 0 0 4rem 0 $color-bg;
&:active {
cursor:-webkit-grabbing
}
&:before {
content:"\f0b2";
font-family: FontAwesome;
transform: rotate(45deg);
}
}

169
browser/scss/_layout.scss Normal file
View file

@ -0,0 +1,169 @@
body {
background:$color-fg;
// border:$gutter*2 solid $color-fg;
border-radius: $border-radius
}
#container {
position: absolute;
top:0;
left:0;
bottom:0;
right:0;
display:flex;
flex-direction: column;
background:$color-bg;
padding:$gutter;
transition:right .2s;
&.sidepanel-open {
right:$sidepanel-size;
}
}
.content {
border-radius: $border-radius;
height:100%;
overflow: hidden;
position: relative;
background:$color-fg;
padding:$gutter;
}
.tab {
position: absolute;
border-radius: $border-radius;
overflow: auto;
left:0;
right:0;
top:0;
bottom:0;
background:$color-bg;
&.has-tabs {
// border:$gutter*2 solid $color-fg;
// padding: $gutter;
display: flex;
flex-direction: column;
> .navigation {
background:$color-bg;
// padding: $gutter;
// margin-bottom: 0;
}
> .content {
background:none;
}
}
}
.navigation {
height:$nav-height;
border-radius:$border-radius;
margin-bottom: $gutter;
flex-shrink:0;
font-weight:bold;
text-transform: uppercase;
&.main {
li:last-child {
width:$nav-height;
max-width:$nav-height;
min-width:$nav-height;
i {
margin:0 auto;
}
}
}
ul {
list-style:none;
display: flex;
overflow: hidden;
height:100%;
border-radius:$border-radius;
li {
display:block;
min-width:0;
flex: 1;
cursor:pointer;
height:100%;
margin-right: 1rem;
&.parent {
max-width: 150rem;
// min-width: 0;
flex:1;
position: relative;
padding-right: 1rem;
a {
background: $color-raised;
}
&:before {
content:"";
display: block;
position: absolute;
border-left:$nav-height/2 solid $color-bg;
border-bottom: $nav-height/2 solid transparent;
border-top: $nav-height/2 solid transparent;
top:0;
right:- ($nav-height/2 +1);
z-index: 1;
}
&:after {
content:"";
display: block;
position: absolute;
border-left:$nav-height/2 solid $color-raised;
border-bottom: $nav-height/2 solid transparent;
border-top: $nav-height/2 solid transparent;
top:0;
right:- ($nav-height/2 - 1);
z-index: 2;
}
}
&:last-child {
margin-right:0;
}
a {
background: $color-fg;
pointer-events: none;
padding: 5rem;
border-radius:$border-radius;
height:100%;
display: flex;
align-items: center;
overflow:hidden;
text-align:center;
position:relative;
span {
display:block;
width:100%;
-webkit-mask: linear-gradient(to left, rgba(0, 0, 0, 0), #000000 10rem) no-repeat;
}
}
a:after {
content:"";
background:$color-accent;
position: absolute;
bottom:0;
left:0;
right:0;
height:2rem;
opacity: 0;
transition: all .2s;
transform: scale(0);
}
&.on a, .sidepanel-open {
position: relative;
background: $color-raised;
&:after {
opacity:1;
transform: scale(1);
}
}
}
.parent + li a {
padding-left: $nav-height/2 + 5;
}
}
}

14
browser/scss/_reset.scss Normal file
View file

@ -0,0 +1,14 @@
* {
margin:0;
padding:0;
border:0;
box-sizing:border-box;
text-decoration:none;
outline:0;
font:inherit;
color:inherit;
cursor: inherit;
-webkit-tap-highlight-color:transparent;
-webkit-user-select: none;
}

View file

@ -0,0 +1,29 @@
::-webkit-scrollbar {
width: 20rem;
height:20rem;
opacity:1;
}
::-webkit-scrollbar-track-piece {
background: $color-bg;
&:vertical {
border-left:$gutter solid $color-bg;
}
&:horizontal {
border-top:$gutter solid $color-bg;
}
}
::-webkit-scrollbar-corner {
background: transparent;
}
::-webkit-scrollbar-thumb {
background:$color-raised;
&:vertical {
border-left:$gutter solid $color-bg;
}
&:horizontal {
border-top:$gutter solid $color-bg;
}
}

View file

@ -0,0 +1,119 @@
#sidepanel {
position:absolute;
z-index: 999999;
width:$sidepanel-size;
border: $gutter*2 solid $color-fg;
top:0;
right:0;
bottom:0;
margin-right:-$sidepanel-size;
background:$color-fg;
transition:right .2s;
overflow-y: auto;
overflow-x: visible;
&.sidepanel-open {
right:$sidepanel-size;
}
#options {
position:absolute;
left:0;top:0;
right:0;bottom:0;
list-style:none;
li {
display:block;
margin-bottom:$gutter*2;
position: relative;
&:last-child {
margin: 0;
}
.btn + span {
position: absolute;
right:0rem;
top:0rem;
padding:8rem;
color:$color-text-fade;
&:hover {
color:$color-text;
}
}
ul {
padding: $gutter;
li {
margin-bottom: $gutter;
}
}
}
.editor .form {
margin-top: 10rem;
}
.help {
margin-top:10rem;
font-size: .75em;
text-align: center;
font-style: italic;
}
}
&::-webkit-scrollbar-track-piece {
background: $color-bg;
&:vertical {
border-left:$gutter*2 solid $color-fg;
}
}
&::-webkit-scrollbar-thumb {
background:$color-raised;
&:vertical {
border-left:$gutter*2 solid $color-fg;
}
}
}
.actions {
padding:1rem;
background:$color-bg;
display: flex;
align-items: stretch;
flex-wrap:wrap;
.title {
background: $color-faded;
min-width: 100%;
flex-grow: 2;
padding: 10rem;
box-shadow: 0 0 0 1rem $color-bg;
}
a {
min-width:33%;
flex-grow:4;
padding:10rem;
display: block;
text-align: center;
box-shadow: 0 0 0 1rem $color-bg;
position: relative;
&.on {
pointer-events: none;
&:after {
opacity:1;
transform: scale(1);
}
}
&:after {
content:"";
background:$color-accent;
position: absolute;
top:0;
left:0;
right:0;
height:2rem;
opacity: 0;
transition: all .2s;
transform: scale(0);
}
}
}

47
browser/scss/_vars.scss Normal file
View file

@ -0,0 +1,47 @@
$theme:'dark';
/////////////
@if $theme == 'dark' {
$color-text:rgba(white,.8);
$color-text-fade:rgba(white,0.5);
$color-bg:darken(#2b2f37,5%); // secondary
$color-fg:lighten(#2b2f37,1%); // primary
$color-raised:lighten(#2b2f37,5%); // raised
$color-faded: darken(#2b2f37,1%); // raised
$color-raised-top:lighten(#2b2f37,5%); // raised
$color-border:darken($color-bg,5%);
$color-track: lighten(#1a1d22,1%); // widgets unfilled value
$color-accent:#528bff;
}
@if $theme == 'light' {
$color-text:#333;
$color-text-fade:#666;
$color-fg:#ddd; // primary
$color-bg:#bbb; // secondary
$color-raised:#eaeaea; // raised
$color-raised-top:#ddd; // raised
$color-border:#999;
$color-track: #999; // widgets unfilled value
$color-accent:darken(desaturate(#528bff,25%),10%);
}
$border-radius:0;//3rem;
$gutter:4rem;
$nav-height:40rem;
$sidepanel-size:300rem;
/////////////
:root {
--color-accent:$color-accent;
--color-text:$color-text;
--color-text-fade:$color-text-fade;
}

112
browser/scss/_widgets.scss Normal file
View file

@ -0,0 +1,112 @@
.widget {
display:inline-block;
height:auto;
overflow: hidden;
position:relative;
padding:35rem 0 0;
vertical-align:top;
box-shadow: 0 0 0 1rem $color-bg;
background:$color-fg;
background-clip:padding-box;
-webkit-tap-highlight-color:transparent;
min-height:30rem;
min-width:30rem;
&:not(:last-child):not(.absolute-position) {
margin-right:1rem//$gutter;
}
&.absolute-position {
position: absolute;
z-index: 10;
border:0;
}
&.nolabel {
padding-top:0;
> .label {
display:none;
}
}
.label {
padding:10rem 10rem;
position:absolute;
top:0;
left:0;
right:0;
text-overflow:ellipsis;
overflow:hidden;
text-align:center;
height:35rem;
background: $color-faded;
border-bottom:1rem solid $color-bg;
&.accent {
color:$color-accent;
}
}
.input {
width:100%;
height:30rem;
border:0;
background:transparent;
color:$color-text-fade;
display:block;
padding:7rem 5rem;
position: relative;
input {
position: absolute;
top:0;
left:0;
right:0;
bottom:0;
padding:7rem 5rem;
width: 100%;
font: inherit;
text-align:center;
border:0;
background: transparent;
color:$color-accent;
}
canvas {
width:100%;
height:100%;
opacity: 0;
transition: opacity .2s;
&.visible {
opacity:.8;
}
}
input + canvas {
visibility: hidden;
}
&:focus {
color:$color-accent;
}
&[disabled] {
color:$color-text-fade;
}
}
}
@import 'widgets/fader';
@import 'widgets/knob';
@import 'widgets/matrices';
@import 'widgets/pads';
@import 'widgets/plots';
@import 'widgets/toggle';
@import 'widgets/push';
@import 'widgets/switch';
@import 'widgets/strip';
@import 'widgets/panel';

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,202 @@
.fader-container {
width:100rem;
min-height: 200rem;
height:100%;
&.nolabel .fader-wrapper-outer {
top:0;
}
.fader-wrapper-outer {
padding-bottom:30rem;
position: absolute;
top:30rem;
bottom:0;
left:0;
right:0;
.input {
position:absolute;
bottom:0;
}
}
.fader-wrapper {
padding:20rem 20rem 10rem;
overflow:hidden;
height:100%;
position: relative;
cursor: -webkit-grab;
&:active {
cursor: -webkit-grabbing;
}
.fader {
height:100%;
width:4rem;
position: relative;
margin:0 auto;
pointer-events: none;
&:before {
content:"";
width:100%;
height:100%;
background:$color-track;
z-index: 1;
position: relative;
display:block;
box-shadow: 0 0 0 15rem $color-fg;
}
&.nogauge {
.handle {
background:none;
}
}
.handle {
position: absolute;
bottom:0!important;
top:auto!important;
width:100%;
height:100%;
transform-origin: bottom;
max-height:100%;
max-width:100%;
background:$color-accent;
z-index: 1;
transform-style: preserve-3d;
backface-visibility: hidden;
span {
position: absolute;
bottom:0;
top:0;
width:100%;
height:100%;
transform-origin: top;
backface-visibility: hidden;
}
span:before {
content:"";
position: absolute;
top:-4rem;
left:-2rem;
height:8rem;
width:8rem;
background:$color-accent;
border:none!important;
border-radius: 100%!important;
box-shadow: 0 0 0 6rem transparentize($color-accent,.8),0 0 2rem 0 mix($color-text,$color-fg,2);
}
span:after {
content:"";
position: absolute;
top:-10rem;
left:-8rem;
height:20rem;
width:20rem;
border:none!important;
border-radius: 100%!important;
box-shadow: 0 0 0 1rem transparentize($color-accent,.8) inset;
}
}
}
.pips {
position: absolute;
top:0;
bottom:0;
left:50%;
z-index: 0;
.pip {
height:1%;
width:38rem;
margin-left:-19rem;
background: linear-gradient($color-text,transparent 1px);
&.val {
position: relative;
width:44rem;
margin-left:-22rem;
span {
position: absolute;
width:30rem;
display: block;
text-align: center;
font-size:11rem;
line-height: 12rem;
left:44rem;
top:-5.5rem;
color:$color-text-fade;
&:last-child {
left:auto;
right:44rem;
}
}
}
}
}
}
}
.fader-container.horizontal {
min-height: 80rem;
height: auto;
width:300rem;
flex-shrink: 0;
.fader-wrapper-outer {
position: relative;
top:auto;
padding-bottom: 30rem;
height: 100%;
.fader-wrapper {
padding:20rem 20rem 35rem;
}
.fader {
width:100%;
left:auto;
top:50%;
height:4rem;
.handle {
height:100%important;
width:100%;
transform-origin: left;
span {
transform-origin: right;
}
span:before {
top:-2rem;
right:-4rem;
left:auto;
}
span:after {
top:-8rem;
right:-10rem;
left:auto
}
}
}
.pips {
top:14rem;left:0;
right:0;
font-size: 0;
}
.pip {
width:1%;
display: inline-block;
height:4rem;
margin-bottom:5rem;
margin-left:0;
background: linear-gradient(90deg,$color-text,transparent 1px );
&.val {
width:1%;
height:10rem;
margin-left:0;
span {
top:15rem;
left:-15rem;
&:last-child {
display: none;
}
}
}
}
}
}

View file

@ -0,0 +1,199 @@
.knob-container {
width: 100rem;
display: inline-flex!important;
align-items: center;
min-height: 135rem;
flex-shrink: 0;
&.nolabel .knob-wrapper-outer{
top:0;
padding-bottom:30rem;
}
.knob-wrapper-outer {
width: 100%;
top: 30rem;
bottom: 0;
padding:10rem 0 50rem;
height: 100%;
display: flex;
align-items: center;
.input {
bottom:0;
position: absolute;
left:0;
}
.knob-wrapper {
margin:0 auto;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
position: relative;
cursor: -webkit-grab;
&:active {
cursor: -webkit-grabbing;
}
.knob-mask {
width:58%;
padding-bottom:58%;
flex-shrink: 0;
border-radius:100%;
pointer-events: none;
position: relative;
&:before {
position:absolute;
top:0;left:0;
right:0;
bottom:0;
border-radius:100%;
border:4rem solid $color-track;
box-shadow: 0 0 0 1rem mix($color-text,$color-fg,2),0 0 0 1rem mix($color-text,$color-fg,2) inset,0 0 1rem 1rem mix($color-text,$color-fg,2),0 0 1rem 1rem mix($color-text,$color-fg,2) inset;
transform: rotate(45deg);
z-index:4;
}
&.pan-left {
&:before {
content:"";
border-left-color: transparent;
border-bottom-color: transparent;
}
.knob:after {
border-color: $color-track;
border-left-color: $color-accent;
border-top-color: $color-accent;
}
}
&.pan-right {
&:before {
content:"";
border-right-color: transparent;
border-top-color: transparent;
}
.knob:after {
border-color: $color-track;
border-right-color: $color-accent;
border-bottom-color: $color-accent;
}
}
&:after {
content:"";
position:absolute;
top:0rem;left:-3rem;
right:-3rem;
bottom:-2rem;
border-radius:100%;
border:12rem solid transparent;
border-bottom-color: $color-fg;
z-index:4;
}
}
.round {
content:"";
position:absolute;
top:15rem;
left:15rem;
right:15rem;
bottom:15rem;
border-radius:100%;
background:$color-raised;
}
.knob {
position:absolute;
top:0;left:0;
right:0;
bottom:0;
pointer-events: none;
transform:rotateZ(0deg);
backface-visibility: hidden;
z-index: 2;
&:after {
content:"";
position:absolute;
top:0;left:0;
right:0;
bottom:0;
border-radius:100%;
border:4rem solid $color-track;
border-bottom-color: $color-accent;
}
&.d2:after {
border-right-color: $color-accent;
}
&.d3:after {
border-top-color: $color-accent;
border-right-color: $color-accent;
}
}
.handle {
position:absolute;
top:0;left:0;
right:0;
bottom:0;
pointer-events: none;
transform:rotateZ(-45deg);
backface-visibility: hidden;
z-index: 5;
&:before {
content:"";
position: absolute;
top:50%;
left:-2rem;
margin-top:-4rem;
height:8rem;
width:8rem;
background:$color-accent;
border:none!important;
border-radius: 100%!important;
box-shadow: 0 0 0 6rem transparentize($color-accent,.8),0 0 2rem 0 mix($color-text,$color-fg,2);
}
&:after {
content:"";
position: absolute;
top:50%;
margin-top:-10rem;
left:-8rem;
height:20rem;
width:20rem;
border:none!important;
border-radius: 100%!important;
box-shadow: 0 0 0 1rem transparentize($color-accent,.8) inset;
}
}
.pip {
position:absolute;
font-size:11rem;
color:$color-text;
pointer-events: none;
top:50%;
margin-top:30%;
&.min {
left:0;
right:50%;
width:50%;
text-align:center;
}
&.max {
left:50%;
width:50%;
right:0;
text-align:center;
}
}
}
}
}

View file

@ -0,0 +1,53 @@
/* Multiple widgets (push|toggle|fader) matrix */
.multitoggle-container, .multipush-container, .multifader-container {
height:200rem;
width:200rem;
&.nolabel .matrix {
top:0;
}
}
.matrix {
overflow: auto;
position: absolute;
top:35rem;
left:0;
right:0;
bottom:0;
background: $color-bg;
display: flex;
flex-wrap: wrap;
flex-direction: row;
> .widget {
min-height: 0;
min-width: 0;
margin:0!important;
}
}
.multifader-container {
.matrix {
padding:0!important
}
.widget {
border: 0!important;
// box-shadow: none!important;
.label {
background:none;
border:0;
}
}
.fader-wrapper {
padding:10rem 0!important;
.fader {
left:0!important;
.pips {
display:none;
}
}
}
}

View file

@ -0,0 +1,186 @@
.xy-container, .rgb-container {
width:200rem;
height:250rem;
flex-shrink: 0;
&.nolabel .xy-wrapper {
top:0;
}
}
.xy-wrapper {
position: absolute;
top:35rem;
left:0;
right:0;
bottom:0;
overflow: hidden;
padding-bottom: 60rem;
.value {
width:100%;
position: absolute;
bottom:0;
border-top: 1rem solid $color-bg;
}
.input, input {
width:50%;
float:left;
height: 30rem;
text-align: center;
position: relative;
}
}
.xy {
position:relative;
width:auto;
height:100%;
overflow: hidden;
cursor: -webkit-grab;
background:rgba($color-bg,.5);
&:active {
cursor: -webkit-grabbing;
.handle:after,.handle:before {
transform: scale(1.5);
}
}
.handle {
position:absolute;
bottom:0;
left:0;
z-index:2;
pointer-events: none;
backface-visibility: hidden;
transform-origin: center;
transform:translate3d(0,0,0);
&:before {
content:"";
position: absolute;
top:-4rem;
right:-4rem;
height:8rem;
width:8rem;
background:$color-accent;
border:none!important;
border-radius: 100%!important;
box-shadow: 0 0 0 6rem transparentize($color-accent,.8),0 0 2rem 0 mix($color-text,$color-fg,2);
}
&:after {
content:"";
position: absolute;
top:-10rem;
right:-10rem;
height:20rem;
width:20rem;
border:none!important;
border-radius: 100%!important;
box-shadow: 0 0 0 1rem transparentize($color-accent,.8) inset;
}
}
}
.rgb-wrapper {
padding-bottom: 90rem;
.input, input {
width:33.33%;
}
}
.rgb {
.bg {
position: absolute;
top:0;
left:0;
right:0;
bottom:0;
background-color: red;
opacity: .75;
&:before, &:after {
content:"";
position: absolute;
left:0;
top:0;
width: 100%;
height: 100%;
}
&:before {
background: linear-gradient(to right, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
}
&:after {
background:linear-gradient(to bottom, rgba(0,0,0,0) 0%,rgba(0,0,0,1) 100%);
}
}
.handle {
&:before {
content:"";
position: absolute;
top:-4rem;
right:-4rem;
height:8rem;
width:8rem;
background:$color-text;
border:none!important;
border-radius: 100%!important;
box-shadow: 0 0 0 6rem transparentize($color-text,.8)
}
&:after {
content:"";
position: absolute;
top:-10rem;
right:-10rem;
height:20rem;
width:20rem;
border:none!important;
border-radius: 100%!important;
box-shadow: 0 0 0 1rem transparentize($color-text,.8) inset;
}
}
}
.hue {
width:auto;
height:29rem;
overflow: hidden;
position: absolute;
bottom:61rem;
left:0;
right:0;
cursor: -webkit-grab;
.bg {
position: absolute;
top:0;
left:0;
right:0;
bottom:0;
opacity: 0.5;
background:transparent linear-gradient(to left, #F00, #FF0080, #F0F, #8000FF, #00F, #0080FF, #0FF, #00FF80, #0F0, #80FF00, #FF0, #FF8000, #F00) repeat scroll 0% 0%;
}
&:active {
cursor: -webkit-grabbing;
.handle:after {
transform: scale(1.5);
}
}
.handle {
position:absolute;
z-index:2;
left:0;
top:50%;
pointer-events: none;
transform: translate3d(0,0,0);
&:before {
content:"";
position: absolute;
top:-4rem;
right:-4rem;
height:8rem;
width:8rem;
border:none!important;
border-radius: 100%!important;
box-shadow: none;
background:$color-text;
}
}
}

View file

@ -0,0 +1,57 @@
.panel-container {
z-index: 2;
min-width: 200rem;
min-height: 200rem;
::-webkit-scrollbar-thumb, ::-webkit-scrollbar-track-piece {
border-top: 1rem solid $color-bg;
}
&.nolabel .panel {
top:1rem;
}
.panel {
overflow: auto;
position: absolute;
top:35rem;
left:1rem;
right:1rem;
bottom:1rem;
background: $color-bg;
z-index: 1;
&.has-tabs {
display: flex;
flex-direction: column;
}
&.stretch {
display:flex;
justify-content: space-between;
> .widget {
width:100%;
}
}
> .navigation:before {
display:none;
}
}
.navigation {
border-top: 0;
background: transparent;
&:after {
background: $color-bg;
}
a.on {
border-color: $color-bg;
}
}
.content {
background: transparent;
}
}

View file

@ -0,0 +1,51 @@
.led-container {
width:100rem;
flex-shrink: 0;
.led {
padding:10rem;
display: flex;
align-items: center;
height: 100%;
div {
border-radius: 100%;
width:40rem;
height:40rem;
margin: 0 auto;
overflow: hidden;
background:$color-border;
span {
height:100%;
display:block;
background-color:$color-accent;
}
}
}
}
.plot-container, .visualizer-container {
min-height: 200rem;
min-width: 200rem;
.plot {
position: absolute;
top: 35rem;
left: 0;
right: 0;
bottom: 0;
// padding:2rem;
}
&.nolabel .plot {
top:0;
}
canvas {
width:100%;
height:100%;
opacity: 0;
transition: opacity .2s;
&.visible {
opacity:1;
}
}
}

View file

@ -0,0 +1,45 @@
.push-container {
width:100rem;
min-height: 65rem;
flex-shrink: 0;
padding:0!important;
background: $color-raised;
.label {
position: absolute;
top:0;
left:0;
right:0;
bottom:0;
height:auto;
background: none!important;
text-align: center;
pointer-events:none;
display: flex;
justify-content: center;
align-items: center;
z-index: 1;
}
cursor: pointer;
.label {
}
}
.push {
&.on {
animation:none;
background: $color-accent;
}
// .light {
// top:6rem;
// left:6rem;
// right:6rem;
// bottom:6rem;
// border-radius:0;
// height:auto;
// opacity:.5;
// }
}

View file

@ -0,0 +1,71 @@
.strip-container {
padding-top: 35rem;
width:100rem;
height:100%;
overflow: visible;
background: none;
&.nolabel {
padding: 0!important;
}
.strip {
height: 100%;
display: flex;
flex-direction: column;
> .widget {
display: block;
width:auto;
margin:0;
}
}
&.vertical {
padding-top: 35rem;
border-bottom:0;
.strip > .widget {
max-width: 100%;
margin-top:-1rem;
}
}
&.horizontal {
padding-top:0;
padding-left: 35rem;
width:100%;
height:auto;
display: block;
border-right:0;
margin-bottom: $gutter;
.strip {
flex-direction: row;
> .widget {
flex-shrink: initial;
width: 100%;
min-height: 100%;
max-height: 100%;
margin-left:-1rem;
}
}
> .label {
width:35rem;
height:100%;
left:0;
top:0;
border-bottom:0;
border-right:1rem solid $color-bg;
span {
transform: rotate(180deg);
display: block;
position: relative;
overflow: hidden;
text-overflow: ellipsis;
-webkit-writing-mode:vertical-lr;
text-align: center;
height:100%;
}
}
}
}

View file

@ -0,0 +1,74 @@
.switch-container {
// height: 100%;
width:100rem;
flex-shrink: 0;
&.nolabel .value:first-child {
border-top:0!important;
}
.switch {
height:100%;
width:100%;
cursor: pointer;
display: flex;
flex-direction:column;
align-items: stretch;
&.horizontal {
flex-direction:row;
.value {
padding:28rem 12rem 12rem 12rem;
text-align: center;
display: flex;
justify-content: center;
flex-direction: column;
&:before {
left:50%;
top:8rem;
width:8rem;
height:8rem;
margin-left: -4rem;
margin-top:0;
}
&:first-child {
border-top: 1rem solid $color-fg;
}
}
}
.value {
background:$color-raised;
color:$color-text;
width:100%;
height:100%;
position: relative;
border-top: 1rem solid $color-fg;
padding:12rem 12rem 12rem 24rem ;
white-space: normal;
text-align: left;
word-break: break-all;
overflow: hidden;
&:last-child {
margin-bottom:0;
}
&:before {
content:"";
position: absolute;
left:8rem;
top:50%;
width:8rem;
height:8rem;
margin-top: -4rem;
background: $color-track;
border-radius: 8rem;
}
&.on:before {
background: $color-accent;
}
}
}
}

View file

@ -0,0 +1,45 @@
.toggle-container {
width:100rem;
min-height: 65rem;
flex-shrink: 0;
padding:0!important;
background: $color-raised;
.label {
position: absolute;
top:0;
left:0;
right:0;
bottom:0;
height:auto;
background: none!important;
text-align: center;
pointer-events:none;
display: flex;
justify-content: center;
align-items: center;
}
cursor: pointer;
}
.toggle {
position: absolute;
top:0;
left:0;
right:0;
bottom:0;
.light {
position: absolute;
left:4rem;
right:4rem;
top:4rem;
height:4rem;
background: $color-track;
pointer-events: none;
}
&.on .light {
background: $color-accent;
}
}