From 6ec52a6ad2850ed725f3d8a697ad15f396602b81 Mon Sep 17 00:00:00 2001 From: BOTAlex Date: Fri, 22 May 2026 12:32:13 +0200 Subject: [PATCH] CSS school kaitlyns demands --- src/routes/school/css/+page.svelte | 87 +++++++++++++++++++++++------- 1 file changed, 68 insertions(+), 19 deletions(-) diff --git a/src/routes/school/css/+page.svelte b/src/routes/school/css/+page.svelte index e29426e..1b65487 100644 --- a/src/routes/school/css/+page.svelte +++ b/src/routes/school/css/+page.svelte @@ -3,6 +3,7 @@ import iso3 from "./iso3.json"; import countryList from "country-list-js"; import onMount from "@src/optimizers/onMount"; + import Search from "lucide-svelte/icons/search"; class Range { start: number = 0; @@ -25,6 +26,17 @@ let currentCountry: string = ""; let currentCountrySelected: string = ""; let interactiveEmbed: HTMLIFrameElement; + let searchFilter: string = ""; + + interface RegionFilter { + region: string; + selected: boolean; + } + const continents: string[] = countryList.continents(); + const regionFilters: RegionFilter[] = continents.map((name) => ({ + region: name, + selected: false, + })); function selectCountry(country: string, towards: boolean) { currentCountry = @@ -152,8 +164,36 @@ > -
-
List of interactive graphs
+
+
+
List of interactive graphs
+
+ + +
+
+
+
+
Filter by region:
+ {#each regionFilters as filter} +
+ +
{filter.region}
+
+ {/each} +
@@ -165,23 +205,32 @@ {#each iso3 as country} - - - - - - + {#if (getCountryName(country) + .toLowerCase() + .includes(searchFilter.toLowerCase()) || country + .toLowerCase() + .includes(searchFilter.toLowerCase())) && (!regionFilters.some((r) => r.selected) || regionFilters.find((r) => r.region === countryList.findByIso3(country)?.continent)?.selected)} + + + + + + + {/if} {/each}
{getCountryName(country)}{country}
{getCountryName(country)}{country} +
+ +
+
+
+ +
+