-
-
-
- { title }
-
-
- { subtitle }
-
-
-
-
+
+
+
+
+
+
+ {title}
+
+
+ {subtitle}
+
+
+
-
-
+
diff --git a/src/components/RoadmapHeader.astro b/src/components/RoadmapHeader.astro
index c26064cad..c8ee71178 100644
--- a/src/components/RoadmapHeader.astro
+++ b/src/components/RoadmapHeader.astro
@@ -1,7 +1,7 @@
---
import Icon from "./Icon.astro";
import ResourcesAlert from "./ResourcesAlert.astro";
-import TopicSearch from "./TopicSearch.astro";
+import TopicSearch from "./TopicSearch/TopicSearch.astro";
import YouTubeAlert from "./YouTubeAlert.astro";
export interface Props {
diff --git a/src/components/TopicSearch.astro b/src/components/TopicSearch/TopicSearch.astro
similarity index 88%
rename from src/components/TopicSearch.astro
rename to src/components/TopicSearch/TopicSearch.astro
index 2320161bc..8c8b5341c 100644
--- a/src/components/TopicSearch.astro
+++ b/src/components/TopicSearch/TopicSearch.astro
@@ -1,7 +1,9 @@
---
-import Icon from "./Icon.astro";
+import Icon from "../Icon.astro";
---
+
+
item.classList.remove('hidden'));
+ return;
+ }
+
+ document.querySelectorAll(`[data-topic]`).forEach((item) => item.classList.add('hidden'));
+
+ document.querySelectorAll(`[data-topic*="${value}"]`).forEach((item) => item.classList.remove('hidden'));
+ }
+
+ onDOMLoaded() {
+ document.getElementById('search-topic-input').addEventListener('keyup', this.filterTopicNodes);
+ }
+
+ init() {
+ window.addEventListener('DOMContentLoaded', this.onDOMLoaded);
+ }
+ }
+
+ const topicRef = new Topics();
+ topicRef.init();
+
\ No newline at end of file