diff --git a/public/global.css b/public/global.css index 8e87861..acf4c6c 100644 --- a/public/global.css +++ b/public/global.css @@ -15,6 +15,16 @@ --color-accent: var(--primary-color); --color-accent-hover: var(--primary-color-hover); --color-default-fill: #c8aca5; + + /* Game-specific variables */ + --color-bg-primary: var(--background-color); + --color-bg-secondary: var(--card-background); + --color-bg-hover: #f0f0f0; + --color-text-primary: var(--text-color); + --color-text-secondary: #666; + --color-primary: var(--primary-color); + --color-primary-dark: var(--primary-color-hover); + --color-primary-light: rgba(70, 25, 194, 0.1); } /* Dark theme overrides - using both media query and class-based approach */ @@ -25,6 +35,13 @@ --color-text: #f5f6fa; --color-border: #333842; --color-accent: var(--primary-color); + + /* Game-specific dark theme */ + --color-bg-primary: #181a20; + --color-bg-secondary: #23272e; + --color-bg-hover: #2a2e36; + --color-text-primary: #f5f6fa; + --color-text-secondary: #9ca3af; } } @@ -36,6 +53,13 @@ --color-text: #f5f6fa; --color-border: #333842; --color-accent: var(--primary-color); + + /* Game-specific dark theme */ + --color-bg-primary: #181a20; + --color-bg-secondary: #23272e; + --color-bg-hover: #2a2e36; + --color-text-primary: #f5f6fa; + --color-text-secondary: #9ca3af; } :root.light, @@ -47,6 +71,13 @@ --color-border: #ddd; --color-accent: var(--primary-color); --color-default-fill: #524643; + + /* Game-specific light theme */ + --color-bg-primary: #f8f9fa; + --color-bg-secondary: #ffffff; + --color-bg-hover: #f0f0f0; + --color-text-primary: #333333; + --color-text-secondary: #666; } * { diff --git a/src/App.svelte b/src/App.svelte index 4102792..6e8d409 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -4,12 +4,16 @@ import Router from "svelte-spa-router/Router.svelte"; import Home from "./pages/Home.svelte"; import Preview from "./pages/Preview.svelte"; + import Game from "./pages/Game.svelte"; + import FlagQuiz from "./pages/FlagQuiz.svelte"; import NotFound from "./pages/NotFound.svelte"; import Header from "./components/Header.svelte"; export const routes = { "/": Home, "/preview/:logoName": Preview, + "/game": Game, + "/game/flags": FlagQuiz, "*": NotFound, }; diff --git a/src/components/Header.svelte b/src/components/Header.svelte index 1955620..667f33b 100644 --- a/src/components/Header.svelte +++ b/src/components/Header.svelte @@ -1,5 +1,6 @@
@@ -56,7 +75,7 @@ Logo Gallery icon {#if dropdownOpen}
diff --git a/src/pages/FlagQuiz.svelte b/src/pages/FlagQuiz.svelte new file mode 100644 index 0000000..73a4b98 --- /dev/null +++ b/src/pages/FlagQuiz.svelte @@ -0,0 +1,786 @@ + + +
+ +
+
+ + + + {#if showSettings} +
+ +
+ {/if} + {#if gameState === 'loading'} +
Loading flags...
+ {:else if currentQuestion} +
+
+
Question {score.total + 1}
+
+ {currentQuestion.type === 'flag-to-country' ? 'Which country does this flag belong to?' : 'Which flag belongs to this country?'} +
+
+ + +
+ {#if showResult} +
+ {#if selectedAnswer === correctAnswer} +
✅ Correct!
+ {:else} +
+ ❌ Wrong! + {#if currentQuestion.type === 'flag-to-country'} + The correct answer is: {getCountryName(currentQuestion.correct)}. + {:else} + You selected the {getCountryName(currentQuestion.options[selectedAnswer])} flag. + {/if} +
+ {/if} +
+ {/if} +
+ + {#if currentQuestion.type === 'flag-to-country'} +
+ Flag +
+ +
+ {#each currentQuestion.options as option, index} + + {/each} +
+ {:else} +
+

{getCountryName(currentQuestion.correct)}

+
+ +
+ {#each currentQuestion.options as option, index} + + {/each} +
+ {/if} + + {#if gameState === 'question'} + + {:else if !autoAdvance && gameState === 'answered'} + + {/if} +
+ {/if} + +
+ + + Back to Games +
+
+ + diff --git a/src/pages/Game.svelte b/src/pages/Game.svelte new file mode 100644 index 0000000..83b4665 --- /dev/null +++ b/src/pages/Game.svelte @@ -0,0 +1,216 @@ + + +
+ +
+
+

🎮 Quiz Games

+

Test your knowledge with our interactive quiz games

+ +
+ {#each availableGames as game} + +
{game.icon}
+

{game.title}

+

{game.description}

+
Play Now →
+
+ {/each} +
+ +
+

🚧 Coming Soon

+
+
+ 🏢 + Logo Quiz +
+
+ 🛡️ + Emblem Quiz +
+
+
+
+
+ +