From 011432dd7a67473b6edbfd6d5c82be09b77b3c42 Mon Sep 17 00:00:00 2001 From: chark1es Date: Sat, 18 Jan 2025 04:06:19 -0800 Subject: [PATCH] adds filtering --- src/components/board/Filter.astro | 165 +++++++++++++++++++++++++++- src/components/board/Officers.astro | 29 +++-- 2 files changed, 186 insertions(+), 8 deletions(-) diff --git a/src/components/board/Filter.astro b/src/components/board/Filter.astro index 890703d..a829fb9 100644 --- a/src/components/board/Filter.astro +++ b/src/components/board/Filter.astro @@ -1,3 +1,166 @@ --- +const { filters, currentFilter } = Astro.props; +--- ---- \ No newline at end of file +
+
+
+ { + filters.map((filter) => ( + + )) + } +
+ + diff --git a/src/components/board/Officers.astro b/src/components/board/Officers.astro index 68acd80..62f4b82 100644 --- a/src/components/board/Officers.astro +++ b/src/components/board/Officers.astro @@ -4,7 +4,14 @@ import { Image } from "astro:assets"; import neko from "../../images/neko.png"; import { LiaDotCircle } from "react-icons/lia"; import Officer from "../board/Officer.astro"; +import Filter from "../board/Filter.astro"; import officers from "../../data/officers.json"; + +// Get all unique types and add 'All' option +const typeOrder = ["Executives", "Internal", "Events", "Projects"]; +const types = ["All", ...typeOrder]; + +const currentFilter = "All"; ---
@@ -28,15 +35,23 @@ import officers from "../../data/officers.json"; nibh vivamus tempus molestie tristique quis

-
+ + +
{ officers.map((officer) => ( - +
+ +
)) }