diff --git a/src/routes/flashcards/+page.svelte b/src/routes/flashcards/+page.svelte index 409e5d6..6ba50e1 100644 --- a/src/routes/flashcards/+page.svelte +++ b/src/routes/flashcards/+page.svelte @@ -3,25 +3,68 @@ import Card from "./card.svelte"; import StatsAndButtons from "./StatsAndButtons.svelte"; - import { stats, resetDeck,SetNewDeck } from "./logic.svelte.js"; + import { stats, resetDeck, SetNewDeck } from "./logic.svelte.js"; import { onMount } from "svelte"; import tempelateDeck from "./tempelateDeck.json"; onMount(() => { - SetNewDeck(JSON.parse(localStorage.getItem("deck")) || tempelateDeck); + SetNewDeck(JSON.parse(localStorage.getItem("deck")) || tempelateDeck, true); }); + + let DemoDeck = [ + { + deckName: "Tech", + cards: [ + { Q: "What is Svelte?", a: "A modern JavaScript framework for building user interfaces." }, + { Q: "What is a component?", a: "A reusable piece of UI in Svelte." }, + { Q: "How do you create a reactive variable?", a: "$: variableName = value;" }, + ], + }, + { + deckName: "Math Basics", + cards: [ + { Q: "What is 2 + 2?", a: "4" }, + { Q: "What is the square root of 16?", a: "4" }, + { Q: "What is 5 * 6?", a: "30" }, + ], + }, + { + deckName: "Geography", + cards: [ + { Q: "What is the capital of France?", a: "Paris" }, + { Q: "Which continent is Egypt in?", a: "Africa" }, + { Q: "What is the largest ocean?", a: "Pacific Ocean" }, + ], + }, + ];