From 10c563a076a905145441345aa789c8e19e7af473 Mon Sep 17 00:00:00 2001 From: Kai Lauterbach Date: Mon, 22 May 2023 15:49:30 +0200 Subject: [PATCH] css style file will also be cleaned before writing it to data folder now --- firmware/data/style.css | 26 ++++---------------------- tools/html2string.sh | 7 +++++-- tools/html_gen_files.sh | 2 +- 3 files changed, 10 insertions(+), 25 deletions(-) diff --git a/firmware/data/style.css b/firmware/data/style.css index ec5cadd..baf8574 100644 --- a/firmware/data/style.css +++ b/firmware/data/style.css @@ -1,9 +1,6 @@ -/* Vereinheitlichter Look */ body { font-family: Arial, sans-serif; } - -/* Gemeinsame Regeln für die Tabs */ #tab-lights, #tab-config, #tab-tde { @@ -14,27 +11,21 @@ font-weight: bold; padding: 10px; border-radius: 3px; } - -/* Sichtbarkeitsregeln für die Tabs */ #tab-lights.visible, #tab-config.visible, #tab-tde.visible { display: block; } - -/* Gemeinsame Regeln für Tabellenzellen */ .pure-table td { padding: 4px; +vertical-align: top; } - -/* Stil für Formularelemente */ .pure-form input[type="number"] { width: 60px; height: 20px; border-radius: 3px; border: 1px solid #ccc; } - .pure-form select { width: 80px; height: 26px; @@ -42,8 +33,6 @@ border-radius: 3px; border: 1px solid #ccc; background-color: #fff; } - -/* Stil für Buttons */ .pure-button { background-color: #5a5a5a; color: #fff; @@ -53,12 +42,9 @@ padding: 8px 12px; font-size: 14px; cursor: pointer; } - .pure-button:hover { background-color: #333; } - -/* Stil für die Toast-Nachrichten */ .toast { position: fixed; bottom: 10px; @@ -73,16 +59,12 @@ text-align: center; opacity: 0; transition: opacity 0.5s ease-in-out; } - .toast.success { background-color: #4caf50; } - .toast.error { background-color: #f44336; } - -/* Stil für den Range-Slider */ input[type=range] { -webkit-appearance: none; width: 70%; @@ -90,12 +72,12 @@ height: 7px; margin: 4px 0; background-color: #ddd; } - input[type=range]:focus { outline: none; } - -/* Spezifischer Stil für Elemente mit ID, die mit "bri" beginnen */ [id^="bri"] { width: 50%; } +.top-align { +vertical-align: top; +} \ No newline at end of file diff --git a/tools/html2string.sh b/tools/html2string.sh index 5f4c178..728a7e5 100755 --- a/tools/html2string.sh +++ b/tools/html2string.sh @@ -4,7 +4,10 @@ sed -e 's/^[[:space:]]*//' -e '/^\/\/.*/d' $1 | # Remove one line comments starting with // sed -e 's/^\/\/.*$//' | -# Remove trailing comments starting with // +# Remove trailing comments starting with space // sed -e 's/ \/\/.*$//' | +# Remove one-line comments starting with /* +sed -e 's/\/\*.*//g' | # Remove empty lines -sed '/^\s*$/d' +sed -e '/^\s*$/d' + diff --git a/tools/html_gen_files.sh b/tools/html_gen_files.sh index dd5c37b..f6c74c6 100755 --- a/tools/html_gen_files.sh +++ b/tools/html_gen_files.sh @@ -20,5 +20,5 @@ bash ../../tools/html2string.sh ../html/config_template.html > config_template.h bash ../../tools/html2string.sh ../html/light_control_template.html > light_control_template.html bash ../../tools/html2string.sh ../html/top.js > top.js bash ../../tools/html2string.sh ../html/bottom.js > bottom.js -cp -av ../html/style.css . > /dev/null +bash ../../tools/html2string.sh ../html/style.css > style.css