diff options
author | Martin Fischer <martin@push-f.com> | 2021-11-27 12:58:36 +0100 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2021-11-27 13:05:53 +0100 |
commit | 66053a7ad733ff7bce6025dadd1a2128db2a1175 (patch) | |
tree | ed1ef11cabf6b5a870c62f1e6fa5986ced41faeb | |
parent | e2aab0547ad4f4c6bcb2f288e54a8f93e054b7fb (diff) |
html: design for noscript
-rw-r--r-- | head.html | 8 | ||||
-rw-r--r-- | script.js | 1 |
2 files changed, 8 insertions, 1 deletions
@@ -9,7 +9,13 @@ <div class=header> <div class=left><h1>Rust features</h1></div> -<input id=search autofocus autocomplete=off tabindex=4> +<input id=search autocomplete=off tabindex=4> +<noscript> +With JavaScript you get a search box here. +<style> +#search { display: none; } +</style> +</noscript> <script src=script.js></script> <div class=right></div> </div> @@ -3,6 +3,7 @@ const versions = await res.json(); const input = document.getElementById('search'); + input.focus(); input.addEventListener('input', (e) => { const query = e.target.value.toLowerCase(); for (const [key, data] of Object.entries(versions)) { |