cosmetics

This commit is contained in:
Marcus 2024-10-25 23:43:51 +02:00
parent dadaf09232
commit 9c51386be9
2 changed files with 28 additions and 23 deletions

View file

@ -61,6 +61,11 @@ h3 {
margin: 5px; margin: 5px;
} }
td {
text-align: left;
vertical-align: middle;
}
a:link, a:visited { a:link, a:visited {
color: #04AA6D; color: #04AA6D;
} }

View file

@ -37,24 +37,24 @@ const char* File_cangrow_JS PROGMEM = R"(function toggleDisplay(id) {
} else { } else {
el.style.display = 'none'; el.style.display = 'none';
} }
} }
function hideAllClass(classname) { function hideAllClass(classname) {
const el = document.getElementsByClassName(classname); const el = document.getElementsByClassName(classname);
for(let i = 0; i < el.length ; i++) { for(let i = 0; i < el.length ; i++) {
el[i].style.display = ''; el[i].style.display = '';
} }
} }
function showSelect(selectId, prefix, hideClass = '') { function showSelect(selectId, prefix, hideClass = '') {
if(hideClass != '') { if(hideClass != '') {
hideAllClass(hideClass); hideAllClass(hideClass);
} }
let selVal = document.getElementById(selectId).value; let selVal = document.getElementById(selectId).value;
toggleDisplay(prefix + selVal); toggleDisplay(prefix + selVal);
})"; })";
void WebFile_cangrow_JS(AsyncWebServerRequest *request) { void WebFile_cangrow_JS(AsyncWebServerRequest *request) {
request->send_P(200, "text/css", File_cangrow_JS); request->send_P(200, "text/css", File_cangrow_JS);