diff options
| author | Marin Ivanov <[email protected]> | 2024-08-19 22:33:21 +0300 |
|---|---|---|
| committer | Marin Ivanov <[email protected]> | 2024-08-19 22:33:21 +0300 |
| commit | c043207f57aa71fd9a89f31fee0e9756aad1a597 (patch) | |
| tree | fa41ba5ae060f615d6a0da85b614ad04ee6c46d6 | |
| parent | 58ffb8d601910055c3618d41cdbf559925aa6742 (diff) | |
cosmetic improvements
| -rw-r--r-- | index.html | 8 | ||||
| -rw-r--r-- | ka.js | 10 | ||||
| -rw-r--r-- | style.css | 13 |
3 files changed, 18 insertions, 13 deletions
@@ -9,7 +9,7 @@ <header><big>🛠️ WebIF 2.0</big></header> <main> <nav> - <label for="showmenu"><big>≡ Меню</big></label> + <label for="showmenu"><span>☰</span> Меню</label> <input type="checkbox" id="showmenu" /> <a class="active" href="#">Данни</a> @@ -22,7 +22,11 @@ <div class="grid center middle"> <div> <div class="loadspin"></div> - <p>Зарежда...</p> + <p> + <noscript>Не</noscript> + Зарежда... + <noscript>JavaScript не е включен .</noscript> + </p> </div> </div> </section> @@ -34,12 +34,10 @@ var input = (type) => tag("input", {type}); function router(root, routes, onreload) { function reload() { - let h = doc.location.hash.substr(1) || "/"; - if (!(h in routes)) { - h = ""; - } - root.replaceChildren(routes[h]()); - onreload && onreload(h); + const h = doc.location.hash.substr(1) || "/"; + const r = h in routes ? h : ""; + root.replaceChildren(routes[r]()); + onreload && onreload(r); }; reload(); window.addEventListener("hashchange", reload); @@ -4,7 +4,7 @@ body { } h1, h2, h3 { - margin: 0.3em 0 0.3em 0; + margin: 0; } .container { @@ -15,14 +15,12 @@ h1, h2, h3 { main, nav, section, nav a, nav label { box-sizing: border-box; } - header { padding: 1em; } section { - padding: 0 0.5em 0 0.5em ; + padding: 0.5em; } - main { display: flex; } @@ -49,11 +47,16 @@ nav a, nav label { } nav label { - font-size: 1.2em; + text-align: center; + font-size: 1.3em; + line-height: 1.3em; background-color: #000; color: #fff; cursor: pointer; } +nav label > span { + font-size: 1.4em; +} nav input, nav label { display: none; |
