diff --git a/src/App.tsx b/src/App.tsx index 11ab660..729b1e8 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -7,7 +7,6 @@ import Index from "./pages/Index"; import Themes from "./pages/Themes"; import Puzzles from "./pages/Puzzles"; import Miscellany from "./pages/Miscellany"; -import SchoolConnect from "./pages/theme-pages/SchoolConnect"; import DiscreteMath from "./pages/theme-pages/DiscreteMath"; import SocialChoice from "./pages/theme-pages/SocialChoice"; import AdvancedAlgorithms from "./pages/theme-pages/AdvancedAlgorithms"; @@ -15,6 +14,13 @@ import DataStructures from "./pages/theme-pages/DataStructures"; import Games from "./pages/theme-pages/Games"; import CardsMath from "./pages/theme-pages/CardsMath"; import BinaryNumberGamePage from "./pages/BinaryNumberGamePage"; +import Foundations from "./pages/theme-pages/discrete-math/Foundations"; +import Proofs from "./pages/theme-pages/discrete-math/Proofs"; +import Counting from "./pages/theme-pages/discrete-math/Counting"; +import Uncertainty from "./pages/theme-pages/discrete-math/Uncertainty"; +import Structures from "./pages/theme-pages/discrete-math/Structures"; +import Numbers from "./pages/theme-pages/discrete-math/Numbers"; +import Graphs from "./pages/theme-pages/discrete-math/Graphs"; import NotFound from "./pages/NotFound"; const queryClient = new QueryClient(); @@ -32,8 +38,14 @@ const App = () => ( } /> {/* Theme-specific routes */} - } /> } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> } /> } /> } /> diff --git a/src/pages/BinaryNumberGamePage.tsx b/src/pages/BinaryNumberGamePage.tsx index a4e524e..90bdf65 100644 --- a/src/pages/BinaryNumberGamePage.tsx +++ b/src/pages/BinaryNumberGamePage.tsx @@ -10,10 +10,10 @@ const BinaryNumberGamePage = () => {
- ← Back to School Connect + ← Back to Foundations

Binary Number Representation

diff --git a/src/pages/Themes.tsx b/src/pages/Themes.tsx index e1a91d0..96e416e 100644 --- a/src/pages/Themes.tsx +++ b/src/pages/Themes.tsx @@ -13,12 +13,6 @@ import ThemeCard from "@/components/ThemeCard"; const Themes = () => { const themes = [ - { - title: "School Connect", - description: "Interactive tools designed to bridge theoretical concepts with practical applications in educational settings.", - path: "/themes/school-connect", - icon: - }, { title: "Discrete Math", description: "Explore fundamental concepts in discrete mathematics through visual and interactive demonstrations.", diff --git a/src/pages/theme-pages/DiscreteMath.tsx b/src/pages/theme-pages/DiscreteMath.tsx index 7e0b99f..906452c 100644 --- a/src/pages/theme-pages/DiscreteMath.tsx +++ b/src/pages/theme-pages/DiscreteMath.tsx @@ -1,11 +1,86 @@ -import ComingSoon from "@/components/ComingSoon"; +import { + Hash, + FileCheck, + Calculator, + Shuffle, + Network, + Binary, + GitBranch +} from "lucide-react"; +import Layout from "@/components/Layout"; +import ThemeCard from "@/components/ThemeCard"; const DiscreteMath = () => { + const subThemes = [ + { + title: "Foundations", + description: "Basic concepts including sets, logic, number systems, and fundamental mathematical structures.", + path: "/themes/discrete-math/foundations", + icon: + }, + { + title: "Proofs", + description: "Learn proof techniques including direct proofs, contradiction, induction, and formal reasoning.", + path: "/themes/discrete-math/proofs", + icon: + }, + { + title: "Counting", + description: "Combinatorics, permutations, combinations, and advanced counting principles.", + path: "/themes/discrete-math/counting", + icon: + }, + { + title: "Uncertainty", + description: "Probability theory, random variables, and statistical reasoning in discrete contexts.", + path: "/themes/discrete-math/uncertainty", + icon: + }, + { + title: "Structures", + description: "Algebraic structures, relations, functions, and abstract mathematical systems.", + path: "/themes/discrete-math/structures", + icon: + }, + { + title: "Numbers", + description: "Number theory, modular arithmetic, cryptography, and computational number theory.", + path: "/themes/discrete-math/numbers", + icon: + }, + { + title: "Graphs", + description: "Graph theory, algorithms on graphs, trees, and network analysis.", + path: "/themes/discrete-math/graphs", + icon: + } + ]; + return ( - + +
+
+
+

Discrete Mathematics

+

+ Explore fundamental concepts in discrete mathematics through visual and interactive demonstrations. +

+
+ +
+ {subThemes.map((theme) => ( + + ))} +
+
+
+
); }; diff --git a/src/pages/theme-pages/SchoolConnect.tsx b/src/pages/theme-pages/SchoolConnect.tsx deleted file mode 100644 index 311d9c9..0000000 --- a/src/pages/theme-pages/SchoolConnect.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import Layout from "@/components/Layout"; - -import InteractiveGallery from "@/components/InteractiveGallery"; - -const SchoolConnect = () => { - return ( - -
- -
-
- ); -}; - -export default SchoolConnect; \ No newline at end of file diff --git a/src/pages/theme-pages/discrete-math/Counting.tsx b/src/pages/theme-pages/discrete-math/Counting.tsx new file mode 100644 index 0000000..ed45dd5 --- /dev/null +++ b/src/pages/theme-pages/discrete-math/Counting.tsx @@ -0,0 +1,12 @@ +import ComingSoon from "@/components/ComingSoon"; + +const Counting = () => { + return ( + + ); +}; + +export default Counting; \ No newline at end of file diff --git a/src/pages/theme-pages/discrete-math/Foundations.tsx b/src/pages/theme-pages/discrete-math/Foundations.tsx new file mode 100644 index 0000000..640a448 --- /dev/null +++ b/src/pages/theme-pages/discrete-math/Foundations.tsx @@ -0,0 +1,119 @@ +import { useState } from "react"; +import { Link } from "react-router-dom"; +import { Search } from "lucide-react"; +import Layout from "@/components/Layout"; +import InteractiveCard from "@/components/InteractiveCard"; +import BinaryNumberGame from "@/components/BinaryNumberGame"; + +interface Interactive { + id: string; + title: string; + description: string; + tags: string[]; + component: React.ComponentType; +} + +const interactives: Interactive[] = [ + { + id: "binary-number-game", + title: "Binary Number Representation", + description: "Learn how numbers are represented in binary (base-2) format through an interactive guessing game.", + tags: ["binary", "numbers", "conversion", "representation"], + component: BinaryNumberGame, + }, +]; + +const Foundations = () => { + const [searchTerm, setSearchTerm] = useState(""); + const [selectedInteractive, setSelectedInteractive] = useState(null); + + const filteredInteractives = interactives.filter( + (interactive) => + interactive.title.toLowerCase().includes(searchTerm.toLowerCase()) || + interactive.description.toLowerCase().includes(searchTerm.toLowerCase()) || + interactive.tags.some((tag) => + tag.toLowerCase().includes(searchTerm.toLowerCase()) + ) + ); + + if (selectedInteractive) { + const InteractiveComponent = selectedInteractive.component; + return ( + +
+
+
+ + ← Back to Discrete Math + +

{selectedInteractive.title}

+
+
+ +
+ +
+
+
+ ); + } + + return ( + +
+
+
+ + ← Back to Discrete Math + +

Foundations

+
+ +
+ + setSearchTerm(e.target.value)} + className="w-full pl-10 pr-4 py-2 border border-outline rounded-md bg-background text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent" + /> +
+ +
+ {filteredInteractives.map((interactive) => ( + setSelectedInteractive(interactive)} + /> + ))} +
+ + {filteredInteractives.length === 0 && ( +
+

+ No interactives found matching "{searchTerm}" +

+
+ )} +
+
+
+ ); +}; + +export default Foundations; \ No newline at end of file diff --git a/src/pages/theme-pages/discrete-math/Graphs.tsx b/src/pages/theme-pages/discrete-math/Graphs.tsx new file mode 100644 index 0000000..f6a9ea6 --- /dev/null +++ b/src/pages/theme-pages/discrete-math/Graphs.tsx @@ -0,0 +1,12 @@ +import ComingSoon from "@/components/ComingSoon"; + +const Graphs = () => { + return ( + + ); +}; + +export default Graphs; \ No newline at end of file diff --git a/src/pages/theme-pages/discrete-math/Numbers.tsx b/src/pages/theme-pages/discrete-math/Numbers.tsx new file mode 100644 index 0000000..7c7b357 --- /dev/null +++ b/src/pages/theme-pages/discrete-math/Numbers.tsx @@ -0,0 +1,12 @@ +import ComingSoon from "@/components/ComingSoon"; + +const Numbers = () => { + return ( + + ); +}; + +export default Numbers; \ No newline at end of file diff --git a/src/pages/theme-pages/discrete-math/Proofs.tsx b/src/pages/theme-pages/discrete-math/Proofs.tsx new file mode 100644 index 0000000..ac5304b --- /dev/null +++ b/src/pages/theme-pages/discrete-math/Proofs.tsx @@ -0,0 +1,12 @@ +import ComingSoon from "@/components/ComingSoon"; + +const Proofs = () => { + return ( + + ); +}; + +export default Proofs; \ No newline at end of file diff --git a/src/pages/theme-pages/discrete-math/Structures.tsx b/src/pages/theme-pages/discrete-math/Structures.tsx new file mode 100644 index 0000000..4023ddb --- /dev/null +++ b/src/pages/theme-pages/discrete-math/Structures.tsx @@ -0,0 +1,12 @@ +import ComingSoon from "@/components/ComingSoon"; + +const Structures = () => { + return ( + + ); +}; + +export default Structures; \ No newline at end of file diff --git a/src/pages/theme-pages/discrete-math/Uncertainty.tsx b/src/pages/theme-pages/discrete-math/Uncertainty.tsx new file mode 100644 index 0000000..10850d9 --- /dev/null +++ b/src/pages/theme-pages/discrete-math/Uncertainty.tsx @@ -0,0 +1,12 @@ +import ComingSoon from "@/components/ComingSoon"; + +const Uncertainty = () => { + return ( + + ); +}; + +export default Uncertainty; \ No newline at end of file