From 46dbedbd451217cd22d10e9d8cd208d4706771b8 Mon Sep 17 00:00:00 2001 From: WriterV2 Date: Sat, 28 Jan 2023 11:50:37 +0100 Subject: Remove story-type attribute and filter --- docs/stories.html | 71 +++++++++++++------------------------------------------ docs/stories.js | 10 ++------ 2 files changed, 19 insertions(+), 62 deletions(-) (limited to 'docs') diff --git a/docs/stories.html b/docs/stories.html index 6f2a47c..0f1c88a 100644 --- a/docs/stories.html +++ b/docs/stories.html @@ -21,74 +21,37 @@
- + - -
-
-

Mit gutem Gewissen

-

Lorem ipsum dolor sit amet, officia excepteur.

-
-
- 7 Pages - German - Shortstory -
+
+

Mit gutem Gewissen

+

Lorem ipsum dolor sit amet, officia excepteur.

+
+
+ 7 Pages + German +
-
-

Das schweigende Spiegelbild

-

Em pariatur mollit ex esse exercitation amet. Nisi anim cupidatat excepteur officia.

-
-
- 2 Pages - German - Shortstory -
-
- - -
-

Hubristic Failures

-

Ui minim labore adipisicing minim sint cillum sint consectetur cupidatat.ex esse exercitation idatat excepteur officia.

-
-
- 2 Pages - English - Screenplay -
-
- - -
-

Hubristic Failures

-

Ui minim labore adipisicing minim sint cillum sint consectetur cupidatat.ex esse exercitation idatat excepteur officia.

-
-
- 2 Pages - English - Screenplay -
+
+

Das schweigende Spiegelbild

+

Em pariatur mollit ex esse exercitation amet. Nisi anim cupidatat excepteur officia.

+
+
+ 2 Pages + German +
diff --git a/docs/stories.js b/docs/stories.js index e5a57ec..cb39b0c 100644 --- a/docs/stories.js +++ b/docs/stories.js @@ -1,14 +1,12 @@ // every story card const workCards = document.querySelectorAll(".work-card"); -// story type select input -const storyTypeSelect = document.querySelector("#story-type-select"); // language select input const languageSelect = document.querySelector("#language-select"); // copy of works with all work cards const works = Array.from(document.querySelector(".works").children); -// filter cards based on storytype and language filter +// filter cards based on language filter function filterWorkCards() { // restore initial state with all cards // (TODO: Explore more efficient solutions without another loop) @@ -17,18 +15,14 @@ function filterWorkCards() { document.querySelector(".works").appendChild(card); }) - // filter card if language or story type filter doesn't match + // filter card if language doesn't match workCards.forEach((card) => { if (languageSelect.value != "*" && card.querySelector(".story-language").innerHTML != languageSelect.value) { document.querySelector(".works").removeChild(card); - } else if (storyTypeSelect.value != "*" && card.querySelector(".story-type").innerHTML != storyTypeSelect.value) { - document.querySelector(".works").removeChild(card); } }) } // filter cards when -// story type selection changes -storyTypeSelect.addEventListener("change", filterWorkCards); // language selection changes languageSelect.addEventListener("change", filterWorkCards); -- cgit v1.2.3