Add logo header to web UI, matching Device-Framework layout
This commit is contained in:
+3
-2
@@ -513,7 +513,8 @@ static void handleRoot() {
|
|||||||
html += "*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}";
|
html += "*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}";
|
||||||
html += "body{font-family:-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen,Ubuntu,sans-serif;background:#f2f4f8;color:#1a1a2e;display:flex;justify-content:center;align-items:flex-start;min-height:100vh;padding:24px 16px}";
|
html += "body{font-family:-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen,Ubuntu,sans-serif;background:#f2f4f8;color:#1a1a2e;display:flex;justify-content:center;align-items:flex-start;min-height:100vh;padding:24px 16px}";
|
||||||
html += ".card{background:#fff;border-radius:12px;box-shadow:0 4px 24px rgba(0,0,0,.08);padding:32px;width:100%;max-width:560px}";
|
html += ".card{background:#fff;border-radius:12px;box-shadow:0 4px 24px rgba(0,0,0,.08);padding:32px;width:100%;max-width:560px}";
|
||||||
html += "h1{font-size:24px;margin-bottom:4px}.sub{color:#666;font-size:14px;margin-bottom:24px}";
|
html += ".hdr{display:flex;align-items:center;gap:16px;margin-bottom:24px}.hdr img{width:72px;height:72px;flex-shrink:0}";
|
||||||
|
html += "h1{font-size:24px;margin-bottom:4px}.sub{color:#666;font-size:14px}";
|
||||||
html += ".info{background:#f8f9fc;border-radius:8px;padding:12px 16px;margin-bottom:20px;font-size:14px}";
|
html += ".info{background:#f8f9fc;border-radius:8px;padding:12px 16px;margin-bottom:20px;font-size:14px}";
|
||||||
html += ".info div{display:flex;justify-content:space-between;padding:4px 0}.info div span:first-child{color:#666}";
|
html += ".info div{display:flex;justify-content:space-between;padding:4px 0}.info div span:first-child{color:#666}";
|
||||||
html += "label{display:block;font-size:14px;font-weight:600;margin-bottom:4px}";
|
html += "label{display:block;font-size:14px;font-weight:600;margin-bottom:4px}";
|
||||||
@@ -536,7 +537,7 @@ html += ".switch input{opacity:0;width:0;height:0}.slid{position:absolute;cursor
|
|||||||
html += ".slid::before{content:\"\";position:absolute;height:14px;width:14px;left:2px;top:2px;background:#fff;border-radius:50%;transition:.3s;box-shadow:0 1px 3px rgba(0,0,0,.2)}";
|
html += ".slid::before{content:\"\";position:absolute;height:14px;width:14px;left:2px;top:2px;background:#fff;border-radius:50%;transition:.3s;box-shadow:0 1px 3px rgba(0,0,0,.2)}";
|
||||||
html += ".switch input:checked+.slid{background:#4361ee}.switch input:checked+.slid::before{transform:translateX(14px)}";
|
html += ".switch input:checked+.slid{background:#4361ee}.switch input:checked+.slid::before{transform:translateX(14px)}";
|
||||||
html += "</style></head><body><div class=card>";
|
html += "</style></head><body><div class=card>";
|
||||||
html += "<h1>M1730</h1><div class=sub>Configuration</div><div class=info>";
|
html += "<div class=hdr><img src=/logo.png alt=logo><div><h1>M1730</h1><div class=sub>Configuration</div></div></div><div class=info>";
|
||||||
html += "<div><span>Hostname</span><span>" + String(hostname) + "</span></div>";
|
html += "<div><span>Hostname</span><span>" + String(hostname) + "</span></div>";
|
||||||
html += "<div><span>IP</span><span>" + WiFi.localIP().toString() + "</span></div></div>";
|
html += "<div><span>IP</span><span>" + WiFi.localIP().toString() + "</span></div></div>";
|
||||||
html += "<form action=/config method=post><label>Hostname</label>";
|
html += "<form action=/config method=post><label>Hostname</label>";
|
||||||
|
|||||||
Reference in New Issue
Block a user