CSS updated, webinterface is a bit cleaner now. Added a reset button to the tc editor.

This commit is contained in:
Kai Lauterbach 2023-05-22 12:12:22 +02:00
parent dc3204dc17
commit 69ebdda269
5 changed files with 72 additions and 27 deletions

View file

@ -19,6 +19,7 @@
</tr> </tr>
</table> </table>
<a href="#" id="save-button" class="pure-button pure-button-primary" onclick="sendDataToServer();">save</a> <a href="#" id="save-button" class="pure-button pure-button-primary" onclick="sendDataToServer();">save</a>
<a href="#" id="save-button" class="pure-button pure-button-primary" onclick="fillTableFromJson();">reset</a>
</div> </div>
</div> <!-- end of tab-tde --> </div> <!-- end of tab-tde -->
<script src="http://{{IP_ADDRESS}}/js_bottom"> <script src="http://{{IP_ADDRESS}}/js_bottom">

View file

@ -1,27 +1,40 @@
#tab-lights, #tab-config, #tab-tde { /* Vereinheitlichter Look */
body {
font-family: Arial, sans-serif;
}
/* Gemeinsame Regeln für die Tabs */
#tab-lights,
#tab-config,
#tab-tde {
display: none; display: none;
background-color: #ffffff; background-color: #ffffff;
color: black; color: black;
font-weight: bold; font-weight: bold;
padding: 10px;
border-radius: 3px;
} }
#tab-lights.visible {
display: block; /* Sichtbarkeitsregeln für die Tabs */
} #tab-lights.visible,
#tab-config.visible { #tab-config.visible,
display: block;
}
#tab-tde.visible { #tab-tde.visible {
display: block; display: block;
} }
/* Gemeinsame Regeln für Tabellenzellen */
.pure-table td { .pure-table td {
padding: 4px; padding: 4px;
} }
/* Stil für Formularelemente */
.pure-form input[type="number"] { .pure-form input[type="number"] {
width: 60px; width: 60px;
height: 20px; height: 20px;
border-radius: 3px; border-radius: 3px;
border: 1px solid #ccc; border: 1px solid #ccc;
} }
.pure-form select { .pure-form select {
width: 80px; width: 80px;
height: 26px; height: 26px;
@ -29,6 +42,8 @@ border-radius: 3px;
border: 1px solid #ccc; border: 1px solid #ccc;
background-color: #fff; background-color: #fff;
} }
/* Stil für Buttons */
.pure-button { .pure-button {
background-color: #5a5a5a; background-color: #5a5a5a;
color: #fff; color: #fff;
@ -38,12 +53,12 @@ padding: 8px 12px;
font-size: 14px; font-size: 14px;
cursor: pointer; cursor: pointer;
} }
.pure-button:hover { .pure-button:hover {
background-color: #333; background-color: #333;
} }
.top-align {
vertical-align: top; /* Stil für die Toast-Nachrichten */
}
.toast { .toast {
position: fixed; position: fixed;
bottom: 10px; bottom: 10px;
@ -58,12 +73,16 @@ text-align: center;
opacity: 0; opacity: 0;
transition: opacity 0.5s ease-in-out; transition: opacity 0.5s ease-in-out;
} }
.toast.success { .toast.success {
background-color: #4CAF50; background-color: #4caf50;
} }
.toast.error { .toast.error {
background-color: #f44336; background-color: #f44336;
} }
/* Stil für den Range-Slider */
input[type=range] { input[type=range] {
-webkit-appearance: none; -webkit-appearance: none;
width: 70%; width: 70%;
@ -71,9 +90,12 @@ height: 7px;
margin: 4px 0; margin: 4px 0;
background-color: #ddd; background-color: #ddd;
} }
input[type=range]:focus { input[type=range]:focus {
outline: none; outline: none;
} }
/* Spezifischer Stil für Elemente mit ID, die mit "bri" beginnen */
[id^="bri"] { [id^="bri"] {
width: 50%; width: 50%;
} }

View file

@ -9,7 +9,6 @@ function addTabListener() {
var acfg = document.getElementById("tab-a-config"); var acfg = document.getElementById("tab-a-config");
var atde = document.getElementById("tab-a-tde"); var atde = document.getElementById("tab-a-tde");
amain.addEventListener("click", function() { amain.addEventListener("click", function() {
//console.log("Switch to main lights tab"); //console.log("Switch to main lights tab");
tabMain.classList.add("visible"); tabMain.classList.add("visible");

View file

@ -20,6 +20,7 @@
</table> </table>
<a href="#" id="save-button" class="pure-button pure-button-primary" onclick="sendDataToServer();">save</a> <a href="#" id="save-button" class="pure-button pure-button-primary" onclick="sendDataToServer();">save</a>
<a href="#" id="save-button" class="pure-button pure-button-primary" onclick="fillTableFromJson();">reset</a>
</div> </div>
</div> <!-- end of tab-tde --> </div> <!-- end of tab-tde -->

View file

@ -1,27 +1,40 @@
#tab-lights, #tab-config, #tab-tde { /* Vereinheitlichter Look */
body {
font-family: Arial, sans-serif;
}
/* Gemeinsame Regeln für die Tabs */
#tab-lights,
#tab-config,
#tab-tde {
display: none; display: none;
background-color: #ffffff; background-color: #ffffff;
color: black; color: black;
font-weight: bold; font-weight: bold;
padding: 10px;
border-radius: 3px;
} }
#tab-lights.visible {
display: block; /* Sichtbarkeitsregeln für die Tabs */
} #tab-lights.visible,
#tab-config.visible { #tab-config.visible,
display: block;
}
#tab-tde.visible { #tab-tde.visible {
display: block; display: block;
} }
/* Gemeinsame Regeln für Tabellenzellen */
.pure-table td { .pure-table td {
padding: 4px; padding: 4px;
} }
/* Stil für Formularelemente */
.pure-form input[type="number"] { .pure-form input[type="number"] {
width: 60px; width: 60px;
height: 20px; height: 20px;
border-radius: 3px; border-radius: 3px;
border: 1px solid #ccc; border: 1px solid #ccc;
} }
.pure-form select { .pure-form select {
width: 80px; width: 80px;
height: 26px; height: 26px;
@ -29,6 +42,8 @@ border-radius: 3px;
border: 1px solid #ccc; border: 1px solid #ccc;
background-color: #fff; background-color: #fff;
} }
/* Stil für Buttons */
.pure-button { .pure-button {
background-color: #5a5a5a; background-color: #5a5a5a;
color: #fff; color: #fff;
@ -38,12 +53,12 @@ padding: 8px 12px;
font-size: 14px; font-size: 14px;
cursor: pointer; cursor: pointer;
} }
.pure-button:hover { .pure-button:hover {
background-color: #333; background-color: #333;
} }
.top-align {
vertical-align: top; /* Stil für die Toast-Nachrichten */
}
.toast { .toast {
position: fixed; position: fixed;
bottom: 10px; bottom: 10px;
@ -58,12 +73,16 @@ text-align: center;
opacity: 0; opacity: 0;
transition: opacity 0.5s ease-in-out; transition: opacity 0.5s ease-in-out;
} }
.toast.success { .toast.success {
background-color: #4CAF50; background-color: #4caf50;
} }
.toast.error { .toast.error {
background-color: #f44336; background-color: #f44336;
} }
/* Stil für den Range-Slider */
input[type=range] { input[type=range] {
-webkit-appearance: none; -webkit-appearance: none;
width: 70%; width: 70%;
@ -71,9 +90,12 @@ height: 7px;
margin: 4px 0; margin: 4px 0;
background-color: #ddd; background-color: #ddd;
} }
input[type=range]:focus { input[type=range]:focus {
outline: none; outline: none;
} }
/* Spezifischer Stil für Elemente mit ID, die mit "bri" beginnen */
[id^="bri"] { [id^="bri"] {
width: 50%; width: 50%;
} }