From 1b3de458faf97db780b92de14efbf395a7c35a4e Mon Sep 17 00:00:00 2001 From: Shy Date: Mon, 6 May 2024 17:26:31 +0200 Subject: [PATCH 01/15] Fixed colors for #mapnote --- static/c4.css | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/static/c4.css b/static/c4.css index 7805a9b..cb49d2d 100644 --- a/static/c4.css +++ b/static/c4.css @@ -8,12 +8,18 @@ h1, h1 a { } #map { - border: 1px solid #202020; - background: #4d4d4d; - max-width: 1440px; - max-height: 50vh; - aspect-ratio: 2 / 1; - box-shadow: 0px 6px 12px #000c; + border: 1px solid #202020; + background: #4d4d4d; + max-width: 1440px; + max-height: 50vh; + aspect-ratio: 2 / 1; + box-shadow: 0px 6px 12px #000c; +} + +#mapnote { + background: #202020; + border: 1px solid #000; + border-top: none; } .result { From 065fa5adbff32c4b6706f277fa175346261f8ede Mon Sep 17 00:00:00 2001 From: Shy Date: Mon, 6 May 2024 18:43:03 +0200 Subject: [PATCH 02/15] More beautiful #mapnote --- static/c4.css | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/static/c4.css b/static/c4.css index cb49d2d..962e63e 100644 --- a/static/c4.css +++ b/static/c4.css @@ -9,7 +9,7 @@ h1, h1 a { #map { border: 1px solid #202020; - background: #4d4d4d; + background-color: #4d4d4d; max-width: 1440px; max-height: 50vh; aspect-ratio: 2 / 1; @@ -17,9 +17,17 @@ h1, h1 a { } #mapnote { - background: #202020; - border: 1px solid #000; - border-top: none; + background-color: #ccc; + color: #333; + border-color: #202020; + padding: 0.25em 0.5em; + position: relative; + top: -1px; + box-shadow: 0px 6px 12px #000c; +} + +#mapnote:empty { + display: none; } .result { From f8ecf20b750b2fec4d72bf49ea48b3728025c826 Mon Sep 17 00:00:00 2001 From: Shy Date: Tue, 7 May 2024 18:38:00 +0200 Subject: [PATCH 03/15] Yellow outline around search input --- static/c4.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/static/c4.css b/static/c4.css index 962e63e..b80be1d 100644 --- a/static/c4.css +++ b/static/c4.css @@ -7,6 +7,10 @@ h1, h1 a { color: #dfaa37; /* C4 Yellow */ } +#search:focus { + outline: 2px solid #dfaa37; +} + #map { border: 1px solid #202020; background-color: #4d4d4d; From 7236d859ebf415143d561e58a017a54514ce04ea Mon Sep 17 00:00:00 2001 From: Shy Date: Tue, 7 May 2024 19:13:45 +0200 Subject: [PATCH 04/15] Enhance visibility of marker --- static/c4.css | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/static/c4.css b/static/c4.css index b80be1d..c5a403f 100644 --- a/static/c4.css +++ b/static/c4.css @@ -93,8 +93,9 @@ h1, h1 a { } #mapgrid { - outline: 2px solid #dfaa37; - background: #dfaa3780; + outline: 2px solid #333; + background-color: #dfaa37; + border-radius: 4px; animation: blinker 1s infinite; } From d98342bd02124b7f0f24e6b17c77e17b7c8ee86b Mon Sep 17 00:00:00 2001 From: Shy Date: Mon, 6 May 2024 17:26:31 +0200 Subject: [PATCH 05/15] Fixed colors for #mapnote --- static/c4.css | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/static/c4.css b/static/c4.css index c0ca189..d54dce4 100644 --- a/static/c4.css +++ b/static/c4.css @@ -8,12 +8,18 @@ h1, h1 a { } #map { - border: 1px solid #202020; - background: #4d4d4d; - max-width: 1440px; - max-height: 50vh; - aspect-ratio: 2 / 1; - box-shadow: 0px 6px 12px #000c; + border: 1px solid #202020; + background: #4d4d4d; + max-width: 1440px; + max-height: 50vh; + aspect-ratio: 2 / 1; + box-shadow: 0px 6px 12px #000c; +} + +#mapnote { + background: #202020; + border: 1px solid #000; + border-top: none; } .result { From 0c1a280a190157de33dd56ad417c4a1dc155cf6f Mon Sep 17 00:00:00 2001 From: Shy Date: Mon, 6 May 2024 18:43:03 +0200 Subject: [PATCH 06/15] More beautiful #mapnote --- static/c4.css | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/static/c4.css b/static/c4.css index d54dce4..0a62228 100644 --- a/static/c4.css +++ b/static/c4.css @@ -9,7 +9,7 @@ h1, h1 a { #map { border: 1px solid #202020; - background: #4d4d4d; + background-color: #4d4d4d; max-width: 1440px; max-height: 50vh; aspect-ratio: 2 / 1; @@ -17,9 +17,17 @@ h1, h1 a { } #mapnote { - background: #202020; - border: 1px solid #000; - border-top: none; + background-color: #ccc; + color: #333; + border-color: #202020; + padding: 0.25em 0.5em; + position: relative; + top: -1px; + box-shadow: 0px 6px 12px #000c; +} + +#mapnote:empty { + display: none; } .result { From bf182251ec3fca5a2854fd1a967644b5bb51f366 Mon Sep 17 00:00:00 2001 From: Shy Date: Tue, 7 May 2024 18:38:00 +0200 Subject: [PATCH 07/15] Yellow outline around search input --- static/c4.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/static/c4.css b/static/c4.css index 0a62228..224b6ae 100644 --- a/static/c4.css +++ b/static/c4.css @@ -7,6 +7,10 @@ h1, h1 a { color: #dfaa37; /* C4 Yellow */ } +#search:focus { + outline: 2px solid #dfaa37; +} + #map { border: 1px solid #202020; background-color: #4d4d4d; From 15d914fae3ad85cab91c4033662359ecba949603 Mon Sep 17 00:00:00 2001 From: Shy Date: Tue, 7 May 2024 19:13:45 +0200 Subject: [PATCH 08/15] Enhance visibility of marker --- static/c4.css | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/static/c4.css b/static/c4.css index 224b6ae..baa870b 100644 --- a/static/c4.css +++ b/static/c4.css @@ -108,8 +108,9 @@ h1, h1 a { } #mapgrid { - outline: 2px solid #dfaa37; - background: #dfaa3780; + outline: 2px solid #333; + background-color: #dfaa37; + border-radius: 4px; animation: blinker 1s infinite; } From 62699c90eb3ffaaedc0b6d15b4584a212a8640f4 Mon Sep 17 00:00:00 2001 From: Shy Date: Thu, 9 May 2024 03:02:42 +0200 Subject: [PATCH 09/15] Limit marker roundness on small screens --- static/c4.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/c4.css b/static/c4.css index baa870b..b9a0d3a 100644 --- a/static/c4.css +++ b/static/c4.css @@ -110,7 +110,7 @@ h1, h1 a { #mapgrid { outline: 2px solid #333; background-color: #dfaa37; - border-radius: 4px; + border-radius: min(4px, 25%); animation: blinker 1s infinite; } From 0fa4e48ff515d6d576f2f50d5ad51b22b089a001 Mon Sep 17 00:00:00 2001 From: Shy Date: Fri, 10 May 2024 14:40:36 +0200 Subject: [PATCH 10/15] Change misleading file name --- static/form.html | 2 +- static/index.html | 2 +- static/{80x80.svg => map.svg} | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename static/{80x80.svg => map.svg} (100%) diff --git a/static/form.html b/static/form.html index c01f0f4..44d5c16 100644 --- a/static/form.html +++ b/static/form.html @@ -22,7 +22,7 @@ Coordinates (click on map)
- +
diff --git a/static/index.html b/static/index.html index c656402..b1d8ceb 100644 --- a/static/index.html +++ b/static/index.html @@ -17,7 +17,7 @@
- +

diff --git a/static/80x80.svg b/static/map.svg similarity index 100% rename from static/80x80.svg rename to static/map.svg From 060560d8a24e074df18b104379ff1ab87db302d5 Mon Sep 17 00:00:00 2001 From: Shy Date: Fri, 10 May 2024 14:50:22 +0200 Subject: [PATCH 11/15] Refined corridor --- static/map.svg | 937 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 662 insertions(+), 275 deletions(-) diff --git a/static/map.svg b/static/map.svg index 2478ce7..66e3ac3 100644 --- a/static/map.svg +++ b/static/map.svg @@ -7,17 +7,58 @@ viewBox="0 0 381.00001 190.50001" version="1.1" id="svg1" + inkscape:version="1.3.2 (091e20ef0f, 2023-11-25, custom)" + sodipodi:docname="chaoslabor.svg" xml:space="preserve" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" - xmlns:svg="http://www.w3.org/2000/svg">ABCDEFGHIJKLMNOP12345678910111213141516171819202122232425262728293031323334PlenarsaalKücheWohnzimmerWC++WCBällebadServer-raumFnordcenterKeller From e5e61fb9c4f0f045ac0eaf3fa20793e44d9d81f1 Mon Sep 17 00:00:00 2001 From: Shy Date: Fri, 10 May 2024 14:40:36 +0200 Subject: [PATCH 12/15] Change misleading file name --- static/form.html | 2 +- static/index.html | 2 +- static/{80x80.svg => map.svg} | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename static/{80x80.svg => map.svg} (100%) diff --git a/static/form.html b/static/form.html index c01f0f4..44d5c16 100644 --- a/static/form.html +++ b/static/form.html @@ -22,7 +22,7 @@ Coordinates (click on map)
- +
diff --git a/static/index.html b/static/index.html index c656402..b1d8ceb 100644 --- a/static/index.html +++ b/static/index.html @@ -17,7 +17,7 @@
- +

diff --git a/static/80x80.svg b/static/map.svg similarity index 100% rename from static/80x80.svg rename to static/map.svg From 360164be7ab42b129eceefd8825b057d91c3124b Mon Sep 17 00:00:00 2001 From: Shy Date: Fri, 10 May 2024 14:50:22 +0200 Subject: [PATCH 13/15] Refined corridor --- static/map.svg | 937 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 662 insertions(+), 275 deletions(-) diff --git a/static/map.svg b/static/map.svg index 2478ce7..66e3ac3 100644 --- a/static/map.svg +++ b/static/map.svg @@ -7,17 +7,58 @@ viewBox="0 0 381.00001 190.50001" version="1.1" id="svg1" + inkscape:version="1.3.2 (091e20ef0f, 2023-11-25, custom)" + sodipodi:docname="chaoslabor.svg" xml:space="preserve" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" - xmlns:svg="http://www.w3.org/2000/svg">ABCDEFGHIJKLMNOP12345678910111213141516171819202122232425262728293031323334PlenarsaalKücheWohnzimmerWC++WCBällebadServer-raumFnordcenterKeller From c2334642fb9fce2cccc072d91d47e82ee626173e Mon Sep 17 00:00:00 2001 From: Shy Date: Thu, 16 May 2024 22:07:04 +0200 Subject: [PATCH 14/15] Added item counter. --- static/c4.css | 10 ++++++++-- static/index.html | 1 + static/index.js | 39 +++++++++++++++++++++++++++++++++++---- 3 files changed, 44 insertions(+), 6 deletions(-) diff --git a/static/c4.css b/static/c4.css index b9a0d3a..abeae82 100644 --- a/static/c4.css +++ b/static/c4.css @@ -7,8 +7,9 @@ h1, h1 a { color: #dfaa37; /* C4 Yellow */ } -#search:focus { - outline: 2px solid #dfaa37; +#search.failed { + color: #200; + background-color: #ec6d5f; } #map { @@ -34,6 +35,11 @@ h1, h1 a { display: none; } +#itemcount { + display: inline-block; + margin-right: 1ch; +} + .result { background-color: #202020; border-color: #4d4d4d; diff --git a/static/index.html b/static/index.html index b1d8ceb..07dceb7 100644 --- a/static/index.html +++ b/static/index.html @@ -12,6 +12,7 @@
+

diff --git a/static/index.js b/static/index.js index 2d7b1aa..f7bb046 100644 --- a/static/index.js +++ b/static/index.js @@ -17,6 +17,7 @@ function renderItems() { const container = document.getElementById('results'); const template = document.getElementById('item'); const loading = document.getElementById('loading'); + let count = 0; for (const [id, item] of Object.entries(items)) { const clone = template.content.cloneNode(true); @@ -31,11 +32,14 @@ function renderItems() { clone.querySelector(".result").id = `item-${id}`; clone.querySelector("a").href = `form.html?id=${encodeURIComponent(id)}`; if (item.hidden) { - clone.querySelector(".result").classList.add('hidden') - }; + clone.querySelector(".result").classList.add('hidden'); + } else { + count++; + } container.appendChild(clone); - }; + } loading.remove(); + updateCounter(count); } function getLocString(items, item) { @@ -67,6 +71,7 @@ function search(e) { const searchAttrs = ['id', 'name', 'type', 'note', 'content']; const query = e.target.value; const regex = new RegExp(query, 'i') + let count = 0; for (const elem of document.getElementsByClassName('result')) { const item = items[elem.id.slice(5)]; @@ -85,10 +90,36 @@ function search(e) { if (found) { elem.classList.remove('filtered'); + count++; } else { elem.classList.add('filtered'); } } + + // Indicate failed search. + if (count) { + e.target.classList.remove('failed'); + } else { + e.target.classList.add('failed'); + } + + updateCounter(count); +} + +function updateCounter(count) { + const itemcount = document.getElementById('itemcount'); + + switch(count) { + case 0: + itemcount.textContent = 'No items found.'; + break; + case 1: + itemcount.textContent = '1 item found.'; + break; + default: + itemcount.textContent = `${count} items found.`; + break; + } } function showhidden(e){ @@ -118,4 +149,4 @@ function showItem(e) { function hideItem(e) { clearMap(); -} \ No newline at end of file +} From 45c1d0f9cc5cd039e7fcf3dc4a93c9bd0420d879 Mon Sep 17 00:00:00 2001 From: Shy Date: Thu, 16 May 2024 22:09:54 +0200 Subject: [PATCH 15/15] Converted text to path --- static/map.svg | 912 +++++++++++++++---------------------------------- 1 file changed, 266 insertions(+), 646 deletions(-) diff --git a/static/map.svg b/static/map.svg index 66e3ac3..4210fd9 100644 --- a/static/map.svg +++ b/static/map.svg @@ -7,58 +7,17 @@ viewBox="0 0 381.00001 190.50001" version="1.1" id="svg1" - inkscape:version="1.3.2 (091e20ef0f, 2023-11-25, custom)" - sodipodi:docname="chaoslabor.svg" xml:space="preserve" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" - xmlns:svg="http://www.w3.org/2000/svg">ABCDEFGHIJKLMNOP12345678910111213141516171819202122232425262728293031323334PlenarsaalKücheWohnzimmerWC++WCBällebadServer-raumFnordcenterKeller