+
diff --git a/src/pages/about.astro b/src/pages/about.astro
index 415f2433..b5d15d42 100644
--- a/src/pages/about.astro
+++ b/src/pages/about.astro
@@ -23,8 +23,7 @@ const meta = {
:is(h2, h3) {
padding: 0.5rem 0.5rem;
- border-radius: 1rem;
- box-shadow: 2px 5px 10px 3px rgba(0, 0, 0, 0.2);
+ box-shadow: inset 2px 5px 10px 3px rgba(0, 0, 0, 0.2);
}
p {
color: grey;
diff --git a/src/pages/crossword.astro b/src/pages/crossword.astro
index 65fa4865..7332397b 100644
--- a/src/pages/crossword.astro
+++ b/src/pages/crossword.astro
@@ -1,8 +1,8 @@
---
-import "@/assets/styles/crossword.css";
+import "@/assets/styles/crossword2.css";
import Back from "@/components/Back.astro";
import Help from "@/components/Help.astro";
-import Puzzle from "@/components/Puzzle.astro";
+import Puzzle2 from "@/components/Puzzle2.astro";
import SharePopover from "@/components/ShareButton.astro";
import BaseLayout from "@/layouts/Base";
@@ -22,5 +22,5 @@ const meta = {
description="Draw words by clicking and dragging through letters!.Words can be in any direction.Matching words will be colored.Use hints to see word directions"
/>
-
+
diff --git a/src/pages/gamePage.astro b/src/pages/gamePage.astro
new file mode 100644
index 00000000..05855cac
--- /dev/null
+++ b/src/pages/gamePage.astro
@@ -0,0 +1,14 @@
+
diff --git a/src/pages/games/[age].astro b/src/pages/games/[age].astro
new file mode 100644
index 00000000..d368368b
--- /dev/null
+++ b/src/pages/games/[age].astro
@@ -0,0 +1,38 @@
+---
+import "@/assets/styles/landing.css";
+
+import Back from "@/components/Back.astro";
+import GamesGrid from "@/components/GamesGrid.astro";
+import { gamesData, getAgeGroupDisplayName } from "@/data/gamesData";
+import BaseLayout from "@/layouts/Base";
+
+// 1. Tell Astro which /games/* pages to build
+export function getStaticPaths() {
+ return Object.entries(gamesData).map(([age, games]) => ({
+ params: { age }, // matches [age].astro
+ props: {
+ games,
+ displayName: getAgeGroupDisplayName(age)
+ }
+ }));
+}
+
+// 2. These come from the matching entry in getStaticPaths()
+const { games, displayName } = Astro.props;
+
+const meta = {
+ title: `Games for ${displayName}`,
+ description: "A fun and interactive learning platform for kids."
+};
+---
+
+
+
+
+
+ {games.length === 0 ?
No games found for this age group.
:
}
+
+
diff --git a/src/pages/index.astro b/src/pages/index.astro
index c82c0bd0..24aec09c 100644
--- a/src/pages/index.astro
+++ b/src/pages/index.astro
@@ -1,12 +1,9 @@
---
-import "@/assets/styles/index.css";
-import FeaturesSection from "@/components/about/FeaturesSection.astro";
-import ExploreLearnSection from "@/components/home/ExploreLearnSection.astro";
-import HeroSection from "@/components/home/HeroSection.astro";
-import KidsLoveSection from "@/components/home/KidsLoveSection.astro";
+//import "@/assets/styles/index.css";
import MobileSplash from "@/components/MobileSplash.astro";
// import TestimonialsSection from "@/components/home/TestimonialsSection.astro";
import BaseLayout from "@/layouts/Base";
+import Landing from "@/pages/landing.astro";
const meta = {
title: "ABCDKBD - A learning corner for little learners.",
@@ -14,11 +11,12 @@ const meta = {
};
---
-
+
-
-
+
+
-
-
+
+
+
diff --git a/src/pages/landing.astro b/src/pages/landing.astro
new file mode 100644
index 00000000..7f409073
--- /dev/null
+++ b/src/pages/landing.astro
@@ -0,0 +1,31 @@
+---
+import "@/assets/styles/landing.css";
+import Categories from "@/components/Categories.astro";
+import Hero from "@/components/Hero.astro";
+---
+
+
+
+
+
+
+
diff --git a/src/pages/poems.astro b/src/pages/poems.astro
index 2080f5fa..e9b764b3 100644
--- a/src/pages/poems.astro
+++ b/src/pages/poems.astro
@@ -1,6 +1,6 @@
---
import "@/assets/styles/poems.css";
-import BackIcon from "@/components/Back.astro";
+import BackButton from "@/components/BackButton.astro";
import Help from "@/components/Help.astro";
import PoemCard from "@/components/PoemCard.astro";
import PoemDialog from "@/components/PoemDialog.astro";
@@ -19,7 +19,7 @@ const meta = {
---
-
+
G3
+
+
+
+
+
@@ -69,14 +74,15 @@ const meta = {
const fontSelector = document.getElementById("fontSelector") as HTMLSelectElement;
const colorPicker = document.getElementById("colorPicker") as HTMLInputElement;
const toggleBg = document.getElementById("toggleBg") as HTMLButtonElement;
- const muteBtn = document.getElementById("muteBtn") as HTMLButtonElement; // Added mute button
+ const muteBtn = document.getElementById("muteBtn") as HTMLButtonElement;
const synth = window.speechSynthesis;
- let lastKey: string | null = null; // Store the last key pressed
- let isMuted = false; // Flag to track mute state
+ let lastKey: string | null = null;
+ let isMuted = false;
+ let currentColor = "#000000"; // Store the current selected color
function speak(text: string) {
- if (isMuted) return; // Do not speak if muted
+ if (isMuted) return;
if (synth.speaking) {
synth.cancel();
@@ -102,17 +108,22 @@ const meta = {
function drawLetter(letter: string, isDoublePress: boolean) {
letterDiv.innerHTML = letter;
- letterDiv.style.color = isDoublePress ? "yellow" : "black";
+ // Use currentColor instead of hardcoded black, unless double press
+ letterDiv.style.color = isDoublePress ? "yellow" : currentColor;
letterDiv.style.animation = "letterPop 0.3s ease-out";
setTimeout(() => {
letterDiv.style.animation = "";
}, 300);
- speak(letter); // Speak the letter immediately after drawing
+ speak(letter);
}
bgSelector?.addEventListener("change", updateBackground);
fontSelector?.addEventListener("change", updateFont);
+
+ // Update color picker to store the selected color and apply immediately
+ colorPicker?.addEventListener("input", updateColor);
colorPicker?.addEventListener("change", updateColor);
+
toggleBg?.addEventListener("click", toggleBackground);
muteBtn?.addEventListener("click", (e: MouseEvent) => {
@@ -126,30 +137,27 @@ const meta = {
(e) => {
e.preventDefault();
const { key } = e;
+ console.log({ key });
- if (/^[0-9]$/.test(key)) {
+ if (/^[a-z]$/i.test(key)) {
const upperKey = key.toUpperCase();
let isDouble = false;
- let doublePress;
+
if (lastKey === upperKey) {
- // Double press detected
isDouble = true;
- doublePress = true;
- } else {
- doublePress = false;
}
drawLetter(upperKey, isDouble);
- lastKey = upperKey; // Update last key
+ lastKey = upperKey;
} else {
- lastKey = null; // Reset last key if not alphabet
+ lastKey = null;
}
},
false
);
function updateBackground() {
- letterContainer.className = "container__hindi";
+ letterContainer.className = "container_hindi";
if (bgSelector.value !== "none") {
letterContainer.classList.add(`bg-${bgSelector.value}`);
}
@@ -160,7 +168,9 @@ const meta = {
}
function updateColor() {
- letterDiv.style.color = colorPicker.value;
+ // Store the selected color and apply it immediately
+ currentColor = colorPicker.value;
+ letterDiv.style.color = currentColor;
}
function toggleBackground() {