diff --git a/static/index.js b/static/index.js index 780e7be..e00434f 100644 --- a/static/index.js +++ b/static/index.js @@ -5,20 +5,26 @@ function update() { // show matching instructions // console.log($('.instruction')) - for (instr of $('.instruction')) { - if (instr.id == 'front-instruction-placeholder') { - instr.style.display = 'none' - continue - } + let showed = false; + for (instr of $('.instruction')) { let parts = instr.id.split('-') let me = parts[1] let them = parts[2] // console.log(me, them, $(`#me-${me}`)[0].checked, $(`#them-${them}`)[0].checked) - instr.style.display = - ($(`#me-${me}`)[0].checked && $(`#them-${them}`)[0].checked) - ? 'block' : 'none' + + if ($(`#me-${me}`)[0].checked && $(`#them-${them}`)[0].checked) { + instr.style.display = 'block' + document.getElementById('front-instructions') + .scrollIntoView({behavior: 'smooth', block: 'nearest'}) + showed = true; + } else { + instr.style.display = 'none' + } } + + document.getElementById('front-instruction-placeholder').style.display = + (showed) ? 'none' : 'block' } addEventListener('DOMContentLoaded', () => { diff --git a/static/style.css b/static/style.css index e9374aa..9f98536 100644 --- a/static/style.css +++ b/static/style.css @@ -50,7 +50,7 @@ #topology { position: absolute; z-index: -1; - background-color: #003355; + background-color: var(--bg); /* #003355; */ overflow: clip; } @@ -198,14 +198,14 @@ pre .value, code .value, code.value { .btn.atproto, .btn.atproto:hover { background-color: #2b3e5b; /* not disabled: #113a79; */ - border: 2px solid #2e5884; + border: 2px solid #3e6894; /* not disabled: #4786c9; */ } .btn.nostr, .btn.nostr:hover { background-color: #46374F; /* not disabled: #491F62; */ - border: 2px solid #53415E; + border: 2px solid #63516E; /* not disabled: ; */ } @@ -222,7 +222,7 @@ pre .value, code .value, code.value { height: 1.4em !important; } -.front-instructions { +#front-instructions { min-height: 4em; } diff --git a/templates/index.html b/templates/index.html index 44f8706..743ebbe 100644 --- a/templates/index.html +++ b/templates/index.html @@ -27,25 +27,28 @@ bluesky light blue
@@ -61,23 +64,23 @@ bluesky light blue
@@ -86,9 +89,9 @@ bluesky light blue
-
+
-

+

Choose your networks above.

@@ -105,7 +108,7 @@ bluesky light blue

- To follow the web site example.com, search for @example.com@web.brid.gy on your fediverse instance. + To follow the web site example.com, search for @example.com@web.brid.gy on your fediverse instance.