diff --git a/scripts/boxesserver b/scripts/boxesserver index ef02e1a..47fb9cd 100755 --- a/scripts/boxesserver +++ b/scripts/boxesserver @@ -318,26 +318,7 @@ class BServer:
-

{_("Boxes.py")}

-

{_("Create boxes and more with a laser cutter!")}

-

-{_(''' - Boxes.py is an Open Source box generator written in Python. It features both finished parametrized generators as well as a Python API for writing your own. It features finger and (flat) dovetail joints, flex cuts, holes and slots for screws, hinges, gears, pulleys and much more.''')} -

-
- -
-self-Logo -
- -
- -
-
- - +{self.genPagePartHeader(lang)} + +
+self-Logo +
+ +
+ +
+
+ +""" + def genPagePartFooter(self, lang) -> str: _ = lang.gettext @@ -534,15 +545,7 @@ class BServer:
-

{_("Boxes.py")}

-

{_("Gallery")}

-
- -
-self-Logo -
-
- +{self.genPagePartHeader(lang)} """] for nr, group in enumerate(self.groups): result.append(f"

{_(group.title)}

\n") @@ -554,9 +557,9 @@ class BServer: alt = f"{_(name)}" href = f"{name}{langparam}" if not os.path.exists(static_filename): - result.append(f""" {_(name)}

{_(box.__doc__)}
\n""") + result.append(f""" {_(name)}

{_(box.__doc__)}
\n""") else: - result.append(f""" {alt}\n""") + result.append(f""" {alt}\n""") result.append(f""" {self.genPagePartFooter(lang)} diff --git a/static/self.js b/static/self.js index 30719ab..06af0f6 100644 --- a/static/self.js +++ b/static/self.js @@ -274,7 +274,7 @@ function expandAll() { function showAll(str) { let matching_ids = document.querySelectorAll('[id^="search_id_"]') for (let id of matching_ids) { - id.hidden = false; + id.style.display = "inline-block"; } } @@ -283,10 +283,11 @@ function showOnly(str) { let matching_ids = document.querySelectorAll('[id^="search_id_"]') for (let id of matching_ids) { name = id.id.replace("search_id_", "").toLowerCase(); - if (name.includes(str) || id.textContent.toLowerCase().includes(str)) - id.hidden = false; - else - id.hidden = true; + if (name.includes(str) || id.textContent.toLowerCase().includes(str)) { + id.style.display = "inline-block"; + } else { + id.style.display = "none"; + } } }