ui: change font, wip

This commit is contained in:
jean-emmanuel 2017-07-12 19:43:43 +02:00
parent 7bba3d0d21
commit 4a63c6b8c3
18 changed files with 67 additions and 43 deletions

View file

@ -1,6 +0,0 @@
@font-face {
font-family: 'Droid Sans';
font-style: normal;
font-weight: 400;
src: local('Droid Sans'), local('DroidSans'), url('droid-sans.woff2') format('woff2');
}

Binary file not shown.

View file

@ -0,0 +1,6 @@
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
src: local('Roboto'), local('Roboto medium'), url('roboto-medium.woff2') format('woff2');
}

Binary file not shown.

View file

@ -3,17 +3,15 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, user-scalable=no"/>
<link rel="preload" href="fonts/droid-sans.woff2"/>
<link rel="preload" href="fonts/fontawesome-webfont.woff2"/>
<link rel="preload" href="fonts/font-awesome.min.css"/>
<link rel="preload" href="fonts/droid-sans.css"/>
<link rel="preload" href="fonts/roboto-medium.css"/>
<link rel="preload" href="styles.css"/>
<link rel="preload" href="scripts.js"/>
<link rel="preload" href="scripts.js.map"/>
<link rel="stylesheet" href="styles.css" hot-reload/>
<link rel="stylesheet" href="theme.css" hot-reload/>
<link rel="stylesheet" href="fonts/font-awesome.min.css"/>
<link rel="stylesheet" href="fonts/droid-sans.css"/>
<link rel="stylesheet" href="fonts/roboto-medium.css"/>
<script src="scripts.js"></script>
</head>

View file

@ -58,7 +58,7 @@ var editObject = function(container, data, refresh){
input = $(`<select class="input" data-type="${type}" title="${i}"/>`)
for (let c in categories) {
input.append(`<optgroup label="${c}">`)
input.append(`<optgroup label="> ${c}">`)
for (let t of categories[c]) {
input.append(`<option ${t==value?'selected=':''} value="${t}">${t}</option>`)
}

View file

@ -75,7 +75,8 @@ module.exports = class _canvas_base extends _widgets_base {
}
this.fontSize = parseFloat(style.getPropertyValue("font-size"))
this.ctx.font = this.fontSize + 'px ' + this.fontFamily
this.fontWeight = parseFloat(style.getPropertyValue("font-weight"))
this.ctx.font = this.fontWeight + ' ' + this.fontSize + 'px ' + this.fontFamily
this.ctx.textBaseline = "middle"
this.ctx.textAlign = this.textAlign

View file

@ -249,7 +249,7 @@ module.exports = class Fader extends _sliders_base {
this.ctx.stroke()
this.ctx.beginPath()
this.ctx.globalAlpha = 1
this.ctx.globalAlpha = 0.7
this.ctx.strokeStyle = this.colors.gauge
this.ctx.moveTo(m, o)
this.ctx.lineTo(m, d)

View file

@ -148,7 +148,7 @@ module.exports = class Knob extends _sliders_base {
pipsWidth = this.getProp('pips') ? 3 * PXSCALE : 0,
pipsRadius = this.minDimension / 2 - pipsWidth / 2 - margin,
gaugeWidth = 7 * PXSCALE,
gaugeRadius = pipsRadius - gaugeWidth / 2 - pipsWidth / 2,
gaugeRadius = pipsRadius - gaugeWidth / 2 - pipsWidth * 1.5,
knobRadius = gaugeRadius - gaugeWidth
@ -166,7 +166,7 @@ module.exports = class Knob extends _sliders_base {
this.ctx.beginPath()
for (var pip of this.rangeKeys.concat(this.valueToPercent(this.originValue))) {
let r1 = pipsRadius - pipsWidth / 2,
r2 = pipsRadius + pipsWidth / 2 + PXSCALE,
r2 = pipsRadius + pipsWidth / 2,
a = 2 * Math.PI - this.percentToAngle(pip)
if (pip == 0) a += 1.5 * PXSCALE / pipsRadius
@ -176,10 +176,15 @@ module.exports = class Knob extends _sliders_base {
this.ctx.lineTo(r2 * Math.cos(a) + this.width / 2, this.height / 2 - r2 * Math.sin(a))
}
this.ctx.lineWidth = PXSCALE
this.ctx.lineWidth = PXSCALE * 7
this.ctx.strokeStyle = this.colors.fg
this.ctx.stroke()
this.ctx.lineWidth = PXSCALE * 3
this.ctx.strokeStyle = this.colors.pips
this.ctx.stroke()
}
if (!tiny) {
@ -206,6 +211,7 @@ module.exports = class Knob extends _sliders_base {
this.ctx.arc(this.width / 2, this.height / 2, gaugeRadius, min, max)
this.ctx.stroke()
this.ctx.globalAlpha = 0.7
this.ctx.strokeStyle = this.colors.gauge
this.ctx.lineWidth = gaugeWidth - 4.5 * PXSCALE
this.ctx.beginPath()

View file

@ -46,6 +46,8 @@
border-bottom: 1rem solid var(--color-bg);
position: relative;
justify-content: center;
text-transform: none;
font-weight: 500;
&:last-child {
margin-bottom:0;
@ -98,6 +100,9 @@
background: var(--color-fg);
text-align: center;
box-shadow: 0 0 0 1rem var(--color-light) inset;
display: flex;
align-items: center;
justify-content: center;
i {
color: transparent;
}
@ -144,6 +149,7 @@
white-space: nowrap;
border-top:1rem solid var(--color-fg);
resize: none;
font-size: 12rem!important;
}
.error label{
border-right: 1rem solid rgba(red, .75);
@ -173,6 +179,7 @@
}
select {
-webkit-appearance:none;
font-size: 12rem!important;
}
.submit {
margin-top:30rem;
@ -227,6 +234,7 @@
z-index: 999999999;
background: var(--color-raised);
box-shadow: 0 0 4rem 1rem var(--color-bg);
text-transform: none;
.item {
color:var(--color-text)
}

View file

@ -33,7 +33,6 @@
}
a {
text-transform: none;
font-weight: normal;
color: var(--color-accent);
justify-content: center;
}
@ -67,7 +66,6 @@
padding: 10rem;
position: relative;
margin: 0.5rem;
&.disabled {
color:var(--color-text-fade);
}

View file

@ -2,8 +2,8 @@
////////////////////// COLOR SCHEME
--color-text:rgba(255, 255, 255, .8);
--color-text-fade:rgba(255, 255, 255, .5);
--color-text:rgba(255, 255, 255, .6);
--color-text-fade:rgba(255, 255, 255, .4);
--color-accent:rgba(82, 168, 255, 1);
--color-grid: rgba(82, 168, 255, .1);

View file

@ -40,16 +40,23 @@ html{
}
body {
font-size:13rem;
line-height:16rem;
line-height:17rem;
font-family:Droid Sans;
color:var(--color-text);
color: var(--color-text);
white-space:nowrap;
opacity:1;
cursor: default;
}
i {
// font-size: 14rem!important;
font-family: 'Roboto';
font-size:11rem;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 1rem;
// text-transform: uppercase;
// color:var(--color-text-fade);
i {
font-size: 12rem!important;
}
}
@ -63,7 +70,6 @@ i {
overflow: hidden;
cursor: pointer;
box-shadow: 0 0 0 1rem var(--color-light) inset;
&.small {
padding:8rem;
padding-right: 15rem;
@ -124,20 +130,18 @@ i {
overflow: auto;
background: var(--color-fg);
border-top:2rem solid var(--color-bg);
text-transform: none;
font-weight: 500;
}
.header {
padding:24rem 20rem 20rem;
padding:20rem 20rem 18rem;
white-space: nowrap;
text-overflow: ellipsis;
flex-grow: 0;
background-color: var(--color-fg);
color:var(--color-accent);
font-size:16rem;
line-height: 20rem;
text-transform: uppercase;
letter-spacing: 2.5rem;
letter-spacing: 1rem;
font-size: 12rem;
box-shadow: 0 0 0 1rem var(--color-light) inset;
}
@ -262,11 +266,13 @@ i {
#title {
text-transform: uppercase;
letter-spacing: 2rem;
letter-spacing: 1rem;
font-size: 12rem;
}
#version {
opacity: .5;
text-transform: none;
}

View file

@ -21,6 +21,8 @@
padding:1rem;
border: 1rem solid var(--color-bg);
background: var(--color-track);
font-size: 12rem;
input {
height: 100%;
@ -35,6 +37,8 @@
text-align:inherit;
vertical-align: top;
// font-weight: bold;
letter-spacing: 1rem;
}
canvas {
height: 100%;

View file

@ -184,9 +184,10 @@
@extend .toggle-container;
> .toggle .light:after {
content:"\f077";
content:"\f0da";
font-family: FontAwesome;
transform: rotateZ(45deg);
transform: rotateZ(-45deg);
font-size: 20rem;
display: block;
width:10rem;
height:10rem;
@ -199,8 +200,7 @@
position: absolute;;
box-shadow: none;
background: none;
color:var(--color-bg);
text-shadow: 0 0 1rem var(--color-light);
color:var(--color-text-fade);
}
> .label {
top:0;

View file

@ -1,8 +1,5 @@
.push-container {
@extend .toggle-container;
.label {
top:0;
}
.toggle {
&.active {
// background-color: var(--color-fg);

View file

@ -180,6 +180,7 @@
appearance:none;
background: var(--color-raised);
color:inherit;
font-size: 12rem!important;
}
&:after{
content:"\f107";

View file

@ -87,10 +87,15 @@
justify-content: center;
align-items: center;
z-index: 2;
font-family: roboto;
// font-weight: bold;
color:var(--color-text);
// letter-spacing: 1rem;
}
&.on > .label {
color: var(--color-custom)
color: var(--color-custom);
opacity: 1;
}
}