1
0
mirror of https://github.com/s00500/ESPUI.git synced 2024-11-21 22:50:55 +00:00

#47 Adding Dark Color, correcting wrong numbering for colors

This commit is contained in:
Lukas Bachschwell 2019-02-26 12:08:37 +01:00
parent b21c5d3b2c
commit 4f421c84d5
7 changed files with 749 additions and 682 deletions

View File

@ -5,7 +5,8 @@
box-sizing: border-box;
}
.column, .columns {
.column,
.columns {
width: 100%;
float: left;
}
@ -22,7 +23,7 @@
}
.card-slider {
padding-bottom: 10px
padding-bottom: 10px;
}
.turquoise {
@ -47,7 +48,7 @@
.sunflower {
background: #f1c40f;
border-bottom: #E6BB0F 3px solid;
border-bottom: #e6bb0f 3px solid;
}
.carrot {
@ -60,6 +61,11 @@
border-bottom: #c0392b 3px solid;
}
.dark {
background: #444857;
border-bottom: #444857 3px solid;
}
.label {
box-sizing: border-box;
white-space: nowrap;
@ -123,13 +129,16 @@
.container {
width: 98%;
}
.column, .columns {
.column,
.columns {
margin-right: 2%;
}
.column:first-child, .columns:first-child {
.column:first-child,
.columns:first-child {
margin-left: 0;
}
.one.column, .one.columns {
.one.column,
.one.columns {
width: 4.66666666667%;
}
.two.columns {
@ -154,7 +163,7 @@
width: 65.3333333333%;
}
.nine.columns {
width: 74.0%;
width: 74%;
}
.ten.columns {
width: 82.6666666667%;
@ -176,46 +185,60 @@
width: 48%;
}
/* Offsets */
.offset-by-one.column, .offset-by-one.columns {
.offset-by-one.column,
.offset-by-one.columns {
margin-left: 8.66666666667%;
}
.offset-by-two.column, .offset-by-two.columns {
.offset-by-two.column,
.offset-by-two.columns {
margin-left: 17.3333333333%;
}
.offset-by-three.column, .offset-by-three.columns {
.offset-by-three.column,
.offset-by-three.columns {
margin-left: 26%;
}
.offset-by-four.column, .offset-by-four.columns {
.offset-by-four.column,
.offset-by-four.columns {
margin-left: 34.6666666667%;
}
.offset-by-five.column, .offset-by-five.columns {
.offset-by-five.column,
.offset-by-five.columns {
margin-left: 43.3333333333%;
}
.offset-by-six.column, .offset-by-six.columns {
.offset-by-six.column,
.offset-by-six.columns {
margin-left: 52%;
}
.offset-by-seven.column, .offset-by-seven.columns {
.offset-by-seven.column,
.offset-by-seven.columns {
margin-left: 60.6666666667%;
}
.offset-by-eight.column, .offset-by-eight.columns {
.offset-by-eight.column,
.offset-by-eight.columns {
margin-left: 69.3333333333%;
}
.offset-by-nine.column, .offset-by-nine.columns {
margin-left: 78.0%;
.offset-by-nine.column,
.offset-by-nine.columns {
margin-left: 78%;
}
.offset-by-ten.column, .offset-by-ten.columns {
.offset-by-ten.column,
.offset-by-ten.columns {
margin-left: 86.6666666667%;
}
.offset-by-eleven.column, .offset-by-eleven.columns {
.offset-by-eleven.column,
.offset-by-eleven.columns {
margin-left: 95.3333333333%;
}
.offset-by-one-third.column, .offset-by-one-third.columns {
.offset-by-one-third.column,
.offset-by-one-third.columns {
margin-left: 34.6666666667%;
}
.offset-by-two-thirds.column, .offset-by-two-thirds.columns {
.offset-by-two-thirds.column,
.offset-by-two-thirds.columns {
margin-left: 69.3333333333%;
}
.offset-by-one-half.column, .offset-by-one-half.columns {
.offset-by-one-half.column,
.offset-by-one-half.columns {
margin-left: 52%;
}
}
@ -230,9 +253,9 @@
body {
margin: 0;
font-size: 1.5em;
line-height: 1.0;
line-height: 1;
font-weight: 400;
font-family: 'Open Sans', sans-serif;
font-family: "Open Sans", sans-serif;
color: #222;
background-color: #ecf0f1;
}
@ -240,40 +263,45 @@
/* Typography
*/
h1, h2, h3, h4, h5, h6 {
h1,
h2,
h3,
h4,
h5,
h6 {
margin-top: 0;
margin-bottom: 0.5rem;
font-weight: 300;
}
h1 {
font-size: 4.0rem;
font-size: 4rem;
line-height: 1.2;
letter-spacing: -.1rem;
letter-spacing: -0.1rem;
}
h2 {
font-size: 3.6rem;
line-height: 1.25;
letter-spacing: -.1rem;
letter-spacing: -0.1rem;
}
h3 {
font-size: 3.0rem;
font-size: 3rem;
line-height: 1.3;
letter-spacing: -.1rem;
letter-spacing: -0.1rem;
}
h4 {
font-size: 2.4rem;
line-height: 1.35;
letter-spacing: -.08rem;
letter-spacing: -0.08rem;
}
h5 {
font-size: 1.8rem;
line-height: 1.5;
letter-spacing: -.05rem;
letter-spacing: -0.05rem;
}
h6 {
@ -286,7 +314,7 @@
@media (min-width: 630px) {
h1 {
font-size: 5.0rem;
font-size: 5rem;
}
h2 {
font-size: 4.2rem;
@ -295,10 +323,10 @@
font-size: 3.6rem;
}
h4 {
font-size: 3.0rem;
font-size: 3rem;
}
h5 {
font-size: 2.0rem;
font-size: 2rem;
}
h6 {
font-size: 1.5rem;
@ -313,11 +341,11 @@
*/
a {
color: #1EAEDB;
color: #1eaedb;
}
a:hover {
color: #0FA0CE;
color: #0fa0ce;
}
/* Buttons
@ -346,7 +374,8 @@
/* Spacing
*/
button, .button {
button,
.button {
margin-bottom: 1rem;
}
@ -382,7 +411,7 @@
margin-top: 0.5rem;
margin-bottom: 1.2rem;
border-width: 0;
border-top: 1px solid #E1E1E1;
border-top: 1px solid #e1e1e1;
}
/* Clearing
@ -390,7 +419,9 @@
/* Self Clearing Goodness */
.container:after, .row:after, .u-cf {
.container:after,
.row:after,
.u-cf {
content: "";
display: table;
clear: both;
@ -401,9 +432,15 @@
.control {
background-color: #ddd;
background-image: linear-gradient(hsla(0, 0%, 0%, .1), hsla(0, 0%, 100%, .1));
background-image: linear-gradient(
hsla(0, 0%, 0%, 0.1),
hsla(0, 0%, 100%, 0.1)
);
border-radius: 50%;
box-shadow: inset 0 1px 1px 1px hsla(0, 0%, 100%, .5), 0 0 1px 1px hsla(0, 0%, 100%, .75), 0 0 1px 2px hsla(0, 0%, 100%, .25), 0 0 1px 3px hsla(0, 0%, 100%, .25), 0 0 1px 4px hsla(0, 0%, 100%, .25), 0 0 1px 6px hsla(0, 0%, 0%, .75);
box-shadow: inset 0 1px 1px 1px hsla(0, 0%, 100%, 0.5),
0 0 1px 1px hsla(0, 0%, 100%, 0.75), 0 0 1px 2px hsla(0, 0%, 100%, 0.25),
0 0 1px 3px hsla(0, 0%, 100%, 0.25), 0 0 1px 4px hsla(0, 0%, 100%, 0.25),
0 0 1px 6px hsla(0, 0%, 0%, 0.75);
height: 9em;
margin: 3em auto;
position: relative;
@ -418,7 +455,8 @@
.control li {
border-radius: 100% 0 0 0;
box-shadow: inset -1px -1px 1px hsla(0, 0%, 100%, .5), 0 0 1px hsla(0, 0%, 0%, .75);
box-shadow: inset -1px -1px 1px hsla(0, 0%, 100%, 0.5),
0 0 1px hsla(0, 0%, 0%, 0.75);
display: inline-block;
height: 50%;
overflow: hidden;
@ -444,8 +482,9 @@
width: 200%;
}
.control a:hover, .control a:focus {
background-color: hsla(0, 0%, 100%, .25);
.control a:hover,
.control a:focus {
background-color: hsla(0, 0%, 100%, 0.25);
}
.control a {
@ -455,14 +494,20 @@
font: bold 1em/3 sans-serif;
text-align: center;
text-decoration: none;
text-shadow: 0 1px 1px hsla(0, 0%, 100%, .4);
transition: .15s;
text-shadow: 0 1px 1px hsla(0, 0%, 100%, 0.4);
transition: 0.15s;
}
.control .confirm {
background-color: #ddd;
background-image: linear-gradient(hsla(0, 0%, 0%, .15), hsla(0, 0%, 100%, .25));
box-shadow: inset 0 1px 1px 1px hsla(0, 0%, 100%, .5), 0 0 1px 1px hsla(0, 0%, 100%, .25), 0 0 1px 2px hsla(0, 0%, 100%, .25), 0 0 1px 3px hsla(0, 0%, 100%, .25), 0 0 1px 4px hsla(0, 0%, 100%, .25), 0 0 1px 6px hsla(0, 0%, 0%, .85);
background-image: linear-gradient(
hsla(0, 0%, 0%, 0.15),
hsla(0, 0%, 100%, 0.25)
);
box-shadow: inset 0 1px 1px 1px hsla(0, 0%, 100%, 0.5),
0 0 1px 1px hsla(0, 0%, 100%, 0.25), 0 0 1px 2px hsla(0, 0%, 100%, 0.25),
0 0 1px 3px hsla(0, 0%, 100%, 0.25), 0 0 1px 4px hsla(0, 0%, 100%, 0.25),
0 0 1px 6px hsla(0, 0%, 0%, 0.85);
left: 50%;
line-height: 3;
margin: -1.5em;
@ -471,7 +516,8 @@
width: 3em;
}
.control .confirm:hover, .control .confirm:focus {
.control .confirm:hover,
.control .confirm:focus {
background-color: #eee;
}
@ -530,7 +576,13 @@
.switch .in:before {
background: #fff;
background: -moz-linear-gradient(top, #fff 0%, #f0f0f0 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fff), color-stop(100%, #f0f0f0));
background: -webkit-gradient(
linear,
left top,
left bottom,
color-stop(0%, #fff),
color-stop(100%, #f0f0f0)
);
background: -webkit-linear-gradient(top, #fff 0%, #f0f0f0 100%);
background: -o-linear-gradient(top, #fff 0%, #f0f0f0 100%);
background: -ms-linear-gradient(top, #fff 0%, #f0f0f0 100%);
@ -538,7 +590,7 @@
border: 1px solid #fff;
border-radius: 2px;
box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
content: '';
content: "";
height: 18px;
position: absolute;
top: -5px;
@ -549,13 +601,19 @@
.switch .in:after {
background: #f0f0f0;
background: -moz-linear-gradient(top, #f0f0f0 0%, #fff 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #f0f0f0), color-stop(100%, #fff));
background: -webkit-gradient(
linear,
left top,
left bottom,
color-stop(0%, #f0f0f0),
color-stop(100%, #fff)
);
background: -webkit-linear-gradient(top, #f0f0f0 0%, #fff 100%);
background: -o-linear-gradient(top, #f0f0f0 0%, #fff 100%);
background: -ms-linear-gradient(top, #f0f0f0 0%, #fff 100%);
background: linear-gradient(to bottom, #f0f0f0 0%, #fff 100%);
border-radius: 10px;
content: '';
content: "";
height: 12px;
margin: -1px 0 0 -1px;
position: absolute;
@ -569,7 +627,7 @@
display: block;
position: relative;
font-size: 16px;
font-family: 'Roboto', sans-serif;
font-family: "Roboto", sans-serif;
}
.rkmd-slider input[type="range"] {
overflow: hidden;
@ -609,7 +667,7 @@
height: 15px;
margin-left: -8px;
border-radius: 50%;
transition: all .2s ease;
transition: all 0.2s ease;
user-select: none;
z-index: 2;
}
@ -627,7 +685,11 @@
background-color: #b0b0b0 !important;
}
.rkmd-slider input[type="range"]:disabled + .slider .slider-fill .slider-label,
.rkmd-slider input[type="range"]:disabled + .slider .slider-handle .slider-label {
.rkmd-slider
input[type="range"]:disabled
+ .slider
.slider-handle
.slider-label {
display: none;
background-color: #b0b0b0 !important;
}
@ -638,8 +700,16 @@
height: 15px;
margin-left: -8px;
}
.rkmd-slider input[type="range"]:disabled + .slider .slider-fill.is-active .slider-label,
.rkmd-slider input[type="range"]:disabled + .slider .slider-handle.is-active .slider-label {
.rkmd-slider
input[type="range"]:disabled
+ .slider
.slider-fill.is-active
.slider-label,
.rkmd-slider
input[type="range"]:disabled
+ .slider
.slider-handle.is-active
.slider-label {
display: none;
border-radius: 50%;
transform: none;
@ -666,10 +736,10 @@
-webkit-transform-origin: 50% 100%;
transform-origin: 50% 100%;
border-radius: 50%;
-webkit-transform: scale(1.0) rotate(-45deg);
transform: scale(1.0) rotate(-45deg);
-webkit-transition: all .2s ease;
transition: all .2s ease;
-webkit-transform: scale(1) rotate(-45deg);
transform: scale(1) rotate(-45deg);
-webkit-transition: all 0.2s ease;
transition: all 0.2s ease;
}
@media (pointer: fine) {
.rkmd-slider.slider-discrete .slider .slider-handle .slider-label {
@ -713,12 +783,14 @@
-webkit-transform: rotate(-45deg) translate(23px, -25px);
transform: rotate(-45deg) translate(23px, -25px);
}
.rkmd-slider.slider-discrete .slider .slider-handle.is-active .slider-label span {
.rkmd-slider.slider-discrete
.slider
.slider-handle.is-active
.slider-label
span {
opacity: 1;
}
.rkmd-slider.slider-discrete.slider-turquoise .slider-label {
background-color: #16a085;
}
@ -747,11 +819,11 @@
.sunflower {
background: #f1c40f;
border-bottom: #E6BB0F 3px solid;
border-bottom: #e6bb0f 3px solid;
}
.rkmd-slider.slider-discrete.slider-sunflower .slider-label {
background-color: #E6BB0F;
background-color: #e6bb0f;
}
.carrot {
@ -772,7 +844,6 @@
background-color: #c0392b;
}
/*
.rkmd-slider.slider-light input[type="range"] + .slider {
background-color: #5c5c5c;

File diff suppressed because one or more lines are too long

View File

@ -40,41 +40,36 @@ const C_SUNFLOWER = 4;
const C_CARROT = 5;
const C_ALIZARIN = 6;
const C_NONE = 7;
const C_DARK = 8;
function colorClass(colorId) {
colorId = Number(colorId);
switch (colorId) {
case C_TURQUOISE:
return "turquoise";
break;
case C_EMERALD:
return "emerald";
break;
case C_PETERRIVER:
return "peterriver";
break;
case C_WETASPHALT:
return "wetasphalt";
break;
case C_SUNFLOWER:
return "sunflower";
break;
case C_CARROT:
return "carrot";
break;
case C_ALIZARIN:
return "alizarin";
break;
case C_NONE:
return "";
break;
case C_DARK:
return "dark";
default:
return "";

View File

@ -1,4 +1,4 @@
const UI_INITIAL_GUI=100;const UI_TITEL=0;const UI_LABEL=1;const UPDATE_LABEL=6;const UI_BUTTON=2;const UI_SWITCHER=3;const UPDATE_SWITCHER=7;const UI_PAD=4;const UI_CPAD=5;const UI_SLIDER=8;const UPDATE_SLIDER=9;const UI_NUMBER=10;const UPDATE_NUMBER=11;const UI_TEXT_INPUT=12;const UPDATE_TEXT_INPUT=13;const UI_GRAPH=14;const CLEAR_GRAPH=15;const ADD_GRAPH_POINT=16;const FOR=0;const BACK=1;const LEFT=2;const RIGHT=3;const CENTER=4;const C_TURQUOISE=0;const C_EMERALD=1;const C_PETERRIVER=2;const C_WETASPHALT=3;const C_SUNFLOWER=4;const C_CARROT=5;const C_ALIZARIN=6;const C_NONE=7;function colorClass(colorId){colorId=Number(colorId);switch(colorId){case C_TURQUOISE:return"turquoise";break;case C_EMERALD:return"emerald";break;case C_PETERRIVER:return"peterriver";break;case C_WETASPHALT:return"wetasphalt";break;case C_SUNFLOWER:return"sunflower";break;case C_CARROT:return"carrot";break;case C_ALIZARIN:return"alizarin";break;case C_NONE:return"";break;default:return"";}}
const UI_INITIAL_GUI=100;const UI_TITEL=0;const UI_LABEL=1;const UPDATE_LABEL=6;const UI_BUTTON=2;const UI_SWITCHER=3;const UPDATE_SWITCHER=7;const UI_PAD=4;const UI_CPAD=5;const UI_SLIDER=8;const UPDATE_SLIDER=9;const UI_NUMBER=10;const UPDATE_NUMBER=11;const UI_TEXT_INPUT=12;const UPDATE_TEXT_INPUT=13;const UI_GRAPH=14;const CLEAR_GRAPH=15;const ADD_GRAPH_POINT=16;const FOR=0;const BACK=1;const LEFT=2;const RIGHT=3;const CENTER=4;const C_TURQUOISE=0;const C_EMERALD=1;const C_PETERRIVER=2;const C_WETASPHALT=3;const C_SUNFLOWER=4;const C_CARROT=5;const C_ALIZARIN=6;const C_NONE=7;const C_DARK=8;function colorClass(colorId){colorId=Number(colorId);switch(colorId){case C_TURQUOISE:return"turquoise";case C_EMERALD:return"emerald";case C_PETERRIVER:return"peterriver";case C_WETASPHALT:return"wetasphalt";case C_SUNFLOWER:return"sunflower";case C_CARROT:return"carrot";case C_ALIZARIN:return"alizarin";case C_NONE:return"";case C_DARK:return"dark";default:return"";}}
var websock;var websockConnected=false;function restart(){$(document).add("*").off();$("#row").html("");websock.close();start();}
function conStatusError(){websockConnected=false;$("#conStatus").removeClass("color-green");$("#conStatus").addClass("color-red");$("#conStatus").html("Error / No Connection ↻");$("#conStatus").off();$("#conStatus").on({click:restart});}
function handleVisibilityChange(){if(!websockConnected&&!document.hidden){restart();}}

View File

@ -98,7 +98,8 @@ typedef struct Control {
#define COLOR_SUNFLOWER 4
#define COLOR_CARROT 5
#define COLOR_ALIZARIN 6
#define COLOR_NONE 6
#define COLOR_NONE 7
#define COLOR_DARK 8
class ESPUIClass {
public:

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long