mirror of
https://github.com/0x1d/esp8266-laser.git
synced 2025-12-15 18:38:20 +01:00
more styling
This commit is contained in:
115
data/index.html
115
data/index.html
@@ -1,66 +1,81 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
<title>LaserSpirograph</title>
|
||||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||||
<title>Esp8266 laserspiro controller</title>
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-32x32.png">
|
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-32x32.png">
|
||||||
<link rel="stylesheet" type="text/css" href="styles.css">
|
<link rel="stylesheet" type="text/css" href="styles.css">
|
||||||
<script src="scripts.js"></script>
|
<script src="scripts.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body class="sui">
|
<body class="sui">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<form id="prototypControls" class="spiro-control container">
|
<form id="prototypControls" class="spiro-control container collapsible">
|
||||||
<span class="heading">Laser</span>
|
<span class="heading">Laser</span>
|
||||||
<ul>
|
<div class="content">
|
||||||
<li class="form-row">
|
<ul>
|
||||||
<label>L</label>
|
<li class="form-row">
|
||||||
<input type="range" class="laser slider" value="1" min="1" max="128">
|
<label>L</label>
|
||||||
</li>
|
<input type="range" class="laser slider" value="1" min="1" max="128">
|
||||||
<li class="form-row">
|
</li>
|
||||||
<label>M1</label>
|
<li class="form-row">
|
||||||
<input type="range" class="motor slider" value="1" min="1" max="128" data-motor-nr="1">
|
<label>M1</label>
|
||||||
</li>
|
<input type="range" class="motor slider" value="1" min="1" max="128" data-motor-nr="1">
|
||||||
<li class="form-row">
|
</li>
|
||||||
<label>M2</label>
|
<li class="form-row">
|
||||||
<input type="range" class="motor slider" value="1" min="1" max="128" data-motor-nr="2">
|
<label>M2</label>
|
||||||
</li>
|
<input type="range" class="motor slider" value="1" min="1" max="128" data-motor-nr="2">
|
||||||
<li class="form-row">
|
</li>
|
||||||
<label>M3</label>
|
<li class="form-row">
|
||||||
<input type="range" class="motor slider" value="1" min="1" max="128" data-motor-nr="3">
|
<label>M3</label>
|
||||||
</li>
|
<input type="range" class="motor slider" value="1" min="1" max="128" data-motor-nr="3">
|
||||||
</ul>
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<div class="settings container">
|
<div id="prototypControls" class="container collapsible">
|
||||||
|
<span class="heading">Makros</span>
|
||||||
|
<div class="content">
|
||||||
|
<button>Submit</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="settings container collapsible">
|
||||||
<span class="heading">WiFi Settings</span>
|
<span class="heading">WiFi Settings</span>
|
||||||
<div class="content"></class>
|
<div class="content">
|
||||||
<form>
|
<form>
|
||||||
<li class="form-row">
|
<li class="form-row">
|
||||||
<label for="ap">AP Mode</label>
|
<label for="ap">AP Mode</label>
|
||||||
<span class="toggle"><input type="checkbox" name="ap"></span>
|
<span class="toggle"><input type="checkbox" name="ap"></span>
|
||||||
</li>
|
</li>
|
||||||
<li class="form-row">
|
<li class="form-row">
|
||||||
<label for="ssid">SSID</label>
|
<label for="ssid">SSID</label>
|
||||||
<input type="text" name="ssid" placeholder="Default AP: LaserSpiro">
|
<input type="text" name="ssid" placeholder="Default AP: LaserSpiro">
|
||||||
</li>
|
</li>
|
||||||
<li class="form-row">
|
<li class="form-row">
|
||||||
<label for="password">Password</label>
|
<label for="password">PW</label>
|
||||||
<input type="password" name="password" placeholder="Default: th3r31sn0sp00n">
|
<input type="password" name="password" placeholder="Default: th3r31sn0sp00n">
|
||||||
</li>
|
</li>
|
||||||
<li class="form-row">
|
<li class="form-row">
|
||||||
<button type="submit">Submit</button>
|
<button type="submit">Submit</button>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="prototypControls" class="container collapsible">
|
||||||
|
<span class="heading">Debug</span>
|
||||||
|
<div class="content">
|
||||||
|
<span>Free Heap</span>
|
||||||
|
<br>
|
||||||
|
<text class="sectionDesc">last uri:</text>
|
||||||
|
<div id="uriDiv"></div>
|
||||||
|
<text class="sectionDesc">last respone:</text>
|
||||||
|
<br>
|
||||||
|
<div id="response">
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="prototypControls" class="container">
|
|
||||||
<text class="sectionDesc">last uri:</text>
|
|
||||||
<div id="uriDiv"></div>
|
|
||||||
<text class="sectionDesc">last respone:</text>
|
|
||||||
<br>
|
|
||||||
<div id="response">
|
|
||||||
</div>
|
|
||||||
<br>
|
|
||||||
</div>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -165,6 +165,12 @@ var $ = function(selector){
|
|||||||
let debugResponse = (data) => {
|
let debugResponse = (data) => {
|
||||||
$('#response').html(data);
|
$('#response').html(data);
|
||||||
};
|
};
|
||||||
|
Sui.select('.collapsible').forEach((container) => {
|
||||||
|
container.querySelector('.heading').addEventListener('click', (item) => {
|
||||||
|
console.log(container);
|
||||||
|
container.classList.toggle('open');
|
||||||
|
});
|
||||||
|
});
|
||||||
[{
|
[{
|
||||||
api: 'MOTOR',
|
api: 'MOTOR',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
form .form-row {
|
form .form-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
|
flex-wrap: wrap;
|
||||||
padding: .2em;
|
padding: .2em;
|
||||||
}
|
}
|
||||||
form .form-row > label {
|
form .form-row > label {
|
||||||
@@ -13,10 +14,6 @@ form .form-row > input {
|
|||||||
form .form-row > span {
|
form .form-row > span {
|
||||||
flex: 2;
|
flex: 2;
|
||||||
}
|
}
|
||||||
form .form-row > input,
|
|
||||||
form .form-row > button {
|
|
||||||
padding: .5em;
|
|
||||||
}
|
|
||||||
form .form-row input[type="checkbox"] {
|
form .form-row input[type="checkbox"] {
|
||||||
margin-top: 12px;
|
margin-top: 12px;
|
||||||
}
|
}
|
||||||
@@ -41,26 +38,28 @@ form .form-row input[type="checkbox"] {
|
|||||||
.sui {
|
.sui {
|
||||||
background: #000000;
|
background: #000000;
|
||||||
color: #0eb8c0;
|
color: #0eb8c0;
|
||||||
|
}
|
||||||
|
.sui * {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
.sui ul {
|
.sui .hidden {
|
||||||
padding: 0;
|
display: none;
|
||||||
}
|
}
|
||||||
.sui ul li {
|
.sui .shown {
|
||||||
margin: 0 0 0 0;
|
display: block;
|
||||||
}
|
}
|
||||||
.sui p {
|
.sui input,
|
||||||
padding: 0;
|
.sui button {
|
||||||
margin: 0;
|
padding: .5em;
|
||||||
}
|
}
|
||||||
.sui > .content {
|
.sui > .content {
|
||||||
padding: 32px;
|
padding: 16px;
|
||||||
}
|
}
|
||||||
.sui > .content .heading {
|
.sui > .content .heading {
|
||||||
font-size: 1.2em;
|
font-size: 1.2em;
|
||||||
margin-bottom: 16px;
|
|
||||||
display: block;
|
display: block;
|
||||||
|
margin-bottom: 16px;
|
||||||
}
|
}
|
||||||
.sui > .content .container {
|
.sui > .content .container {
|
||||||
background: #333333;
|
background: #333333;
|
||||||
@@ -69,26 +68,41 @@ form .form-row input[type="checkbox"] {
|
|||||||
border: solid 1px #555555;
|
border: solid 1px #555555;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
.sui > .content input[type="text"] {
|
.sui > .content .container.collapsible > .heading {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
.sui > .content .container.collapsible > .heading:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.sui > .content .container.collapsible .content {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.sui > .content .container.collapsible.open > .heading {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
}
|
||||||
|
.sui > .content .container.collapsible.open .content {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.sui > .content input[type="text"],
|
||||||
|
.sui > .content input[type="password"] {
|
||||||
height: 16px;
|
height: 16px;
|
||||||
|
background: transparent;
|
||||||
|
border: none;
|
||||||
|
color: #eeeeee;
|
||||||
|
}
|
||||||
|
.sui > .content input[type="text"]:focus,
|
||||||
|
.sui > .content input[type="password"]:focus,
|
||||||
|
.sui > .content input[type="text"]:hover,
|
||||||
|
.sui > .content input[type="password"]:hover {
|
||||||
|
outline: none;
|
||||||
|
border-bottom: solid 1px #097479;
|
||||||
|
box-shadow: 3px #097479;
|
||||||
}
|
}
|
||||||
.sui > .content input[type="checkbox"] {
|
.sui > .content input[type="checkbox"] {
|
||||||
transform: scale(2);
|
transform: scale(2);
|
||||||
}
|
}
|
||||||
.sui > .content .form-row > button {
|
.sui > .content button {
|
||||||
background: #097479;
|
background: #097479;
|
||||||
color: white;
|
color: white;
|
||||||
border: 0;
|
border: 0;
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
.spiro-control {
|
|
||||||
label {
|
|
||||||
width: 10%;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
input[type="range"] {
|
|
||||||
width: 80%;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|||||||
@@ -1,66 +1,81 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
<title>LaserSpirograph</title>
|
||||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||||
<title>Esp8266 laserspiro controller</title>
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-32x32.png">
|
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-32x32.png">
|
||||||
<link rel="stylesheet" type="text/css" href="styles.css">
|
<link rel="stylesheet" type="text/css" href="styles.css">
|
||||||
<script src="scripts.js"></script>
|
<script src="scripts.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body class="sui">
|
<body class="sui">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<form id="prototypControls" class="spiro-control container">
|
<form id="prototypControls" class="spiro-control container collapsible">
|
||||||
<span class="heading">Laser</span>
|
<span class="heading">Laser</span>
|
||||||
<ul>
|
<div class="content">
|
||||||
<li class="form-row">
|
<ul>
|
||||||
<label>L</label>
|
<li class="form-row">
|
||||||
<input type="range" class="laser slider" value="1" min="1" max="128">
|
<label>L</label>
|
||||||
</li>
|
<input type="range" class="laser slider" value="1" min="1" max="128">
|
||||||
<li class="form-row">
|
</li>
|
||||||
<label>M1</label>
|
<li class="form-row">
|
||||||
<input type="range" class="motor slider" value="1" min="1" max="128" data-motor-nr="1">
|
<label>M1</label>
|
||||||
</li>
|
<input type="range" class="motor slider" value="1" min="1" max="128" data-motor-nr="1">
|
||||||
<li class="form-row">
|
</li>
|
||||||
<label>M2</label>
|
<li class="form-row">
|
||||||
<input type="range" class="motor slider" value="1" min="1" max="128" data-motor-nr="2">
|
<label>M2</label>
|
||||||
</li>
|
<input type="range" class="motor slider" value="1" min="1" max="128" data-motor-nr="2">
|
||||||
<li class="form-row">
|
</li>
|
||||||
<label>M3</label>
|
<li class="form-row">
|
||||||
<input type="range" class="motor slider" value="1" min="1" max="128" data-motor-nr="3">
|
<label>M3</label>
|
||||||
</li>
|
<input type="range" class="motor slider" value="1" min="1" max="128" data-motor-nr="3">
|
||||||
</ul>
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<div class="settings container">
|
<div id="prototypControls" class="container collapsible">
|
||||||
|
<span class="heading">Makros</span>
|
||||||
|
<div class="content">
|
||||||
|
<button>Submit</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="settings container collapsible">
|
||||||
<span class="heading">WiFi Settings</span>
|
<span class="heading">WiFi Settings</span>
|
||||||
<div class="content"></class>
|
<div class="content">
|
||||||
<form>
|
<form>
|
||||||
<li class="form-row">
|
<li class="form-row">
|
||||||
<label for="ap">AP Mode</label>
|
<label for="ap">AP Mode</label>
|
||||||
<span class="toggle"><input type="checkbox" name="ap"></span>
|
<span class="toggle"><input type="checkbox" name="ap"></span>
|
||||||
</li>
|
</li>
|
||||||
<li class="form-row">
|
<li class="form-row">
|
||||||
<label for="ssid">SSID</label>
|
<label for="ssid">SSID</label>
|
||||||
<input type="text" name="ssid" placeholder="Default AP: LaserSpiro">
|
<input type="text" name="ssid" placeholder="Default AP: LaserSpiro">
|
||||||
</li>
|
</li>
|
||||||
<li class="form-row">
|
<li class="form-row">
|
||||||
<label for="password">Password</label>
|
<label for="password">PW</label>
|
||||||
<input type="password" name="password" placeholder="Default: th3r31sn0sp00n">
|
<input type="password" name="password" placeholder="Default: th3r31sn0sp00n">
|
||||||
</li>
|
</li>
|
||||||
<li class="form-row">
|
<li class="form-row">
|
||||||
<button type="submit">Submit</button>
|
<button type="submit">Submit</button>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="prototypControls" class="container collapsible">
|
||||||
|
<span class="heading">Debug</span>
|
||||||
|
<div class="content">
|
||||||
|
<span>Free Heap</span>
|
||||||
|
<br>
|
||||||
|
<text class="sectionDesc">last uri:</text>
|
||||||
|
<div id="uriDiv"></div>
|
||||||
|
<text class="sectionDesc">last respone:</text>
|
||||||
|
<br>
|
||||||
|
<div id="response">
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="prototypControls" class="container">
|
|
||||||
<text class="sectionDesc">last uri:</text>
|
|
||||||
<div id="uriDiv"></div>
|
|
||||||
<text class="sectionDesc">last respone:</text>
|
|
||||||
<br>
|
|
||||||
<div id="response">
|
|
||||||
</div>
|
|
||||||
<br>
|
|
||||||
</div>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -2,6 +2,12 @@ Sui.ready(() => {
|
|||||||
let debugResponse = (data) => {
|
let debugResponse = (data) => {
|
||||||
$('#response').html(data);
|
$('#response').html(data);
|
||||||
};
|
};
|
||||||
|
Sui.select('.collapsible').forEach((container) => {
|
||||||
|
container.querySelector('.heading').addEventListener('click', (item) => {
|
||||||
|
console.log(container);
|
||||||
|
container.classList.toggle('open');
|
||||||
|
});
|
||||||
|
});
|
||||||
[{
|
[{
|
||||||
api: 'MOTOR',
|
api: 'MOTOR',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ form {
|
|||||||
.form-row {
|
.form-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
|
flex-wrap: wrap;
|
||||||
padding: .2em;
|
padding: .2em;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -16,10 +17,6 @@ form {
|
|||||||
.form-row > span {
|
.form-row > span {
|
||||||
flex: 2;
|
flex: 2;
|
||||||
}
|
}
|
||||||
.form-row > input,
|
|
||||||
.form-row > button {
|
|
||||||
padding: .5em;
|
|
||||||
}
|
|
||||||
.form-row input[type="checkbox"] {
|
.form-row input[type="checkbox"] {
|
||||||
margin-top: 12px;
|
margin-top: 12px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,27 +19,29 @@
|
|||||||
background: @color-black;
|
background: @color-black;
|
||||||
color: @color-main-light;
|
color: @color-main-light;
|
||||||
|
|
||||||
margin: 0;
|
* {
|
||||||
padding: 0;
|
margin: 0;
|
||||||
|
|
||||||
ul {
|
|
||||||
padding: 0;
|
padding: 0;
|
||||||
li {
|
|
||||||
margin: 0 0 0 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
p {
|
.hidden {
|
||||||
padding: 0;
|
display: none;
|
||||||
margin: 0;
|
}
|
||||||
|
.shown {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
input,
|
||||||
|
button {
|
||||||
|
padding: .5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
> .content {
|
> .content {
|
||||||
padding: @default-padding * 2;
|
padding: @default-padding;
|
||||||
.heading {
|
.heading {
|
||||||
font-size: 1.2em;
|
font-size: 1.2em;
|
||||||
margin-bottom: @default-margin;
|
|
||||||
display: block;
|
display: block;
|
||||||
|
margin-bottom: @default-margin;
|
||||||
}
|
}
|
||||||
.container {
|
.container {
|
||||||
background: @color-container;
|
background: @color-container;
|
||||||
@@ -47,38 +49,45 @@
|
|||||||
border-radius: @default-border-radius;
|
border-radius: @default-border-radius;
|
||||||
border: solid 1px @default-border-color;
|
border: solid 1px @default-border-color;
|
||||||
margin-bottom: @default-margin-small;
|
margin-bottom: @default-margin-small;
|
||||||
|
&.collapsible {
|
||||||
|
> .heading {
|
||||||
|
margin-bottom: 0;
|
||||||
|
&:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.content {
|
||||||
|
.hidden;
|
||||||
|
}
|
||||||
|
&.open {
|
||||||
|
> .heading {
|
||||||
|
margin-bottom: @default-margin;
|
||||||
|
}
|
||||||
|
.content {
|
||||||
|
.shown;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
input[type="text"] {
|
input[type="text"], input[type="password"] {
|
||||||
height: @input-text-height;
|
height: @input-text-height;
|
||||||
|
background: transparent;
|
||||||
|
border: none;
|
||||||
|
color: @color-white;
|
||||||
|
&:focus, &:hover {
|
||||||
|
outline: none;
|
||||||
|
border-bottom: solid 1px @color-main;
|
||||||
|
box-shadow: 3px @color-main;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
input[type="checkbox"] {
|
input[type="checkbox"] {
|
||||||
transform: scale(@input-checkbox-scale);
|
transform: scale(@input-checkbox-scale);
|
||||||
}
|
}
|
||||||
.form-row > button {
|
button {
|
||||||
background: @color-main;
|
background: @color-main;
|
||||||
color: white;
|
color: white;
|
||||||
border: 0;
|
border: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
.sidebar {
|
|
||||||
.item {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.settings {
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
.spiro-control {
|
|
||||||
label {
|
|
||||||
width: 10%;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
input[type="range"] {
|
|
||||||
width: 80%;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
Reference in New Issue
Block a user