diff --git a/.eslintrc.cjs b/.eslintrc.cjs index bf667ed0..1c670451 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -23,6 +23,14 @@ module.exports = { "@typescript-eslint/prefer-for-of": "warn", "@typescript-eslint/triple-slash-reference": "error", "@typescript-eslint/unified-signatures": "warn", + "@typescript-eslint/no-unused-vars": [ + "error", + { + argsIgnorePattern: "^_", + varsIgnorePattern: "^_", + caughtErrorsIgnorePattern: "^_" + } + ], "comma-dangle": "warn", "constructor-super": "error", eqeqeq: ["warn", "always"], diff --git a/.eslintrc.mjs b/.eslintrc.mjs index bf667ed0..1c670451 100755 --- a/.eslintrc.mjs +++ b/.eslintrc.mjs @@ -23,6 +23,14 @@ module.exports = { "@typescript-eslint/prefer-for-of": "warn", "@typescript-eslint/triple-slash-reference": "error", "@typescript-eslint/unified-signatures": "warn", + "@typescript-eslint/no-unused-vars": [ + "error", + { + argsIgnorePattern: "^_", + varsIgnorePattern: "^_", + caughtErrorsIgnorePattern: "^_" + } + ], "comma-dangle": "warn", "constructor-super": "error", eqeqeq: ["warn", "always"], diff --git a/.githooks/pre-commit b/.githooks/pre-commit index 30dae994..26f73a99 100755 --- a/.githooks/pre-commit +++ b/.githooks/pre-commit @@ -25,7 +25,7 @@ if [ $? -ne 0 ]; then exit 1 fi -npm run lint +npm run lint --no-color if [ $? -ne 0 ]; then echo "Lint failed. Commit aborted." exit 1 diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 18590efe..8ee3201d 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,11 +1,11 @@ # ๐Ÿš€ Summary -Fixes # +Fixes # ## ๐Ÿ› ๏ธ Changes -- -- +- +- ## ๐Ÿงช Testing diff --git a/.vscode/settings.json b/.vscode/settings.json index eb0ca7f7..47f6693b 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -15,6 +15,7 @@ "[typescript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, + "typescript.tsdk": "node_modules/typescript/lib", "cSpell.customDictionaries": { "my-words": { "name": "myDictionary", @@ -27,7 +28,6 @@ }, "editor.accessibilitySupport": "off", "git.openRepositoryInParentFolders": "always", - "typescript.updateImportsOnFileMove.enabled": "always", "editor.linkedEditing": true, "cSpell.userWords": ["nojekyll", "testid"], "editor.tabSize": 2, @@ -46,26 +46,5 @@ "css.lint.unknownAtRules": "ignore", "css.lint.unknownProperties": "ignore", "css.hover.documentation": true, - "css.hover.references": true, - "workbench.colorCustomizations": { - "activityBar.activeBackground": "#e98cf9", - "activityBar.background": "#e98cf9", - "activityBar.foreground": "#15202b", - "activityBar.inactiveForeground": "#15202b99", - "activityBarBadge.background": "#fdf9e1", - "activityBarBadge.foreground": "#15202b", - "commandCenter.border": "#15202b99", - "sash.hoverBorder": "#e98cf9", - "statusBar.background": "#e05bf7", - "statusBar.foreground": "#15202b", - "statusBarItem.hoverBackground": "#d72af5", - "statusBarItem.remoteBackground": "#e05bf7", - "statusBarItem.remoteForeground": "#15202b", - "titleBar.activeBackground": "#e05bf7", - "titleBar.activeForeground": "#15202b", - "titleBar.inactiveBackground": "#e05bf799", - "titleBar.inactiveForeground": "#15202b99", - "sideBar.border": "#e98cf9", - "tab.activeBorder": "#e98cf9" - } + "css.hover.references": true } diff --git a/abcd.code-workspace b/abcd.code-workspace index 027b0eab..96946e5b 100644 --- a/abcd.code-workspace +++ b/abcd.code-workspace @@ -132,8 +132,6 @@ "git.enableCommitSigning": false, "git.enableSmartCommit": true, "git.postCommitCommand": "push", - "javascript.preferences.quoteStyle": "double", - "javascript.updateImportsOnFileMove.enabled": "always", "js/ts.implicitProjectConfig.checkJs": true, "peacock.affectSideBarBorder": true, "peacock.color": "#6A3B98", @@ -151,12 +149,12 @@ "package-lock.json": true }, "search.showLineNumbers": true, - "typescript.format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": true, - "typescript.inlayHints.functionLikeReturnTypes.enabled": true, - "typescript.inlayHints.parameterNames.suppressWhenArgumentMatchesName": false, - "typescript.inlayHints.parameterTypes.enabled": true, - "typescript.preferences.quoteStyle": "double", - "typescript.updateImportsOnFileMove.enabled": "always", + "js/ts.format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": true, + "js/ts.inlayHints.functionLikeReturnTypes.enabled": true, + "js/ts.inlayHints.parameterNames.suppressWhenArgumentMatchesName": false, + "js/ts.inlayHints.parameterTypes.enabled": true, + "js/ts.preferences.quoteStyle": "double", + "js/ts.updateImportsOnFileMove.enabled": "always", "window.autoDetectColorScheme": true, "window.title": "${rootNameShort}${separator}${activeEditorShort}${separator}${activeFolderMedium}", "window.zoomLevel": 0.5, @@ -192,7 +190,7 @@ "*.log": "default" }, "zenMode.centerLayout": false, - "cSpell.words": [ ], + "cSpell.words": [], "workbench.editor.limit.excludeDirty": true, "files.readonlyInclude": { ".githooks/**": true @@ -200,12 +198,6 @@ "[xml]": { "editor.defaultFormatter": "redhat.vscode-xml" }, - "github.copilot.chat.agent.terminal.allowList": { - "npm run": true - }, - "github.copilot.chat.agent.terminal.denyList": { - "npm run nuke": true - }, - "folder-color.pathColors": [ ] + "folder-color.pathColors": [] } } \ No newline at end of file diff --git a/astro.config.mjs b/astro.config.mjs index cae81e15..8f9d1c69 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -3,9 +3,9 @@ import partytown from "@astrojs/partytown"; import sitemap from "@astrojs/sitemap"; import { defineConfig } from "astro/config"; -const isProd = process.env.NODE_ENV === 'production'; +const isProd = process.env.NODE_ENV === "production"; -console.log({ isProd }) +console.log({ isProd }); // https://astro.build/config export default defineConfig({ @@ -24,12 +24,15 @@ export default defineConfig({ svg: true }, integrations: [ - isProd ? partytown({ - // https://partytown.qwik.dev/google-tag-manager/#google-analytics-4-ga4 - config: { - forward: ["dataLayer.push"] - } - }) : null, + ...(isProd + ? [ + partytown({ + config: { + forward: ["dataLayer.push"] + } + }) + ] + : []), sitemap(), mdx() ], diff --git a/package-lock.json b/package-lock.json index 976196ba..de0105fe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@recursivezero/abcd", - "version": "3.3.0", + "version": "3.3.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@recursivezero/abcd", - "version": "3.3.0", + "version": "3.3.1", "license": "MIT", "dependencies": { "@astrojs/check": "0.9.4", @@ -14,6 +14,7 @@ "@astrojs/node": "9.1.2", "@astrojs/partytown": "2.1.4", "@astrojs/sitemap": "3.4.1", + "@builder.io/partytown": "0.10.3", "@fontsource/roboto": "5.1.0", "astro": "5.4.1", "astro-social-share": "2.2.0", @@ -38,7 +39,7 @@ "shx": "0.3.4" }, "engines": { - "node": "^20" + "node": "^22" }, "funding": { "type": "individual", @@ -283,6 +284,18 @@ "node": ">=6.9.0" } }, + "node_modules/@builder.io/partytown": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/@builder.io/partytown/-/partytown-0.10.3.tgz", + "integrity": "sha512-N2SWA3c5vEad3rgdAFM3zMb6uc7aXqibkgAz4ijvYzycgQXJ4dE5oH6fGFMXSQWj6ayVlLT1/CmpflYUJHfmQg==", + "deprecated": "Use @qwik.dev/partytown instead", + "bin": { + "partytown": "bin/partytown.cjs" + }, + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/@emmetio/abbreviation": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/@emmetio/abbreviation/-/abbreviation-2.3.3.tgz", diff --git a/package.json b/package.json index a0d21751..3996e2c0 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@recursivezero/abcd", - "version": "3.3.0", - "description": "A website for our kids trial phase of abcdkbd.com", + "version": "3.3.1", + "description": "A website for kids whio want to learn the alphabet in a fun and interactive way. It is built using Astro and TypeScript.", "homepage": "https://abcdkbd.com", "displayName": "abcd", "license": "MIT", @@ -90,11 +90,29 @@ "email": "ciphrox@gmail.com", "github": "ciphrox", "role": "UI Engineer" + }, + { + "name": "Md Shahid Jamal", + "email": "shahidjamal5701@gmail.com", + "github": "ShahidJamal1", + "role": "UI Engineer" } ], "keywords": [ "recursivezero", - "abcd" + "abcd", + "abcdkbd", + "kids", + "education", + "learning", + "fun", + "interactive", + "website", + "astro", + "hindi", + "indian", + "culture", + "typescript" ], "scripts": { "dev": "astro dev", @@ -104,7 +122,8 @@ "astro": "astro", "check": "astro check", "lint": "prettier -w --cache . && prettier -w --cache **/*.astro", - "clean": "rm -rf dist rm -rf build", + "clean": "rm -rf dist build .astro node_modules/.vite .vitepress", + "rebuild": "npm run clean && astro build", "nuke": "shx rm -rf node_modules && rm package-lock.json && npm run clean", "setup:hooks": "sh ./setup-hooks.sh" }, @@ -114,6 +133,7 @@ "@astrojs/node": "9.1.2", "@astrojs/partytown": "2.1.4", "@astrojs/sitemap": "3.4.1", + "@builder.io/partytown": "0.10.3", "@fontsource/roboto": "5.1.0", "astro": "5.4.1", "astro-social-share": "2.2.0", @@ -138,6 +158,12 @@ "shx": "0.3.4" }, "engines": { - "node": "^20" + "node": "^22" + }, + "lint-staged": { + "*.{ts,tsx,js,astro}": [ + "eslint --fix --no-color", + "tsc --pretty false --noEmit" + ] } -} \ No newline at end of file +} diff --git a/public/assets/images/Number.png b/public/assets/images/Number.png new file mode 100644 index 00000000..8d473448 Binary files /dev/null and b/public/assets/images/Number.png differ diff --git a/public/assets/images/OurIndia.png b/public/assets/images/OurIndia.png new file mode 100644 index 00000000..f7db3809 Binary files /dev/null and b/public/assets/images/OurIndia.png differ diff --git a/public/assets/images/about-BuiltYoung.png b/public/assets/images/about-BuiltYoung.png new file mode 100644 index 00000000..9b787253 Binary files /dev/null and b/public/assets/images/about-BuiltYoung.png differ diff --git a/public/assets/images/about-hero.png b/public/assets/images/about-hero.png new file mode 100644 index 00000000..0e15df1e Binary files /dev/null and b/public/assets/images/about-hero.png differ diff --git a/public/assets/images/about-logo.png b/public/assets/images/about-logo.png new file mode 100644 index 00000000..d62bd2f4 Binary files /dev/null and b/public/assets/images/about-logo.png differ diff --git a/public/assets/images/glossary.png b/public/assets/images/glossary.png new file mode 100644 index 00000000..f71f55b4 Binary files /dev/null and b/public/assets/images/glossary.png differ diff --git a/public/assets/images/hero-cookies.png b/public/assets/images/hero-cookies.png new file mode 100644 index 00000000..00db87be Binary files /dev/null and b/public/assets/images/hero-cookies.png differ diff --git a/public/assets/images/hero-kids1.png b/public/assets/images/hero-kids1.png new file mode 100644 index 00000000..0434a18a Binary files /dev/null and b/public/assets/images/hero-kids1.png differ diff --git a/public/assets/images/hero-privacy.png b/public/assets/images/hero-privacy.png new file mode 100644 index 00000000..0a131888 Binary files /dev/null and b/public/assets/images/hero-privacy.png differ diff --git a/public/assets/images/hero-support.png b/public/assets/images/hero-support.png new file mode 100644 index 00000000..63d7e561 Binary files /dev/null and b/public/assets/images/hero-support.png differ diff --git a/public/assets/images/hero-terms.png b/public/assets/images/hero-terms.png new file mode 100644 index 00000000..a5f97f15 Binary files /dev/null and b/public/assets/images/hero-terms.png differ diff --git a/public/assets/images/kids-hero1.png b/public/assets/images/kids-hero1.png new file mode 100644 index 00000000..c254d74e Binary files /dev/null and b/public/assets/images/kids-hero1.png differ diff --git a/public/assets/images/stories.webp b/public/assets/images/stories.webp new file mode 100644 index 00000000..10f128c2 Binary files /dev/null and b/public/assets/images/stories.webp differ diff --git a/public/manifest.webmanifest b/public/manifest.webmanifest index 0cecd491..6e91cc4b 100755 --- a/public/manifest.webmanifest +++ b/public/manifest.webmanifest @@ -38,4 +38,4 @@ "short_name": "ABCDKBD", "start_url": "/", "theme_color": "#2bbc8a" -} \ No newline at end of file +} diff --git a/src/assets/screenshots/light/contact-banner.png b/src/assets/screenshots/light/contact-banner.png new file mode 100644 index 00000000..52ddf050 Binary files /dev/null and b/src/assets/screenshots/light/contact-banner.png differ diff --git a/src/assets/styles/canvas.css b/src/assets/styles/canvas.css index f4de10f2..a4df7960 100644 --- a/src/assets/styles/canvas.css +++ b/src/assets/styles/canvas.css @@ -5,7 +5,7 @@ /* Global Styles for the Canvas Generator */ .canvas-generator { - min-height: 100vh; + min-height: auto; width: 100%; padding: 0; margin: 0; @@ -130,7 +130,8 @@ } .canvas-generator .color-options .color-select option { - background: #1e293b; + background: #0f172a; + color: #ffffff; } .canvas-generator label { @@ -255,4 +256,4 @@ padding: 0.75rem; max-height: 350px; } -} \ No newline at end of file +} diff --git a/src/assets/styles/capital.css b/src/assets/styles/capital.css index 53d456ec..795d6dcd 100644 --- a/src/assets/styles/capital.css +++ b/src/assets/styles/capital.css @@ -345,6 +345,11 @@ box-shadow: none !important; } +.container__search:focus-within { + border: 2px solid light-dark(#667eea, #06ffa5) !important; + box-shadow: 0 0 0 3px light-dark(rgba(102, 126, 234, 0.3), rgba(6, 255, 165, 0.3)) !important; +} + /* Animations */ @keyframes shimmer { 0% { @@ -413,4 +418,4 @@ .search-container { max-width: 100%; } -} \ No newline at end of file +} diff --git a/src/assets/styles/card-layout.css b/src/assets/styles/card-layout.css index 9789fd24..25655a52 100644 --- a/src/assets/styles/card-layout.css +++ b/src/assets/styles/card-layout.css @@ -1,5 +1,7 @@ +/* CARD LAYOUT CSS*/ + .card__inner { - background: var(--background); + background: var(--card-bg, var(--background)); border: 2px solid var(--border); border-radius: 1rem; padding: clamp(1rem, 3vw, 1.25rem); @@ -8,26 +10,51 @@ flex-direction: column; justify-content: space-between; gap: clamp(0.75rem, 2vw, 1rem); - transition: all 0.2s ease; + transition: + transform 0.2s ease, + border-color 0.2s ease, + box-shadow 0.2s ease; + -webkit-backdrop-filter: blur(8px); + backdrop-filter: blur(8px); +} + +/* โ”€โ”€ Card Hover โ”€โ”€ */ +.card:hover .card__inner { + transform: translateY(-4px); + border-color: var(--primary); + box-shadow: var(--shadow-glow, 0 0 20px rgba(124, 58, 237, 0.15)); } +[data-theme="dark"] .card:hover .card__inner { + box-shadow: 0 0 24px rgba(244, 114, 182, 0.2); +} + +/* โ”€โ”€ Category Icon โ”€โ”€ */ .category__icon { font-size: clamp(2rem, 4vw, 2.5rem); margin-bottom: clamp(0.25rem, 2vw, 0.5rem); line-height: 1; } +/* โ”€โ”€ Category Title โ”€โ”€ */ .category__title { - font-size: clamp(1.25rem, 3vw, 1.5rem); - margin-bottom: 0.75rem; + font-size: clamp(1.1rem, 3vw, 1.5rem); + margin-bottom: 0.5rem; + color: var(--heading, var(--text)); + line-height: 1.3; + font-weight: 700; } +/* โ”€โ”€ Category Description โ”€โ”€ */ .category__description { - font-size: clamp(0.9rem, 2vw, 0.95rem); + font-size: clamp(0.85rem, 2vw, 0.95rem); line-height: 1.6; flex-grow: 1; + color: var(--subtext, var(--text-light)); } +/* BUTTONS*/ + .btn { display: flex; align-items: center; @@ -35,49 +62,153 @@ padding: clamp(0.5rem, 2vw, 0.75rem) clamp(0.75rem, 2vw, 2rem); border-radius: 0.75rem; font-weight: 600; - font-size: clamp(0.9rem, 2vw, 1.1rem); - transition: all 0.2s ease; + font-size: clamp(0.85rem, 2vw, 1rem); + transition: + transform 0.2s ease, + background 0.2s ease, + box-shadow 0.2s ease; text-decoration: none; flex: 1; - min-width: 119px; + min-width: 100px; + min-height: 44px; + /* touch friendly */ + border: none; + cursor: pointer; + white-space: nowrap; } -.card__actions { - display: flex; - margin-top: auto; - gap: 4px; +.btn:hover { + transform: translateY(-2px); } -@media (max-width: 768px) { - .btn { - width: 100%; - } +.btn:active { + transform: translateY(0); } +/* Playground Button */ .btn-playground { background: var(--primary); - color: var(--background); + color: #fff; } -.card:hover .card__inner { - transform: translateY(-3px); - border-color: var(--primary); +.btn-playground:hover { + background: var(--primary-light); + box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3); } -.btn:hover { - transform: translateY(-2px); +[data-theme="dark"] .btn-playground:hover { + box-shadow: 0 4px 12px rgba(244, 114, 182, 0.3); } -.btn-playground:hover { +/* Board Button */ +.btn-board { + background: var(--primary); + color: #fff; +} + +.btn-board:hover { background: var(--primary-light); + box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3); } +/* โ”€โ”€ Card Actions Row โ”€โ”€ */ +.card__actions { + display: flex; + margin-top: auto; + gap: 6px; + flex-wrap: wrap; +} + +/* โ”€โ”€ Card Icon โ”€โ”€ */ .card_icon { - font-size: 1.2em; - margin-right: 0.5em; + font-size: 1.1em; + margin-right: 0.4em; + flex-shrink: 0; } -.btn-board { - background: var(--primary); - color: var(--background); +/* TABLET โ€” 1024px*/ +@media (max-width: 1024px) { + .card__inner { + padding: 1rem; + gap: 0.75rem; + } + + .btn { + min-width: 90px; + font-size: 0.88rem; + } +} + +/*MOBILE โ€” 768px*/ +@media (max-width: 768px) { + .card__inner { + padding: 0.875rem; + border-radius: 0.75rem; + gap: 0.6rem; + } + + /* Disable hover lift on touch */ + .card:hover .card__inner { + transform: none; + } + + .card:active .card__inner { + transform: scale(0.98); + border-color: var(--primary); + } + + .category__title { + font-size: 1.05rem; + margin-bottom: 0.35rem; + } + + .category__description { + font-size: 0.85rem; + } + + /* Buttons full width on mobile */ + .card__actions { + flex-direction: column; + gap: 6px; + } + + .btn { + width: 100%; + flex: none; + min-width: unset; + padding: 0.65rem 1rem; + font-size: 0.9rem; + justify-content: center; + } + + .btn:hover { + transform: none; + } + + .btn:active { + transform: scale(0.98); + } +} + +/* SMALL MOBILE โ€” 480px*/ +@media (max-width: 480px) { + .card__inner { + padding: 0.75rem; + gap: 0.5rem; + border-radius: 0.65rem; + } + + .category__icon { + font-size: 1.75rem; + } + + .category__title { + font-size: 1rem; + } + + .btn { + padding: 0.6rem 0.75rem; + font-size: 0.85rem; + border-radius: 0.6rem; + } } diff --git a/src/assets/styles/cards/slider.css b/src/assets/styles/cards/slider.css index b77d0932..da12760e 100644 --- a/src/assets/styles/cards/slider.css +++ b/src/assets/styles/cards/slider.css @@ -51,18 +51,20 @@ } .gallery-controls { - display: flex; - align-items: center; - gap: 20px; - position: relative; + display: grid; + grid-template-columns: var(--nav-button-size) 1fr var(--nav-button-size); gap: 1%; + align-items: start; + /* align to top, buttons will self-align to image center */ margin-left: -4rem; margin-right: -4rem; + position: relative; } .gallery-scroller { width: 100%; height: calc(var(--item-height) + 200px); + /* extra space for item-details below */ overflow-x: auto; overflow-y: hidden; scroll-behavior: smooth; @@ -83,10 +85,12 @@ height: 100%; } +/* โœ… KEY FIX: buttons position themselves at center of image area only */ .nav-button { width: var(--nav-button-size); height: var(--nav-button-size); - margin-bottom: 12%; + margin-top: calc(var(--item-height) / 2 - var(--nav-button-size) / 2 + 2rem); + /* center of image */ border-radius: 50%; background: rgba(129, 140, 248, 0.2); border: none; @@ -241,6 +245,7 @@ --item-gap: 30px; --nav-button-size: 40px; } + .gallery-page { margin-left: 15%; } diff --git a/src/assets/styles/cards/stack.css b/src/assets/styles/cards/stack.css index 59a41169..51930f88 100644 --- a/src/assets/styles/cards/stack.css +++ b/src/assets/styles/cards/stack.css @@ -21,33 +21,54 @@ flex: 1; display: flex; flex-direction: column; - min-height: 100vh; overflow: hidden; } .alphabet-wrapper { width: 100%; - height: 100vh; - padding: 2rem; + min-height: 100vh; + padding: 2rem 1rem; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; + box-sizing: border-box; +} + +.alphabet-header { + text-align: center; + width: 100%; + padding-bottom: 6rem; + + position: relative; + z-index: 10; +} + +.alphabet-title { + font-family: Poppins, sans-serif; + font-size: 31.368px; + font-weight: 600; + line-height: 35.2px; + letter-spacing: -1px; + + color: rgb(130, 143, 239); + + -webkit-text-fill-color: rgb(120, 133, 235); + + margin: 10px 0; + + background: none; } .alphabet-container { position: relative; width: 100%; - max-width: 1200px; - height: 100%; - min-height: 600px; - margin-top: -5rem; + max-width: 700px; display: flex; flex-direction: column; align-items: center; - justify-content: start; - gap: 2rem; + gap: 0; color: #f1f5f9; font: 1em poppins, @@ -67,40 +88,19 @@ --v var(--t); } -.alphabet-header { - text-align: center; - z-index: 100; - margin: 2% 0; - margin-top: 30px; -} - -.alphabet-title { - font-size: 2.5rem; - font-weight: 700; - background: linear-gradient(135deg, #818cf8, #6a7fe0, #3d60eb); - -webkit-background-clip: text; - -webkit-text-fill-color: transparent; - background-clip: text; - margin: 10px; - text-shadow: 0 4px 20px rgba(129, 140, 248, 0.3); -} - .content-area { - position: relative; - margin-top: 2rem; + width: 100%; display: flex; flex-direction: column; align-items: center; - justify-content: start; - width: 100%; + gap: 1.25rem; } +/* โœ… image-container: exact image size only */ .image-container { position: relative; width: 600px; height: 400px; - perspective: 1200px; - transform-style: preserve-3d; display: flex; align-items: center; justify-content: center; @@ -123,18 +123,12 @@ width: 100%; height: 100%; display: flex; - flex-direction: column; align-items: center; justify-content: center; - gap: 1rem; z-index: mod(calc(var(--n) - 1 + var(--i) - var(--k)), var(--n)); transition: z-index var(--t) cubic-bezier(1, -0.9, 0, 1.9); } -.alphabet-item:not(.active) .text-content { - display: none; -} - .item-image { width: 600px; height: 400px; @@ -142,46 +136,41 @@ object-position: center; border-radius: 1rem; border: 2px solid light-dark(transparent, rgba(129, 140, 248, 0.4)); - backdrop-filter: blur(10px); translate: calc(-100% * var(--mov) * sqrt(var(--sin))); rotate: calc((1 - var(--sin)) * var(--a)); will-change: transform, opacity; } +/* โœ… text in normal flow - no absolute positioning needed */ .text-content { display: flex; flex-direction: column; align-items: center; text-align: center; - gap: 0.5rem; + gap: 0.25rem; width: 100%; max-width: 400px; - translate: 0 0; - opacity: var(--top); - transition: opacity calc(0.5 * var(--t)) calc(var(--top) * 0.5 * var(--t)); - position: absolute; - bottom: -120px; } .letter { - font-size: 3rem; + font-size: 2.5rem; font-weight: 900; text-transform: uppercase; - text-shadow: 0 4px 20px rgba(129, 140, 248, 0.3); background: linear-gradient(145deg, #3b4ad1 0%, #6b7bff 50%, #0c33f8 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; line-height: 1; + margin: 0; } .item-desc { - font-size: 1.5rem; + font-size: 1.3rem; text-transform: uppercase; color: light-dark(#000000, #ffffff); font-weight: 600; - text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); line-height: 1.2; + margin: 0; } .nav-buttons { @@ -190,9 +179,8 @@ justify-content: center; align-items: center; z-index: 200; - margin-top: 2rem; + margin-top: 1rem; width: 100%; - position: relative; } .nav-button { @@ -200,12 +188,9 @@ border: none; width: 3.5rem; height: 3.5rem; - margin-top: 6%; border-radius: 50%; background: linear-gradient(135deg, rgba(129, 140, 248, 0.2), rgba(165, 180, 252, 0.1)); color: #4f5ff0; - font-size: 1rem; - font-weight: 900; transition: all 0.3s ease-out; cursor: pointer; border: 2px solid rgba(129, 140, 248, 0.3); @@ -248,28 +233,19 @@ } .keyboard-hint { - position: absolute; - bottom: -2.5rem; - left: 50%; - transform: translateX(-50%); + margin-top: 0.75rem; color: light-dark(#000000, #ffffff); font-size: 0.875rem; text-align: center; - z-index: 1000; padding: 0.5rem 1rem; - background: transparent; - border-radius: 20px; - width: auto; - max-width: 90%; - white-space: nowrap; } .sr-only { position: absolute; - width: 5px; - height: 10px; - padding: 10px; - margin: -10px; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; @@ -294,77 +270,57 @@ } } -/* Responsive Design */ +/* โ”€โ”€ Responsive โ”€โ”€ */ @media (max-width: 1200px) { - .alphabet-wrapper { - padding: 10rem 1rem; - justify-content: flex-start; - } - - .alphabet-title { - font-size: 2rem; - } - .image-container { - width: 400px; - height: 380px; + width: 420px; + height: 300px; } .item-image { - width: 360px; - height: 260px; - } - - .text-content { - bottom: -60px; + width: 400px; + height: 300px; } .nav-buttons { gap: 3rem; - margin-top: 1.5rem; } .nav-button { width: 3rem; height: 3rem; } + + .alphabet-title { + font-size: 2rem; + } } @media (max-width: 768px) { .alphabet-wrapper { padding: 1.5rem 1rem; - justify-content: flex-start; - } - - .alphabet-title { - font-size: 1.75rem; } .image-container { - width: 300px; - height: 360px; + width: 320px; + height: 250px; } .item-image { - width: 260px; - height: 240px; + width: 300px; + height: 250px; } .letter { - font-size: 2.5rem; + font-size: 2rem; } .item-desc { - font-size: 1.25rem; - } - - .text-content { - bottom: -50px; + font-size: 1.1rem; } .nav-buttons { gap: 2rem; - margin-top: 1rem; } .nav-button { @@ -378,54 +334,37 @@ border-width: 0 2px 2px 0; } - .keyboard-hint { - font-size: 0.75rem; - white-space: normal; - padding: 0.5rem; - bottom: 10px; + .alphabet-title { + font-size: 1.75rem; } } @media (max-width: 480px) { .alphabet-wrapper { padding: 1rem 0.5rem; - justify-content: flex-start; - } - - .alphabet-container { - height: 600px; - gap: 0rem; - } - - .alphabet-title { - font-size: 1.5rem; } .image-container { - width: 280px; - height: 340px; + width: 270px; + height: 210px; } .item-image { - width: 240px; - height: 200px; + width: 250px; + height: 210px; } .letter { - font-size: 2rem; + font-size: 1.8rem; } .item-desc { - font-size: 1.1rem; - } - - .text-content { - bottom: -40px; + font-size: 1rem; } .nav-buttons { - gap: 1.5rem; - margin-top: 0.5rem; + gap: 2.5rem; + margin-top: 0.75rem; } .nav-button { @@ -439,9 +378,7 @@ border-width: 0 2px 2px 0; } - .keyboard-hint { - font-size: 0.65rem; - padding: 0.4rem 0.8rem; - bottom: 5px; + .alphabet-title { + font-size: 1.5rem; } -} \ No newline at end of file +} diff --git a/src/assets/styles/common.css b/src/assets/styles/common.css index 2aac239b..90ffc9b7 100644 --- a/src/assets/styles/common.css +++ b/src/assets/styles/common.css @@ -1,3 +1,8 @@ +/* โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + COMMON.CSS โ€” Utilities & Debug Tools +โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• */ + +/* โ”€โ”€ Debug TV Container (dev only) โ”€โ”€ */ .tv { container-type: inline-size; container-name: main; @@ -11,6 +16,7 @@ outline-offset: 0.5rem; } +/* โ”€โ”€ Debug Border Helpers โ”€โ”€ */ .rdb { border: 1px solid red; } @@ -19,8 +25,11 @@ outline: 1px solid red; } +/* โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + ACCESSIBILITY +โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• */ -/* Utilities */ +/* Screen reader only โ€” visually hidden */ .sr-only { position: absolute; width: 1px; @@ -33,13 +42,14 @@ border-width: 0; } -.link__active, -.text__active { - color: hsl(from blue 80 10 10); -} +/* โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + LAYOUT UTILITIES +โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• */ .content { min-height: 100vh; + min-height: 100dvh; + /* dynamic viewport on mobile */ } .layout { @@ -47,27 +57,235 @@ max-height: 100dvh; } +/* โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + TEXT UTILITIES +โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• */ + .txt__center { text-align: center; } +/* FIX: hsl(from ...) is experimental โ€” replaced with plain color */ +.link__active, +.text__active { + color: var(--primary, #4361ee); +} + +/* FIX: text-wrap-style: balance is non-standard โ€” use text-wrap: balance */ +.text__balance { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + overflow-wrap: break-word; + word-break: break-word; +} + +/* Text truncate โ€” single line */ +.text__truncate { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + max-width: 100%; +} + +/* โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + VISIBILITY UTILITIES +โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• */ + +/* FIX: content-visibility: hidden hides from accessibility tree too + Use display:none or visibility:hidden instead */ .hide { - content-visibility: hidden; + display: none; } -::disabled { +/* Visually hide but keep in layout */ +.invisible { + visibility: hidden; pointer-events: none; } +/* โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + INTERACTION UTILITIES +โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• */ + +/* FIX: ::disabled is not valid โ€” :disabled is for form elements only + Use .disabled class instead */ +.disabled, +[disabled], +[aria-disabled="true"] { + pointer-events: none; + opacity: 0.5; + cursor: not-allowed; +} + .no__link { text-decoration: none; + color: inherit; } -.text__balance { - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - text-size-adjust: auto; - text-shadow: #fc0 1px 0 10px; - text-wrap-style: balance; -} \ No newline at end of file +/* โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + FLEX / GRID SHORTCUTS +โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• */ + +.flex { + display: flex; +} + +.flex__center { + display: flex; + align-items: center; + justify-content: center; +} + +.flex__col { + display: flex; + flex-direction: column; +} + +.flex__wrap { + display: flex; + flex-wrap: wrap; +} + +.gap__sm { + gap: 0.5rem; +} + +.gap__md { + gap: 1rem; +} + +.gap__lg { + gap: 1.5rem; +} + +.grid__2 { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 1rem; +} + +.grid__3 { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 1rem; +} + +.grid__4 { + display: grid; + grid-template-columns: repeat(4, 1fr); + gap: 1rem; +} + +/* โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + SPACING UTILITIES +โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• */ + +.mt__sm { + margin-top: 0.5rem; +} + +.mt__md { + margin-top: 1rem; +} + +.mt__lg { + margin-top: 2rem; +} + +.mb__sm { + margin-bottom: 0.5rem; +} + +.mb__md { + margin-bottom: 1rem; +} + +.mb__lg { + margin-bottom: 2rem; +} + +.p__sm { + padding: 0.5rem; +} + +.p__md { + padding: 1rem; +} + +.p__lg { + padding: 2rem; +} + +/* โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + CARD UTILITY +โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• */ + +.card__base { + background: var(--card-bg, var(--bg-card, #fff)); + border: 1px solid var(--border, #dee2e6); + border-radius: var(--border-radius, 12px); + padding: 1.25rem; + box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.1)); + transition: + box-shadow 0.3s ease, + transform 0.2s ease, + border-color 0.3s ease; + -webkit-backdrop-filter: blur(8px); + backdrop-filter: blur(8px); +} + +.card__base:hover { + box-shadow: var(--shadow-glow, 0 0 20px rgba(124, 58, 237, 0.15)); + transform: translateY(-2px); + border-color: var(--primary, #4361ee); +} + +/* โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + MOBILE RESPONSIVE UTILITIES +โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• */ + +/* Hide/show by breakpoint */ +.hide__mobile { + display: block; +} + +.show__mobile { + display: none; +} + +.hide__desktop { + display: none; +} + +@media (max-width: 768px) { + .hide__mobile { + display: none !important; + } + + .show__mobile { + display: block !important; + } + + .hide__desktop { + display: block !important; + } + + /* Grid stacks on mobile */ + .grid__2, + .grid__3, + .grid__4 { + grid-template-columns: 1fr; + } + + /* TV debug container โ€” smaller margin on mobile */ + .tv { + margin-inline: 0.5rem; + } +} + +@media (max-width: 480px) { + .grid__2 { + grid-template-columns: 1fr; + } +} diff --git a/src/assets/styles/contact.css b/src/assets/styles/contact.css index fd18c9e9..7c563775 100644 --- a/src/assets/styles/contact.css +++ b/src/assets/styles/contact.css @@ -1,14 +1,16 @@ .container__contact { box-sizing: border-box; - padding: 4rem 1.5rem; + padding: 1rem 1.5rem 0rem 1.5rem !important; + margin-bottom: 0 !important; } .contact__wrapper { - max-width: 700px; - margin: 2rem auto 0 auto; - border-radius: 1.5rem; - box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); - overflow: hidden; + margin-bottom: 0 !important; +} + +main .content { + padding-bottom: 0 !important; + margin-bottom: 0 !important; } .contact__info { @@ -23,6 +25,16 @@ } } +body:has(.contact-card) { + height: auto; + min-height: 0; +} + +body:has(.contact-card) .body__container { + min-height: 0 !important; + height: auto !important; +} + .info__item { display: flex; align-items: center; diff --git a/src/assets/styles/crossword2.css b/src/assets/styles/crossword2.css index befdd289..bcf73a78 100644 --- a/src/assets/styles/crossword2.css +++ b/src/assets/styles/crossword2.css @@ -1,478 +1,478 @@ -:root { - /* Color Palette */ - --primary-color: #6366f1; - --secondary-color: #06b6d4; - --accent1-color: #f87171; - --accent2-color: #60a5fa; - --accent3-color: #fbbf24; - --accent4-color: #34d399; - --accent5-color: #ec4899; - --accent6-color: #818cf8; - --accent7-color: #f97316; - --accent8-color: #38bdf8; - - /* Text & Background */ - --text-color: #1e293b; - --text-light: #64748b; - --bg-color: #f8fafc; - --bg-dark: #0f172a; - - /* Effects */ - --border-radius: 16px; - --box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1); - --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); - - /* Stats */ - --stats-button-bg: #e2e8f0; - --stats-button-text: #334155; - --stats-button-border: #cbd5e1; - --stats-button-hover: #818cf8; - - /* Custom Word and Button Colors */ - --word-font-color: #0f172a; - --word-found-color: #9ca3af; - --stats-button-clicked: #4ade80; - --stats-button-found: #facc15; -} - -/* Main Layout */ -.puzzle-container { - position: relative; - width: 100%; - max-width: 800px; - margin: 0 auto; - min-height: 100vh; - padding: 20px; - box-sizing: border-box; - touch-action: none; - /* Prevent default touch behaviors */ -} - -/* Puzzle Grid */ -.grid__puzzle { - display: grid; - gap: 12px; - padding: 28px; - border-radius: var(--border-radius); - box-shadow: - var(--box-shadow), - 0 0 0 15px rgba(99, 102, 241, 0.08); - margin: 0 auto; - width: 100%; - max-width: 600px; - aspect-ratio: 1; - border: 6px solid #f1f5f9; - grid-template-columns: repeat(auto-fit, minmax(40px, 1fr)); - touch-action: none; - /* Critical for touch drag */ -} - -.grid__puzzle .cell { - aspect-ratio: 1; - display: flex; - justify-content: center; - align-items: center; - background: #f8fafc; - border: 3px solid #e2e8f0; - border-radius: 12px; - font-size: 3ch; - font-weight: bold; - color: var(--text-color); - transition: var(--transition); - cursor: pointer; - user-select: none; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - -webkit-touch-callout: none; - /* Prevent long-press menu on iOS */ - min-width: 40px; - min-height: 40px; - touch-action: none; -} - -.grid__puzzle .cell:active { - transform: scale(0.95); -} - -.grid__puzzle .cell:hover { - transform: translateY(-3px); - background: #eef2ff; - border-color: var(--primary-color); - box-shadow: - 0 0 16px 4px var(--primary-color), - 0 8px 20px rgba(99, 102, 241, 0.15); -} - -.grid__puzzle .cell.selected { - background: var(--primary-color); - color: white; - transform: scale(1.08); - box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4); - animation: pulse 1.5s infinite alternate; -} - -@keyframes pulse { - from { - box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4); - } - - to { - box-shadow: 0 8px 25px rgba(99, 102, 241, 0.6); - } -} - -.grid__puzzle .cell[class*="word-color-"] { - color: rgb(243, 235, 235); - border-color: inherit; - box-shadow: inset 0px 1px 7px 0px rgba(0, 0, 0, 0.3); -} - -.grid__puzzle .cell.word-color-1 { - background-color: var(--accent7-color); -} - -.grid__puzzle .cell.word-color-2 { - background-color: var(--secondary-color); -} - -.grid__puzzle .cell.word-color-3 { - background-color: var(--accent1-color); -} - -.grid__puzzle .cell.word-color-4 { - background-color: var(--accent4-color); -} - -.grid__puzzle .cell.word-color-5 { - background-color: var(--accent5-color); -} - -.grid__puzzle .cell.word-color-6 { - background-color: var(--accent6-color); -} - -.grid__puzzle .cell.word-color-7 { - background-color: var(--accent3-color); -} - -.grid__puzzle .cell.word-color-8 { - background-color: var(--accent8-color); -} - -/* Word List & Details */ -details { - width: 100%; - border-radius: var(--border-radius); - background-color: rgba(99, 102, 241, 0.05); - box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05); - margin: 20px 0; - border-left: 4px solid var(--primary-color); -} - -details summary { - padding: 16px 24px; - cursor: pointer; - font-weight: 600; - display: flex; - align-items: center; - gap: 12px; - position: relative; - border-bottom: 2px solid rgba(99, 102, 241, 0.1); - margin-bottom: 12px; - font-size: clamp(14px, 2.5vw, 18px); -} - -details summary::after { - content: ""; - position: absolute; - right: 24px; - width: 30px; - height: 30px; - background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); - background-repeat: no-repeat; - background-position: center; - transition: var(--transition); - transform: rotate(180deg); -} - -details summary::-webkit-details-marker { - display: none; -} - -details:not([open]) summary { - border-bottom: none; - margin-bottom: 0; -} - -details:not([open]) summary::after { - transform: rotate(0deg); -} - -/* Word List */ -.word-list { - display: flex; - flex-wrap: wrap; - gap: 12px; - padding: 16px; -} - -.word-list .word { - padding: 8px 16px; - border-radius: 25px; - font-weight: 600; - color: rgb(255, 255, 255); - background-color: rgb(62, 24, 255); - transition: var(--transition); - box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1); - font-size: clamp(12px, 3vw, 16px); -} - -.word-list .word.found { - text-decoration: line-through; - opacity: 0.7; - transform: scale(0.97); -} - -/* Stats Components */ -.stats-container { - display: flex; - gap: 14px; - margin: 32px 0; - justify-content: center; - flex-wrap: wrap; - align-items: center; -} - -.stats-button { - background: linear-gradient(135deg, var(--primary-color), var(--accent6-color)); - border: 2px solid transparent; - border-radius: var(--border-radius); - padding: 14px 28px; - font-weight: 600; - transition: var(--transition); - color: white; - position: relative; - overflow: hidden; - min-width: 80px; - text-align: center; - font-size: clamp(12px, 2.5vw, 16px); -} - -.stats-button:hover { - transform: translateY(-2px); - box-shadow: var(--box-shadow); - background: linear-gradient(135deg, var(--accent2-color), var(--accent8-color)); -} - -.stats-button:nth-child(1) { - background: linear-gradient(135deg, var(--primary-color), var(--accent6-color)); -} - -.stats-button:nth-child(2) { - background: linear-gradient(135deg, var(--accent1-color), var(--accent7-color)); -} - -/* Hint Button Styles */ -.hint-button { - background: none; - border: 2px solid var(--primary-color); - width: 60px; - height: 60px; - cursor: pointer; - transition: var(--transition); - display: flex; - align-items: center; - justify-content: center; - border-radius: 12px; - padding: 0; -} - -.hint-button:hover { - transform: translateY(-2px); - box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3); -} - -.hint-button:active { - transform: scale(0.95); -} - -.hint-button.active { - background: radial-gradient(circle, #fffacd 0%, #ffeb3b 100%); - box-shadow: 0 0 20px 5px rgba(255, 235, 59, 0.6); - border-color: #ffd700; -} - -.hint-button svg, -.hint-button svg path { - transition: var(--transition); -} - -.hint-button.active svg path { - fill: #ff9800; -} - -/* Responsive Styles */ -@media (max-width: 1024px) { - .grid__puzzle { - gap: 8px; - padding: 20px; - grid-template-columns: repeat(auto-fit, minmax(35px, 1fr)); - } - - .grid__puzzle .cell { - font-size: 2.5ch; - border-width: 2px; - min-width: 35px; - min-height: 35px; - } - - .stats-button { - padding: 12px 20px; - min-width: 70px; - } - - .word-list { - gap: 10px; - padding: 12px; - } -} - -@media (max-width: 768px) { - .puzzle-container { - padding: 15px; - } - - .grid__puzzle { - gap: 6px; - padding: 16px; - grid-template-columns: repeat(auto-fit, minmax(30px, 1fr)); - } - - .grid__puzzle .cell { - font-size: 5vw; - border-width: 2px; - min-width: 30px; - min-height: 30px; - border-radius: 8px; - } - - .stats-button { - padding: 10px 16px; - } - - .hint-button { - width: 50px; - height: 50px; - } - - details summary { - padding: 12px 20px; - } -} - -@media (max-width: 480px) { - .puzzle-container { - padding: 10px; - } - - .grid__puzzle { - gap: 4px; - padding: 12px; - grid-template-columns: repeat(auto-fit, minmax(25px, 1fr)); - border-width: 4px; - } - - .grid__puzzle .cell { - font-size: 6vw; - border-width: 2px; - min-width: 25px; - min-height: 25px; - border-radius: 6px; - } - - .stats-container { - gap: 8px; - margin: 20px 0; - } - - .stats-button { - padding: 8px 14px; - min-width: 70px; - font-size: 3.5vw; - } - - .hint-button { - width: 45px; - height: 45px; - } - - .hint-button svg, - .hint-button svg path { - max-width: 24px; - max-height: 24px; - } - - details summary { - padding: 10px 16px; - font-size: 4.5vw; - } - - details summary::after { - width: 24px; - height: 24px; - right: 16px; - } - - .word-list { - gap: 8px; - padding: 10px; - } - - .word-list .word { - padding: 6px 12px; - font-size: 3.5vw; - } -} - -/* Accessibility improvements */ -@media (prefers-reduced-motion: reduce) { - * { - animation: none !important; - transition: none !important; - } -} - -/* Landscape mode optimization for mobile */ -@media (max-width: 768px) and (orientation: landscape) { - .puzzle-container { - display: flex; - flex-direction: column; - padding: 10px; - } - - .grid__puzzle { - max-width: 50vh; - padding: 10px; - } - - .stats-container { - margin: 15px 0; - } - - details { - margin: 10px 0; - } -} - -/* High contrast mode support */ -@media (prefers-contrast: high) { - .grid__puzzle .cell { - border-width: 3px; - } - - .grid__puzzle .cell.selected { - border-color: #000; - outline: 2px solid #fff; - } -} \ No newline at end of file +:root { + /* Color Palette */ + --primary-color: #6366f1; + --secondary-color: #06b6d4; + --accent1-color: #f87171; + --accent2-color: #60a5fa; + --accent3-color: #fbbf24; + --accent4-color: #34d399; + --accent5-color: #ec4899; + --accent6-color: #818cf8; + --accent7-color: #f97316; + --accent8-color: #38bdf8; + + /* Text & Background */ + --text-color: #1e293b; + --text-light: #64748b; + --bg-color: #f8fafc; + --bg-dark: #0f172a; + + /* Effects */ + --border-radius: 16px; + --box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1); + --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); + + /* Stats */ + --stats-button-bg: #e2e8f0; + --stats-button-text: #334155; + --stats-button-border: #cbd5e1; + --stats-button-hover: #818cf8; + + /* Custom Word and Button Colors */ + --word-font-color: #0f172a; + --word-found-color: #9ca3af; + --stats-button-clicked: #4ade80; + --stats-button-found: #facc15; +} + +/* Main Layout */ +.puzzle-container { + position: relative; + width: 100%; + max-width: 800px; + margin: 0 auto; + min-height: 100vh; + padding: 20px; + box-sizing: border-box; + touch-action: none; + /* Prevent default touch behaviors */ +} + +/* Puzzle Grid */ +.grid__puzzle { + display: grid; + gap: 12px; + padding: 28px; + border-radius: var(--border-radius); + box-shadow: + var(--box-shadow), + 0 0 0 15px rgba(99, 102, 241, 0.08); + margin: 0 auto; + width: 100%; + max-width: 600px; + aspect-ratio: 1; + border: 6px solid #f1f5f9; + grid-template-columns: repeat(auto-fit, minmax(40px, 1fr)); + touch-action: none; + /* Critical for touch drag */ +} + +.grid__puzzle .cell { + aspect-ratio: 1; + display: flex; + justify-content: center; + align-items: center; + background: #f8fafc; + border: 3px solid #e2e8f0; + border-radius: 12px; + font-size: 3ch; + font-weight: bold; + color: var(--text-color); + transition: var(--transition); + cursor: pointer; + user-select: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + -webkit-touch-callout: none; + /* Prevent long-press menu on iOS */ + min-width: 40px; + min-height: 40px; + touch-action: none; +} + +.grid__puzzle .cell:active { + transform: scale(0.95); +} + +.grid__puzzle .cell:hover { + transform: translateY(-3px); + background: #eef2ff; + border-color: var(--primary-color); + box-shadow: + 0 0 16px 4px var(--primary-color), + 0 8px 20px rgba(99, 102, 241, 0.15); +} + +.grid__puzzle .cell.selected { + background: var(--primary-color); + color: white; + transform: scale(1.08); + box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4); + animation: pulse 1.5s infinite alternate; +} + +@keyframes pulse { + from { + box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4); + } + + to { + box-shadow: 0 8px 25px rgba(99, 102, 241, 0.6); + } +} + +.grid__puzzle .cell[class*="word-color-"] { + color: rgb(243, 235, 235); + border-color: inherit; + box-shadow: inset 0px 1px 7px 0px rgba(0, 0, 0, 0.3); +} + +.grid__puzzle .cell.word-color-1 { + background-color: var(--accent7-color); +} + +.grid__puzzle .cell.word-color-2 { + background-color: var(--secondary-color); +} + +.grid__puzzle .cell.word-color-3 { + background-color: var(--accent1-color); +} + +.grid__puzzle .cell.word-color-4 { + background-color: var(--accent4-color); +} + +.grid__puzzle .cell.word-color-5 { + background-color: var(--accent5-color); +} + +.grid__puzzle .cell.word-color-6 { + background-color: var(--accent6-color); +} + +.grid__puzzle .cell.word-color-7 { + background-color: var(--accent3-color); +} + +.grid__puzzle .cell.word-color-8 { + background-color: var(--accent8-color); +} + +/* Word List & Details */ +details { + width: 100%; + border-radius: var(--border-radius); + background-color: rgba(99, 102, 241, 0.05); + box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05); + margin: 20px 0; + border-left: 4px solid var(--primary-color); +} + +details summary { + padding: 16px 24px; + cursor: pointer; + font-weight: 600; + display: flex; + align-items: center; + gap: 12px; + position: relative; + border-bottom: 2px solid rgba(99, 102, 241, 0.1); + margin-bottom: 12px; + font-size: clamp(14px, 2.5vw, 18px); +} + +details summary::after { + content: ""; + position: absolute; + right: 24px; + width: 30px; + height: 30px; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); + background-repeat: no-repeat; + background-position: center; + transition: var(--transition); + transform: rotate(180deg); +} + +details summary::-webkit-details-marker { + display: none; +} + +details:not([open]) summary { + border-bottom: none; + margin-bottom: 0; +} + +details:not([open]) summary::after { + transform: rotate(0deg); +} + +/* Word List */ +.word-list { + display: flex; + flex-wrap: wrap; + gap: 12px; + padding: 16px; +} + +.word-list .word { + padding: 8px 16px; + border-radius: 25px; + font-weight: 600; + color: rgb(255, 255, 255); + background-color: rgb(62, 24, 255); + transition: var(--transition); + box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1); + font-size: clamp(12px, 3vw, 16px); +} + +.word-list .word.found { + text-decoration: line-through; + opacity: 0.7; + transform: scale(0.97); +} + +/* Stats Components */ +.stats-container { + display: flex; + gap: 14px; + margin: 32px 0; + justify-content: center; + flex-wrap: wrap; + align-items: center; +} + +.stats-button { + background: linear-gradient(135deg, var(--primary-color), var(--accent6-color)); + border: 2px solid transparent; + border-radius: var(--border-radius); + padding: 14px 28px; + font-weight: 600; + transition: var(--transition); + color: white; + position: relative; + overflow: hidden; + min-width: 80px; + text-align: center; + font-size: clamp(12px, 2.5vw, 16px); +} + +.stats-button:hover { + transform: translateY(-2px); + box-shadow: var(--box-shadow); + background: linear-gradient(135deg, var(--accent2-color), var(--accent8-color)); +} + +.stats-button:nth-child(1) { + background: linear-gradient(135deg, var(--primary-color), var(--accent6-color)); +} + +.stats-button:nth-child(2) { + background: linear-gradient(135deg, var(--accent1-color), var(--accent7-color)); +} + +/* Hint Button Styles */ +.hint-button { + background: none; + border: 2px solid var(--primary-color); + width: 60px; + height: 60px; + cursor: pointer; + transition: var(--transition); + display: flex; + align-items: center; + justify-content: center; + border-radius: 12px; + padding: 0; +} + +.hint-button:hover { + transform: translateY(-2px); + box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3); +} + +.hint-button:active { + transform: scale(0.95); +} + +.hint-button.active { + background: radial-gradient(circle, #fffacd 0%, #ffeb3b 100%); + box-shadow: 0 0 20px 5px rgba(255, 235, 59, 0.6); + border-color: #ffd700; +} + +.hint-button svg, +.hint-button svg path { + transition: var(--transition); +} + +.hint-button.active svg path { + fill: #ff9800; +} + +/* Responsive Styles */ +@media (max-width: 1024px) { + .grid__puzzle { + gap: 8px; + padding: 20px; + grid-template-columns: repeat(auto-fit, minmax(35px, 1fr)); + } + + .grid__puzzle .cell { + font-size: 2.5ch; + border-width: 2px; + min-width: 35px; + min-height: 35px; + } + + .stats-button { + padding: 12px 20px; + min-width: 70px; + } + + .word-list { + gap: 10px; + padding: 12px; + } +} + +@media (max-width: 768px) { + .puzzle-container { + padding: 15px; + } + + .grid__puzzle { + gap: 6px; + padding: 16px; + grid-template-columns: repeat(auto-fit, minmax(30px, 1fr)); + } + + .grid__puzzle .cell { + font-size: 5vw; + border-width: 2px; + min-width: 30px; + min-height: 30px; + border-radius: 8px; + } + + .stats-button { + padding: 10px 16px; + } + + .hint-button { + width: 50px; + height: 50px; + } + + details summary { + padding: 12px 20px; + } +} + +@media (max-width: 480px) { + .puzzle-container { + padding: 10px; + } + + .grid__puzzle { + gap: 4px; + padding: 12px; + grid-template-columns: repeat(auto-fit, minmax(25px, 1fr)); + border-width: 4px; + } + + .grid__puzzle .cell { + font-size: 6vw; + border-width: 2px; + min-width: 25px; + min-height: 25px; + border-radius: 6px; + } + + .stats-container { + gap: 8px; + margin: 20px 0; + } + + .stats-button { + padding: 8px 14px; + min-width: 70px; + font-size: 3.5vw; + } + + .hint-button { + width: 45px; + height: 45px; + } + + .hint-button svg, + .hint-button svg path { + max-width: 24px; + max-height: 24px; + } + + details summary { + padding: 10px 16px; + font-size: 4.5vw; + } + + details summary::after { + width: 24px; + height: 24px; + right: 16px; + } + + .word-list { + gap: 8px; + padding: 10px; + } + + .word-list .word { + padding: 6px 12px; + font-size: 3.5vw; + } +} + +/* Accessibility improvements */ +@media (prefers-reduced-motion: reduce) { + * { + animation: none !important; + transition: none !important; + } +} + +/* Landscape mode optimization for mobile */ +@media (max-width: 768px) and (orientation: landscape) { + .puzzle-container { + display: flex; + flex-direction: column; + padding: 10px; + } + + .grid__puzzle { + max-width: 50vh; + padding: 10px; + } + + .stats-container { + margin: 15px 0; + } + + details { + margin: 10px 0; + } +} + +/* High contrast mode support */ +@media (prefers-contrast: high) { + .grid__puzzle .cell { + border-width: 3px; + } + + .grid__puzzle .cell.selected { + border-color: #000; + outline: 2px solid #fff; + } +} diff --git a/src/assets/styles/draw.css b/src/assets/styles/draw.css index 38ef61c0..7b169a8b 100644 --- a/src/assets/styles/draw.css +++ b/src/assets/styles/draw.css @@ -200,49 +200,51 @@ @media (max-width: 1024px) { .controls { - position: fixed; - right: 0.6rem; - top: 0; - margin-top: 10rem; - flex-direction: column; + position: static; + right: unset; + top: unset; + margin-top: 0; + flex-direction: row; gap: 0.5rem; padding: 0.5rem 0; z-index: 100; background: transparent; - align-items: flex-end; + align-items: center; + flex-wrap: wrap; + justify-content: flex-end; } .control-group { - flex-direction: column; + flex-direction: row; gap: 0.25rem; - align-items: flex-end; + align-items: center; } +} - .control-button { - width: 2.8rem; - height: 2.8rem; - font-size: 1.1rem; - } +.control-button { + width: 2.8rem; + height: 2.8rem; + font-size: 1.1rem; +} - .img-icon, - .img-icon-alt { - width: 1.1rem; - height: 1.1rem; - } +.img-icon, +.img-icon-alt { + width: 1.1rem; + height: 1.1rem; +} - .font-icon, - .font-icon-alt, - .color-icon, - .color-icon-alt, - .bg-icon, - .bg-icon-alt { - font-size: 1.1rem; - } +.font-icon, +.font-icon-alt, +.color-icon, +.color-icon-alt, +.bg-icon, +.bg-icon-alt { + font-size: 1.1rem; +} - .control-item::after, - .reset-button::after { - display: none; - } +.control-item::after, +.reset-button::after { + display: none; } @media (max-width: 768px) { @@ -334,4 +336,4 @@ .controls { z-index: 100; -} +} \ No newline at end of file diff --git a/src/assets/styles/footer.css b/src/assets/styles/footer.css index 272a1182..56cde532 100644 --- a/src/assets/styles/footer.css +++ b/src/assets/styles/footer.css @@ -1,294 +1,336 @@ :root { - --footer-bg: #1f2937; - --footer-text-main: #d1d5db; - --footer-text-secondary: #9ca3af; + --footer-text: #d1d5db; + --footer-text-sub: #9ca3af; --footer-text-hover: #9ee0e7; - --footer-brand-text: #ffffff; - --footer-brand-highlight: #2ed729; - --footer-social-hover: #0ea5e9; - --footer-copyright-link: #9ca3af; - --footer-copyright-link-hover: #0ea5e9; - --footer-border-color: #374151; + --footer-brand: #ffffff; + --footer-highlight: #2ed729; + --footer-link: #9ca3af; + --footer-link-hover: #0ea5e9; + --footer-border: #374151; } [data-theme="dark"] { - --footer-bg: #1f2937; - --footer-text-main: #d1d5db; - --footer-text-secondary: #9ca3af; - --footer-text-hover: #9ee0e7; - --footer-brand-text: #ffffff; - --footer-brand-highlight: #fbbf24; - --footer-social-hover: #0ea5e9; - --footer-copyright-link: #9ca3af; - --footer-copyright-link-hover: #0ea5e9; - --footer-border-color: #374151; + --footer-text: #dff7ff; + --footer-text-sub: #7dd3fc; + --footer-text-hover: #67e8f9; + --footer-brand: #f0fdff; + --footer-highlight: #22d3ee; + --footer-link: #7dd3fc; + --footer-link-hover: #67e8f9; + --footer-border: rgba(34, 211, 238, 0.14); } [data-theme="light"] { - --footer-bg: #bbb; - --footer-text-main: #22223b; - --footer-text-secondary: #560072; - --footer-text-hover: #eb5d9d; - --footer-brand-text: #0f0f10; - --footer-brand-highlight: #c13595; - --footer-social-hover: #0ea5e9; - --footer-copyright-link: #58250b; - --footer-copyright-link-hover: #178bb9; - --footer-border-color: #e5e7eb; + --footer-text: #334155; + --footer-text-sub: #64748b; + --footer-text-hover: #7c3aed; + --footer-brand: #0f172a; + --footer-highlight: #7c3aed; + --footer-link: #64748b; + --footer-link-hover: #7c3aed; + --footer-border: #e2e8f0; } -.footer-theme-toggle { - display: inline-flex; - align-items: center; - gap: 0.75rem; - margin-top: 1.5rem; - padding: 0.5rem 1rem; - background-color: var(--bg-tertiary); - color: var(--primary); - border: 1px solid var(--primary); - border-radius: 8px; - cursor: pointer; - font-size: 0.9rem; - font-weight: 500; - transition: all 0.2s ease; -} +.container__footer { + background: rgba(255, 255, 255, 0.02); + border-top: 2px solid var(--footer-border); -.footer-theme-toggle:hover { - background-color: var(--bg-secondary); - border-color: var(--primary); - color: white; -} + padding: 2rem 2rem 0; + margin-top: 0 !important; + padding-top: 1rem !important; + color: var(--footer-text); + font-size: 0.95rem; + position: relative; + z-index: 1; + width: 100%; + box-sizing: border-box; -[data-theme="system"] .footer-theme-toggle use[href="#icon-system"], -[data-theme="light"] .footer-theme-toggle use[href="#icon-sun"], -[data-theme="dark"] .footer-theme-toggle use[href="#icon-moon"] { - display: block; + display: flex; + flex-direction: column; + align-items: center; + flex-shrink: 0; } -.footer-theme-toggle svg symbol { - display: none; - transition: transform 0.3s ease; -} +/* footer start line */ +.container__footer::before { + content: ""; + position: absolute; + top: -1px; + left: 5%; + width: 90%; + height: 2px; -.footer-theme-toggle use { - display: none; + background: linear-gradient(to right, transparent, #7c3aed, transparent); } -[data-theme="system"] .footer-theme-toggle svg symbol[id="icon-system"], -[data-theme="light"] .footer-theme-toggle svg symbol[id="icon-sun"], -[data-theme="dark"] .footer-theme-toggle svg symbol[id="icon-moon"] { - display: block; +[data-theme="dark"] .container__footer::before { + background: linear-gradient(to right, transparent, #22d3ee, transparent); } -/* Footer background and layout */ -.container__footer { - background: var(--footer-bg); - padding: 2.5rem 2rem 1.5rem 2rem; - color: var(--footer-text-main); - font-size: 1rem; - border-top: 1px solid var(--footer-border-color); +.footer__inner { + width: 100%; + max-width: 1100px; } .footer__main-content { - display: flex; - flex-wrap: wrap; - gap: 2rem; - max-width: 1100px; - margin: 0 auto; + display: grid; + grid-template-columns: 240px 1fr; + gap: 3rem; width: 100%; + padding-bottom: 2rem; + align-items: flex-start; } -.footer__brand-section { - flex: 1 1 220px; - min-width: 220px; +.footer__nav { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 2rem; } -.footer__nav { +.footer__brand-section { display: flex; - - flex-wrap: wrap; - justify-content: space-between; - gap: 2rem; - flex: 3 1 600px; + flex-direction: column; + gap: 0.75rem; } .brand { - font-size: 2rem; - font-weight: 700; - color: var(--footer-brand-text); - margin-bottom: 0.5rem; + font-size: 1.75rem; + font-weight: 800; + color: var(--footer-brand); + line-height: 1; + letter-spacing: -0.5px; } .brand .kbd { - color: var(--footer-brand-highlight); -} - -.container__footer p { - margin: 0.5rem 0 1.5rem 0; - color: var(--footer-text-main); - font-size: 1.2rem; - max-width: 260px; + color: var(--footer-highlight); } -.social { - display: flex; - gap: 1.2rem; +.footer__tagline { + color: var(--footer-text-sub); + font-size: 0.88rem; + line-height: 1.6; + max-width: 220px; } -.social a { - color: var(--footer-text-main); - font-size: 1.5rem; - transition: color 0.2s; +.footer__badge { + display: inline-flex; + align-items: center; + gap: 0.4rem; + background: rgba(34, 211, 238, 0.08); + border: 1px solid var(--footer-border); + border-radius: 20px; + padding: 0.3rem 0.8rem; + font-size: 0.78rem; + font-weight: 600; + color: var(--footer-highlight); + width: fit-content; + margin-top: 0.25rem; } -.social a:hover { - color: var(--footer-social-hover); +[data-theme="light"] .footer__badge { + background: rgba(124, 58, 237, 0.08); + color: var(--footer-highlight); } .footer__nav--item { - flex: 1; - min-width: 150px; + display: flex; + flex-direction: column; + gap: 0; } +/* Button reset + title styles */ .footer__nav--title { + all: unset; + display: flex; + justify-content: space-between; + align-items: center; font-weight: 700; - font-size: 1.8rem; + font-size: 0.78rem; + color: var(--footer-brand); + text-transform: uppercase; + letter-spacing: 1.5px; margin-bottom: 1rem; - color: var(--footer-brand-text); - list-style: none; - pointer-events: none; + width: 100%; + box-sizing: border-box; + -webkit-tap-highlight-color: transparent; + user-select: none; } -.footer__nav--title::-webkit-details-marker { +.footer__nav--title .chevron { display: none; + font-size: 0.75rem; + transition: transform 0.25s ease; + color: var(--footer-text-sub); } -.footer__nav--title .fa-chevron-down { - display: none; +.footer__nav--title[aria-expanded="true"] .chevron { + transform: rotate(180deg); } .footer__nav--links { display: flex; flex-direction: column; - gap: 0.75rem; -} - -@media (min-width: 768px) { - .footer__nav { - flex-direction: row; - } + gap: 0.6rem; } -/* Dark mode styles */ -@media (prefers-color-scheme: dark) { - .footer__nav { - color: #6b7280; - } +.footer__nav--links a { + color: var(--footer-text-sub); + text-decoration: none; + font-size: 0.9rem; + line-height: 1.4; + transition: + color 0.2s ease, + padding-left 0.2s ease; + display: flex; + align-items: center; + gap: 0.4rem; } -.footer__nav--item { - text-decoration: underline; - text-underline-offset: 24x; - transition: color 0.2s; +.footer__nav--links a:hover { + color: var(--footer-text-hover); + padding-left: 4px; } -.footer__nav--item:hover { - color: #3b82f6; +.footer__nav--links a::before { + content: ""; + width: 4px; + height: 4px; + border-radius: 50%; + background: var(--footer-highlight); + flex-shrink: 0; + opacity: 0; + transition: opacity 0.2s ease; } -@media (prefers-color-scheme: dark) { - .footer__nav--item:hover { - color: #60a5fa; - } +.footer__nav--links a:hover::before { + opacity: 1; } -.footer__nav--links a { - color: var(--footer-text-secondary); - text-decoration: none; - font-size: 1.2rem; - transition: color 0.2s; +.copyright { + width: 100%; + padding: 1.25rem 0; + border-top: 1px solid rgba(34, 211, 238, 0.1); + display: flex; + align-items: center; + justify-content: space-between; + flex-wrap: wrap; + gap: 0.75rem; + font-size: 0.82rem; + color: var(--footer-text-sub); } -.footer__nav--links a:hover { - color: var(--footer-text-hover); - text-decoration: underline; +.copyright__text { + flex-shrink: 0; } -.copyright { - text-align: center; - color: var(--footer-text-main); - font-size: 0.95rem; - margin-top: 2rem; - border-top: 1px solid var(--footer-border-color); - padding-top: 1.5rem; +.copyright__links { + display: flex; + align-items: center; + gap: 0.5rem; + flex-wrap: wrap; } -.copyright a { - color: var(--footer-copyright-link); +.copyright__links a { + color: var(--footer-link); text-decoration: none; - margin: 0 0.5rem; + transition: color 0.2s; + white-space: nowrap; } -.copyright a:hover { +.copyright__links a:hover { + color: var(--footer-link-hover); text-decoration: underline; - color: var(--footer-copyright-link-hover); } -/* --- Mobile Accordion Styles --- */ +.sep { + color: var(--footer-border); + user-select: none; +} + +/* โ•โ• MOBILE โ•โ• */ @media (max-width: 768px) { + .container__footer { + padding: 2.5rem 1.2rem 1rem; + } + .footer__main-content { - flex-direction: column; + grid-template-columns: 1fr; + gap: 1.5rem; + text-align: center; + } + + .footer__brand-section { + align-items: center; + } + + .footer__tagline { + max-width: 260px; + font-size: 0.9rem; + line-height: 1.7; } .footer__nav { + display: flex; flex-direction: column; - width: 100%; gap: 0; - flex: initial; + width: 100%; } .footer__nav--item { width: 100%; - border-bottom: 1px solid var(--footer-border-color); - flex: initial; - } - - .footer__nav--item:first-of-type { - border-top: 1px solid var(--footer-border-color); + border-bottom: 1px solid rgba(148, 163, 184, 0.15); } .footer__nav--title { - display: flex; - justify-content: space-between; - align-items: center; - padding: 1.2rem 0; - cursor: pointer; - font-size: 1.1rem; - font-weight: 600; + padding: 1rem 0.25rem; margin-bottom: 0; - pointer-events: auto; - } - - .footer__nav--title .fa-chevron-down { - display: inline-block; - transition: transform 0.2s ease-in-out; + font-size: 0.85rem; + cursor: pointer; } - .footer__nav--item[open]>summary .fa-chevron-down { - transform: rotate(180deg); + .footer__nav--title .chevron { + display: block; } + /* Links hidden on mobile by default โ€” JS sets display:flex */ .footer__nav--links { - padding: 0 0 1.2rem 1rem; - gap: 1rem; + align-items: center; + padding: 0.5rem 0 1rem; + gap: 0.85rem; } .footer__nav--links a { - font-size: 1rem; + font-size: 0.95rem; + min-height: 44px; + justify-content: center; + } + + .footer__nav--links a::before { + display: none; } .copyright { - margin-top: 1rem; + flex-direction: column; + align-items: center; + text-align: center; + gap: 0.75rem; + padding-top: 1.5rem; + padding-bottom: 1rem; + } + + .copyright__links { + justify-content: center; + gap: 0.75rem; + } + + .copyright__links a { font-size: 0.85rem; + min-height: 44px; + display: inline-flex; + align-items: center; } -} \ No newline at end of file + + .sep { + display: none; + } +} diff --git a/src/assets/styles/globals.css b/src/assets/styles/globals.css index 749715f4..8fe25e67 100644 --- a/src/assets/styles/globals.css +++ b/src/assets/styles/globals.css @@ -1,11 +1,34 @@ @import "./custom-fonts.css"; - @import "./common.css"; +/* โ•โ• THEME GRADIENT โ€” outside @layer โ•โ• */ +html { + background-color: #0f172a; + background-image: none; + background-attachment: fixed; + background-size: cover; + min-height: 100%; +} + +html[data-theme="dark"] { + background-color: #020608; + background-image: linear-gradient(180deg, #020608 0%, #031a20 50%, #052e38 100%); +} + +html[data-theme="light"] { + background-color: #ffffff; + background-image: none; +} + +body { + background-color: transparent !important; + background-image: none !important; +} + @layer base { :root { - --primary: #3b82f6; - --primary-light: #60a5fa; + --primary: #7c3aed; + --primary-light: #a78bfa; --secondary: #94a3b8; --background: #0f172a; --text: #f1f5f9; @@ -15,27 +38,82 @@ --header-h: 4rem; --footer-h: 4rem; --sidebar-w: 16rem; - --transition: all 0.3s ease; + --transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; } + /* โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + DARK MODE โ€” Ocean Midnight + #020608 โ†’ #031a20 โ†’ #052e38 + โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• */ [data-theme="dark"] { - --primary: #3b82f6; - --primary-light: #60a5fa; - --secondary: #94a3b8; - --background: #0f172a; - --text: #f1f5f9; - --border: #1e293b; - --card-bg: rgba(37, 53, 79, 0.8); + --primary: #22d3ee; + --primary-light: #67e8f9; + --secondary: #0891b2; + --background: #020608; + --bg-gradient: linear-gradient(180deg, #020608 0%, #031a20 50%, #052e38 100%); + --text: #e0f7fa; + --border: #063540; + --card-bg: rgba(5, 46, 56, 0.7); + + --surface-1: #031a20; + --surface-2: #052e38; + --surface-3: #063540; + --accent: #22d3ee; + --accent-glow: rgba(34, 211, 238, 0.15); + --success: #34d399; + --warning: #fbbf24; + --danger: #f87171; + --muted: #4a9ea8; + --heading: #e0f7fa; + --subtext: #7dd3fc; + + --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4); + --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5); + --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6); + --shadow-glow: 0 0 20px rgba(34, 211, 238, 0.2); + + --select-bg: #031a20; + --select-border: rgba(34, 211, 238, 0.3); + --select-text: #e0f7fa; + --select-option-odd: rgba(5, 46, 56, 0.6); + --select-hover: rgba(34, 211, 238, 0.2); } + /* โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + LIGHT MODE + โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• */ [data-theme="light"] { - --primary: #ba1db8; - --primary-light: #c975c6; + --primary: #7c3aed; + --primary-light: #a78bfa; --secondary: #64748b; --background: #ffffff; + --bg-gradient: none; --text: #0f172a; --border: #e2e8f0; - --card-bg: rgba(255, 255, 255, 0.8); + --card-bg: rgba(255, 255, 255, 0.95); + + --surface-1: #ffffff; + --surface-2: #f8fafc; + --surface-3: #f1f5f9; + --accent: #7c3aed; + --accent-glow: rgba(124, 58, 237, 0.1); + --success: #16a34a; + --warning: #d97706; + --danger: #dc2626; + --muted: #94a3b8; + --heading: #0f172a; + --subtext: #64748b; + + --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08); + --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1); + --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15); + --shadow-glow: 0 0 20px rgba(124, 58, 237, 0.15); + + --select-bg: #ffffff; + --select-border: rgba(125, 211, 252, 0.5); + --select-text: #0f172a; + --select-option-odd: rgba(183, 196, 220, 0.3); + --select-hover: rgba(29, 78, 216, 0.15); } html { @@ -61,40 +139,72 @@ box-sizing: border-box; } + *, + *::before, + *::after { + transition: + background-color 0.3s ease, + color 0.3s ease, + border-color 0.3s ease; + } + + /* โ”€โ”€ Body โ€” gradient background โ”€โ”€ */ + /* html gets gradient โ€” always visible under everything */ + html { + background-color: var(--background) !important; + background-image: var(--bg-gradient, none) !important; + background-attachment: fixed !important; + background-size: cover !important; + } + body { container-type: inline-size; container-name: thread; box-sizing: border-box; line-height: 1.6; min-height: 100vh; - font-family: "Roboto", 'Segoe UI', + font-family: + "Roboto", + "Segoe UI", system-ui, -apple-system, - sans-serif, - system-ui; + sans-serif; font-size: 16px; - background-color: var(--background); + background: transparent; + color: var(--text); transition: var(--transition); } + /* โ”€โ”€ Wave overlay โ”€โ”€ */ body::before { - --size: 45px; - --line: color-mix(in lch, canvasText, transparent 70%); content: ""; height: 100vh; width: 100vw; position: fixed; - background: - linear-gradient(90deg, var(--line) 1px, transparent 1px var(--size)) 50% 50% / var(--size) var(--size), - linear-gradient(var(--line) 1px, transparent 1px var(--size)) 50% 50% / var(--size) var(--size); - mask: linear-gradient(150deg, transparent 50%, white); top: 0; - transform-style: flat; + left: 0; pointer-events: none; + z-index: 0; + background-image: repeating-linear-gradient( + 60deg, + transparent, + transparent 28px, + rgba(34, 211, 238, 0.03) 28px, + rgba(34, 211, 238, 0.03) 29px + ), + repeating-linear-gradient( + -40deg, + transparent, + transparent 34px, + rgba(34, 211, 238, 0.02) 34px, + rgba(34, 211, 238, 0.02) 35px + ); } - :where(.x-link):is(:hover, :focus-visible) { - opacity: 1; + [data-theme="light"] body::before { + background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px), + linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px); + background-size: 45px 45px; } .container { @@ -102,15 +212,24 @@ grid-template-columns: var(--sidebar-w) 1fr; grid-template-rows: var(--header-h) 1fr var(--footer-h); min-height: 100vh; - width: var(--container-width); + width: var(--container-width, min(1200px, 95%)); margin: 0 auto; padding: 0 1rem; } a { - color: light-dark(#151414, white); + color: var(--primary); + text-decoration: none; + transition: + color 0.2s ease, + opacity 0.2s ease; } + a:hover, + a:focus-visible { + color: var(--primary-light); + opacity: 0.9; + } h1 { font-size: 3rem; @@ -118,6 +237,7 @@ line-height: 1; text-align: center; font-family: Roboto; + color: var(--heading, var(--text)); } main { @@ -127,7 +247,8 @@ grid-auto-flow: column; grid-template-areas: "sidebar content"; padding: 1rem; - background-color: color-mix(in srgb, var(--background) 97%, var(--text) 3%); + padding-top: 0; + background-color: transparent; font-size: 1.25rem; line-height: 1.6; @@ -171,82 +292,247 @@ mark { margin-inline: 0.5rem; padding-inline: 0.5rem; + background-color: var(--warning); + color: #1a1a1a; + border-radius: 3px; } + /* โ”€โ”€ Select โ”€โ”€ */ select { width: 100%; - padding: 0.7rem 1.39rem 0.7rem 0.89rem; - font-size: 1.3rem; + padding: 0.7rem 1.4rem 0.7rem 0.9rem; + font-size: 1.1rem; text-transform: capitalize; font-variant: small-caps; letter-spacing: 2px; - border: 2px solid rgba(125, 211, 252, 0.3); + border: 2px solid var(--select-border, rgba(125, 211, 252, 0.3)); border-radius: 0.75rem; - color: light-dark(black, white); + background-color: var(--select-bg, var(--surface-2)); + color: var(--select-text, var(--text)); cursor: pointer; - appearance: base-select; - transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); - box-shadow: - 0 4px 6px -1px rgba(0, 0, 0, 0.1), - 0 2px 4px -1px rgba(0, 0, 0, 0.06); + -webkit-appearance: none; + appearance: none; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2322d3ee' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); + background-repeat: no-repeat; + background-position: right 0.9rem center; + transition: + border-color 0.3s ease, + transform 0.2s ease, + box-shadow 0.3s ease; + box-shadow: var(--shadow-sm); + } + + select:hover { + border-color: var(--primary); + transform: translateY(-1px); + box-shadow: var(--shadow-md); + } + + select:focus { + outline: none; + border-color: var(--primary); + box-shadow: 0 0 0 3px var(--accent-glow, rgba(34, 211, 238, 0.2)); + } + + select option { + padding: 0.5rem 0.75rem; + font-variant: small-caps; + text-transform: capitalize; + letter-spacing: 2px; + background-color: var(--select-bg, var(--surface-2)); + color: var(--select-text, var(--text)); + } + + select option:nth-of-type(odd) { + background-color: var(--select-option-odd, rgba(183, 196, 220, 0.3)); + } + + *:focus { + outline: none; + box-shadow: none; + } + + *:focus-visible { + outline: 2px solid var(--primary); + outline-offset: 2px; + box-shadow: none; + } - &::picker-icon { - color: #806df9; - transition: 0.4s rotate; + /* โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + MOBILE RESPONSIVE + โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• */ + html, + body { + overflow-x: clip; + overflow-y: visible; + max-width: 100vw; + } + + img, + picture, + video, + canvas, + svg { + max-width: 100%; + height: auto; + display: block; + } + + @media (max-width: 1024px) { + :root { + --sidebar-w: 12rem; } - &:open::picker-icon { - rotate: 180deg; + .container { + grid-template-columns: var(--sidebar-w) 1fr; + width: 100%; + padding: 0 0.75rem; } - &:hover { - border-color: #7dd3fc; - transform: translateY(-1px); - box-shadow: - 0 10px 15px -3px rgba(0, 0, 0, 0.1), - 0 4px 6px -2px rgba(0, 0, 0, 0.05); + main { + font-size: 1.1rem; + padding: 0.75rem; } - &:focus { - outline: none; - border-color: #2dd4bf; - box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.3); + h1 { + font-size: 2.25rem; } + } - & option { - padding: 0.5rem 1.25rem 0.5rem 0.75rem; - font-variant: small-caps; - text-transform: capitalize; - letter-spacing: 2px; - background: light-dark(white, #1e293b); - color: light-dark(black, white); - border-bottom: 1px solid rgba(125, 211, 252, 0.1); + @media (max-width: 768px) { + :root { + --header-h: 4rem; + --footer-h: auto; + --sidebar-w: 0px; + } - &:nth-of-type(odd) { - background-color: #b7c4dc80; - } + html { + font-size: clamp(13px, 4vw, 15px); + } - &:hover { - background-color: rgba(29, 78, 216, 0.5); - font-weight: 600; - } + .container { + display: flex; + flex-direction: column; + width: 100%; + padding: 0; + margin: 0; + } - &::checkmark { - order: 1; - margin-left: auto; - content: "โœ”"; - color: #806df9; - } + main { + display: flex; + flex-direction: column; + padding: 0.75rem; + font-size: 1rem; + gap: 0.75rem; + height: auto; + overflow: visible; + } + + .sidebar, + aside, + [class*="sidebar"] { + display: none !important; + } + + .content, + [class*="content"] { + grid-column: 1 / -1; + height: auto; + width: 100%; + } + + h1 { + font-size: 1.75rem; + } + + h2 { + font-size: 1.4rem; + } + + h3 { + font-size: 1.2rem; + } + + [class*="card"], + [class*="grid"], + [class*="cards"] { + grid-template-columns: 1fr !important; + } + + [class*="row"], + [class*="flex-row"] { + flex-wrap: wrap; + } + + [class*="btn-group"], + [class*="button-group"] { + flex-direction: column; + width: 100%; + } + + table { + display: block; + overflow-x: auto; + } + + select { + font-size: 1rem; + padding: 0.6rem 2rem 0.6rem 0.75rem; + } + + footer { + height: auto; + flex-direction: column; + text-align: center; + padding: 1rem; + gap: 0.5rem; } } - ::picker(select) { - appearance: base-select; - border: none; + @media (max-width: 480px) { + html { + font-size: clamp(12px, 4.5vw, 14px); + } + + main { + padding: 0.5rem; + gap: 0.5rem; + } + + h1 { + font-size: 1.5rem; + } + + h2 { + font-size: 1.25rem; + } + + h3 { + font-size: 1.1rem; + } + + [style*="grid-template-columns"], + [class*="grid-2"], + [class*="col-2"] { + grid-template-columns: 1fr !important; + } + + select { + font-size: 0.9rem; + letter-spacing: 0.5px; + } } - *:focus { - outline: none; - box-shadow: none; + @media (hover: none) and (pointer: coarse) { + button, + a, + [role="button"] { + min-height: 44px; + min-width: 44px; + } + + select:hover { + transform: none; + } } -} \ No newline at end of file +} diff --git a/src/assets/styles/header.css b/src/assets/styles/header.css index a5e8d49a..8bdee8a8 100644 --- a/src/assets/styles/header.css +++ b/src/assets/styles/header.css @@ -1,16 +1,25 @@ .header { - position: sticky; + position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; background-color: var(--background); + background-image: var(--bg-gradient, none); + background-size: cover; + background-position: top center; height: var(--header-h); padding: 0 1.5rem; min-height: 5rem; + align-items: center; display: grid; - grid-template-columns: repeat(3, 1fr); + grid-template-columns: auto 1fr auto; gap: 8px; + backdrop-filter: blur(12px); + -webkit-backdrop-filter: blur(12px); + border-bottom: 3px solid rgba(124, 58, 237, 0.18); + box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04); + transition: background-color 0.3s ease; .header__brand { display: flex; @@ -18,6 +27,7 @@ justify-content: space-between; align-items: center; height: 100%; + padding-left: 10px; .logo__link { display: flex; @@ -29,9 +39,15 @@ text-decoration: none; } - .logo { + .logo, + .logo img, + .logo picture { width: 3rem; height: 3rem; + border-radius: 50%; + object-fit: cover; + overflow: hidden; + display: block; } p { @@ -40,19 +56,24 @@ margin-inline-start: 1rem; color: var(--primary); - & span { - color: #6d8c3d; + & .kbd { + color: #120d0d; + } + + [data-theme="dark"] & .kbd { + color: #ffffff; } } } - .nav__links { display: flex; align-items: center; justify-content: center; - gap: 2rem; - list-style: none; + gap: 1.5rem; + position: static; + transform: none; + padding-right: 0; a { color: var(--text); @@ -62,33 +83,51 @@ position: relative; &:hover { - color: var(--primary); - - ::after { - width: 100%; - } + color: #22d3ee; } &::after { - content: ''; + content: ""; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px; - background-color: var(--primary); + background-color: #22d3ee; transition: var(--transition); } + + &:hover::after { + width: 100%; + } } } + a.is-active { + color: #7c3aed !important; + font-weight: 700 !important; + } + + a.is-active::after { + content: ""; + position: absolute; + left: 0; + bottom: -6px; + width: 100%; + height: 3px; + border-radius: 999px; + background: #7c3aed; + } + .action__group { display: flex; flex-direction: row; - align-content: center; - justify-content: end; - flex-wrap: wrap; - gap: 1rem; + align-items: center; + justify-content: flex-end; + flex-wrap: nowrap; + gap: 0.75rem; + margin-left: auto; + justify-self: end; } [slot="header-right"] { @@ -97,23 +136,518 @@ max-width: 33vw; flex-wrap: nowrap; justify-content: flex-end; - border: 2px dashed red; } .controls { flex-shrink: 0; } +} + +/* Hero Search Bar */ +.hero-search { + width: 100%; + background-color: var(--background); + padding: 0.9rem 2rem; + margin-left: 0; + border-bottom: 2px solid rgba(124, 58, 237, 0.14); + box-shadow: 0 3px 10px rgba(124, 58, 237, 0.04); + display: flex; + align-items: center; + position: fixed; + top: var(--header-h, 5rem); + left: 0; + z-index: 999; + backdrop-filter: blur(14px); + -webkit-backdrop-filter: blur(14px); + box-sizing: border-box; +} + +[data-theme="light"] .hero-search { + border-bottom: 1px solid #e2e8f0; +} + +.hero-search__wrap { + display: flex; + align-items: center; + gap: 12px; + width: 100%; + box-sizing: border-box; +} + +.hero-search__box { + display: flex; + flex: 1; + align-items: center; + background: var(--background); + border: 1.5px solid #c4b5fd; + border-radius: 4rem; + padding: 0.75rem 1.5rem; + gap: 0.75rem; + transition: + border-color 0.2s, + box-shadow 0.2s; + box-shadow: none; + width: 100%; + box-sizing: border-box; +} + +[data-theme="dark"] .hero-search__box { + border-color: #18d0ed; + box-shadow: none; +} + +.hero-search__box:focus-within { + border-color: #7c3aed; + box-shadow: none; +} + +[data-theme="dark"] .hero-search__box:focus-within { + border-color: #40def6; + box-shadow: none; +} + +.hero-search__icon { + font-size: 1.1rem; + flex-shrink: 0; +} + +#heroSearch { + border: none !important; + outline: none !important; + font-size: 1rem; + flex: 1; + background: transparent; + color: var(--text); + min-width: 0; + padding: 0; + margin: 0; + box-shadow: none !important; +} + +#heroSearch::placeholder { + color: #a0aec0; + font-size: 1rem; +} + +.hero-search__clear { + background: none; + border: none; + cursor: pointer; + color: #a0aec0; + font-size: 0.9rem; + padding: 0; + line-height: 1; + flex-shrink: 0; +} + +.hero-search__clear:hover { + color: #7c3aed; +} + +.hero-search__dropdown { + position: absolute; + top: calc(100% + 8px); + left: 0; + right: 0; + background: #ffffff; + border: 1.5px solid #ede9fe; + border-radius: 16px; + box-shadow: + 0 16px 40px rgba(124, 58, 237, 0.12), + 0 4px 12px rgba(0, 0, 0, 0.08); + z-index: 99999; + max-height: 420px; + overflow-y: auto; + padding: 6px 0; +} + +[data-theme="dark"] .hero-search__dropdown { + background: #1e293b; + border-color: #334155; +} + +/* Spacer */ +.header-spacer { + height: 0; +} + +/* โ”€โ”€ Hamburger โ”€โ”€ */ +.hamburger { + display: none; + flex-direction: column; + justify-content: center; + align-items: center; + gap: 5px; + width: 2.5rem; + height: 2.5rem; + background: transparent; + border: none; + cursor: pointer; + padding: 4px; + border-radius: 8px; + transition: background 0.2s ease; + z-index: 1100; + flex-shrink: 0; +} + +.hamburger:hover { + background: rgba(255, 255, 255, 0.1); +} + +.hamburger span { + display: block; + width: 22px; + height: 2px; + background-color: var(--text); + border-radius: 2px; + transition: + transform 0.35s cubic-bezier(0.23, 1, 0.32, 1), + opacity 0.25s ease, + width 0.3s ease; + transform-origin: center; +} + +.hamburger.open span:nth-child(1) { + transform: translateY(7px) rotate(45deg); +} + +.hamburger.open span:nth-child(2) { + opacity: 0; + width: 0; +} + +.hamburger.open span:nth-child(3) { + transform: translateY(-7px) rotate(-45deg); +} + +/* Mobile Overlay */ +.mobile-overlay { + display: none; + position: fixed; + inset: 0; + background: rgba(0, 0, 0, 0.5); + z-index: 1040; + opacity: 0; + transition: opacity 0.3s ease; + backdrop-filter: blur(4px); + -webkit-backdrop-filter: blur(4px); + pointer-events: none; +} + +.mobile-overlay.open { + opacity: 1; + pointer-events: auto; +} + +/* โ”€โ”€ Mobile Menu Drawer โ”€โ”€ */ +.mobile-menu { + position: fixed; + top: 0; + right: 0; + width: min(80vw, 300px); + height: 100dvh; + background: var(--background); + background-image: var(--bg-gradient, none); + background-size: cover; + z-index: 1050; + transform: translateX(100%); + transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1); + display: flex; + flex-direction: column; + padding: 1.5rem 1.25rem; + box-shadow: -8px 0 32px rgba(0, 0, 0, 0.4); + overflow-y: auto; + pointer-events: none; +} + +.mobile-menu.open { + transform: translateX(0); + pointer-events: auto; +} + +.mobile-menu__header { + display: flex; + flex-direction: column; + gap: 1.5rem; + margin-bottom: 1rem; + padding-bottom: 1rem; + border-bottom: 1px solid rgba(255, 255, 255, 0.1); +} + +.mobile-logo { + font-size: 1.3rem; + font-weight: 700; + color: var(--primary); + text-decoration: none; +} + +/* โ”€โ”€ Mobile Nav Links โ”€โ”€ */ +.mobile-nav__links { + list-style: none; + display: flex; + flex-direction: column; + gap: 0.35rem; + flex: 1; + padding: 0; + margin: 0; +} + +.mobile-nav__links li { + width: 100%; +} + +.mobile-nav__links li a { + display: flex; + align-items: center; + gap: 0.85rem; + padding: 0.85rem 1rem; + border-radius: 12px; + color: var(--text); + text-decoration: none; + font-weight: 500; + font-size: 1rem; + border-left: 3px solid transparent; + position: relative; + overflow: hidden; + transition: + background 0.25s ease, + color 0.25s ease, + border-color 0.25s ease, + transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), + box-shadow 0.25s ease; +} + +/* Shimmer sweep on hover */ +.mobile-nav__links li a::after { + content: ""; + position: absolute; + top: 0; + left: -100%; + width: 60%; + height: 100%; + background: linear-gradient(120deg, transparent 0%, rgba(124, 58, 237, 0.08) 50%, transparent 100%); + transition: left 0.5s ease; + pointer-events: none; +} + +.mobile-nav__links li a:hover::after { + left: 150%; +} + +/* โ”€โ”€ HOVER โ”€โ”€ */ +.mobile-nav__links li a:hover { + background: linear-gradient(135deg, rgba(124, 58, 237, 0.12) 0%, rgba(139, 92, 246, 0.06) 100%); + color: #7c3aed; + border-left-color: #7c3aed; + transform: translateX(5px); + box-shadow: 0 4px 14px rgba(124, 58, 237, 0.14); +} + +/* โ”€โ”€ ACTIVE (current page) โ”€โ”€ */ +.mobile-nav__links li a.is-active { + background: linear-gradient(135deg, rgba(124, 58, 237, 0.16) 0%, rgba(139, 92, 246, 0.09) 100%); + border-left: 3px solid #7c3aed; + color: #7c3aed; + font-weight: 600; + box-shadow: 0 4px 16px rgba(124, 58, 237, 0.18); +} + +/* Touch hover effect โ€” mobile ke liye */ +.mobile-nav__links li a:active, +.mobile-nav__links li a.touch-hover { + background: linear-gradient(135deg, rgba(124, 58, 237, 0.12) 0%, rgba(139, 92, 246, 0.06) 100%) !important; + color: #7c3aed !important; + border-left-color: #7c3aed !important; + transform: translateX(5px) !important; + box-shadow: 0 4px 14px rgba(124, 58, 237, 0.14) !important; +} + +/* โ”€โ”€ DARK THEME โ”€โ”€ */ +[data-theme="dark"] .mobile-nav__links li a:hover { + background: linear-gradient(135deg, rgba(124, 58, 237, 0.22) 0%, rgba(139, 92, 246, 0.12) 100%); + box-shadow: 0 4px 16px rgba(124, 58, 237, 0.25); +} + +[data-theme="dark"] .mobile-nav__links li a.is-active { + background: linear-gradient(135deg, rgba(124, 58, 237, 0.28) 0%, rgba(139, 92, 246, 0.16) 100%); + box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3); +} + +.mobile-actions { + display: flex; + flex-direction: column; + gap: 0.75rem; + margin-top: 1.5rem; + padding-top: 1.5rem; + border-top: 1px solid rgba(255, 255, 255, 0.1); +} + +.mobile-controls { + display: flex; + align-items: center; + justify-content: space-between; + padding: 0.5rem 0; + font-size: 0.9rem; + color: var(--subtext, var(--text)); +} + +/* โ”€โ”€ Tablet โ”€โ”€ */ +@media (max-width: 1024px) { + .header { + padding: 0 1rem; + + .nav__links { + gap: 1.2rem; + + a { + font-size: 0.9rem; + } + } + + .action__group { + gap: 0.5rem; + } + + [slot="header-right"] { + max-width: 40vw; + } + } - .switch { - background-color: black; - height: 2rem; - width: 2rem; - border-radius: 50%; - cursor: pointer; + .hero-search { + padding: 0.875rem 1.5rem; + } +} + +/* โ”€โ”€ Mobile โ”€โ”€ */ +@media (max-width: 640px) { + .header { + grid-template-columns: 1fr; + padding: 0 1rem; + min-height: 4rem; + height: 4rem; + align-items: center; + gap: 0; + + .nav__links { + display: none; + } + + .action__group { + display: none; + } + + [slot="header-right"] { + display: none; + } + + .header__brand { + justify-content: flex-start; + gap: 0.5rem; + + .logo__link { + font-size: 1.2rem; + gap: 0.5rem; + } + + .logo, + .logo img { + width: 2.2rem; + height: 2.2rem; + border-radius: 50%; + } + + p { + font-size: 1.2rem; + margin-inline-start: 0.25rem; + } + } + } + + .hero-search { + top: 4rem; + padding: 0.75rem 1rem; } .header-spacer { - min-height: 5rem; - border-bottom: 1px dotted grey; + height: 130px; } + + .hamburger { + display: flex; + position: fixed; + top: 0.75rem; + right: 1rem; + z-index: 1100; + } + + .mobile-overlay { + display: block; + } + + .hero-search__box { + padding: 0.6rem 1rem; + } + + #heroSearch { + font-size: 0.95rem; + } +} + +/* โ”€โ”€ Small Mobile โ”€โ”€ */ +@media (max-width: 480px) { + .header { + padding: 0 0.75rem; + min-height: 3.5rem; + height: 3.5rem; + + .header__brand { + .logo__link { + font-size: 1.1rem; + } + + .logo, + .logo img { + width: 2rem; + height: 2rem; + border-radius: 50%; + } + + .logo p { + font-size: 1rem; + } + } + } + + .hamburger { + top: 0.625rem; + right: 0.75rem; + } + + .hero-search { + top: 3.5rem; + padding: 0.625rem 0.75rem; + } + + .header-spacer { + height: 120px; + } + + .mobile-menu { + width: 85vw; + padding: 1.25rem 1rem; + } +} + +.sidebar-mobile-wrapper { + width: 100%; + padding: 0 1rem; + margin-top: 1rem; +} + +[data-theme="light"] .header { + border-bottom: 2px solid rgba(0, 0, 0, 0.1); +} + +[data-theme="light"] .hero-search { + border-bottom: 1px solid rgba(0, 0, 0, 0.08); } \ No newline at end of file diff --git a/src/assets/styles/home.css b/src/assets/styles/home.css index 86d3557c..757d4b35 100644 --- a/src/assets/styles/home.css +++ b/src/assets/styles/home.css @@ -1,3 +1,84 @@ .container__home { box-sizing: border-box; + width: 100%; + max-width: 100%; + overflow-x: hidden; + padding: 1rem; + display: flex; + flex-direction: column; + gap: 1.5rem; +} + +/* โ”€โ”€ Cards Grid โ”€โ”€ */ +.home__grid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); + gap: 1.25rem; +} + +/* โ”€โ”€ Hero Section โ”€โ”€ */ +.home__hero { + text-align: center; + padding: 2rem 1rem; +} + +.home__hero h1 { + font-size: clamp(1.5rem, 5vw, 3rem); + font-weight: 800; + color: var(--heading, var(--text)); + margin-bottom: 0.75rem; +} + +.home__hero p { + font-size: clamp(0.9rem, 2.5vw, 1.1rem); + color: var(--subtext, var(--text)); + max-width: 600px; + margin: 0 auto; +} + +/* TABLET โ€” 1024px*/ +@media (max-width: 1024px) { + .container__home { + padding: 0.75rem; + gap: 1.25rem; + } + + .home__grid { + grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); + gap: 1rem; + } +} + +/* MOBILE โ€” 768px*/ +@media (max-width: 768px) { + .container__home { + padding: 0.5rem; + gap: 1rem; + } + + .home__grid { + grid-template-columns: repeat(2, 1fr); + gap: 0.75rem; + } + + .home__hero { + padding: 1.25rem 0.5rem; + } +} + +/* SMALL MOBILE โ€” 480px*/ +@media (max-width: 480px) { + .container__home { + padding: 0.4rem; + gap: 0.75rem; + } + + .home__grid { + grid-template-columns: 1fr; + gap: 0.6rem; + } + + .home__hero { + padding: 1rem 0.25rem; + } } diff --git a/src/assets/styles/index.css b/src/assets/styles/index.css index 0f51d23c..aebdd406 100644 --- a/src/assets/styles/index.css +++ b/src/assets/styles/index.css @@ -147,4 +147,4 @@ padding-left: 6rem; padding-right: 6rem; } -} \ No newline at end of file +} diff --git a/src/assets/styles/landing.css b/src/assets/styles/landing.css index 396f7f10..f2cd5fd0 100644 --- a/src/assets/styles/landing.css +++ b/src/assets/styles/landing.css @@ -1,464 +1,686 @@ -/* CSS Custom Properties for Theming */ -:root { - --primary: #4361ee; - --primary-light: #4895ef; - --secondary: #3f37c9; - --success: #4cc9f0; - --text-light: #6c757d; - --bg: #ffffff; - --bg-card: #ffffff; - --border: #dee2e6; - --shadow: rgba(0, 0, 0, 0.1); - --header-bg: rgba(255, 255, 255, 0.95); - --transition: all 0.3s ease; - --border-radius: 12px; - --container-width: min(1200px, 95%); - --header-height: 80px; - --footer-height: 200px; -} - - -[data-theme='dark'] { - --primary: #4cc9f0; - --primary-light: #4895ef; - --secondary: #4361ee; - --success: #3a0ca3; - --text-light: #adb5bd; - --bg: #121212; - --bg-card: #1e1e1e; - --border: #343a40; - --shadow: rgba(0, 0, 0, 0.3); - --header-bg: rgba(30, 30, 30, 0.95); -} - - -.container__landing { - color: var(--text); - background-color: var(--bg); - transition: var(--transition); - min-height: 100vh; - overflow-y: auto; -} - - -/* Layout */ -.container__hero { - width: var(--container-width); - margin: 0 auto; - padding: 0 1rem; -} - - -/* Hero Section */ -.hero { - min-height: calc(100vh - var(--header-height)); - display: flex; - align-items: center; - background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%); - color: white; - position: relative; - overflow: hidden; -} - -.hero::before { - content: ''; - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - background-image: url('https://i.pinimg.com/1200x/01/6c/ec/016cec5a9d134483c02417cdb290a4a7.jpg'); - background-position: center; - background-attachment: scroll; - background-size: cover; - object-fit: cover; - background-repeat: no-repeat; - opacity: 0.23; - pointer-events: none; -} - -.hero-content { - position: relative; - z-index: 1; - max-width: 600px; -} - -.hero h1 { - font-size: clamp(2.5rem, 5vw, 4rem); - line-height: 1.2; - margin-bottom: 1.5rem; -} - -.hero p { - font-size: 1.25rem; - margin-bottom: 2rem; - opacity: 0.9; -} - -.cta-button { - display: inline-block; - background-color: white; - color: var(--primary); - padding: 0.75rem 2rem; - border-radius: 50px; - text-decoration: none; - font-weight: 600; - transition: var(--transition); - box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); -} - -.cta-button:hover { - transform: translateY(-3px); - box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3); -} - -/* Age Categories Section */ -.section { - padding: 5rem; -} - -.section-title { - text-align: center; - margin-bottom: 3rem; -} - -.section-title h2 { - font-size: clamp(1.75rem, 4vw, 2.5rem); - color: var(--text); - margin-bottom: 1rem; -} - -.section-title p { - color: var(--text-light); - max-width: 600px; - margin: 0 auto; -} - -.categories-grid { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); - gap: 2rem; -} - -.category-card { - background-color: var(--bg-card); - border-radius: var(--border-radius); - padding: 2rem; - text-align: center; - box-shadow: 0 5px 15px var(--shadow); - transition: var(--transition); - cursor: pointer; - border: 1px solid var(--border); - display: flex; - flex-direction: column; - align-items: center; - gap: 1rem; - - text-decoration: none; - -} - -.category-card:hover { - transform: translateY(-10px); - box-shadow: 0 15px 30px var(--shadow); -} - -.category-icon { - width: 80px; - height: 80px; - border-radius: 50%; - background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); - display: flex; - align-items: center; - justify-content: center; - color: var(--text-dark); - font-size: 2rem; -} - -.category-card h3 { - font-size: 1.5rem; - color: var(--text-light, black); - -} - -.category-card p { - color: var(--text-light); -} - -/* Games Page */ -.games-page { - display: block; - min-height: calc(100vh - var(--header-height)); - padding: 3rem 0; -} - -.page-header { - display: flex; - justify-content: space-between; - align-items: center; - margin-bottom: 2rem; - padding-bottom: 1rem; - border-bottom: 1px solid var(--border); -} - -.back-button { - display: inline-flex; - align-items: center; - gap: 0.5rem; - color: var(--primary); - text-decoration: none; - font-weight: 500; - transition: var(--transition); -} - -.back-button:hover { - gap: 0.75rem; -} - -.games-grid { - display: grid; - grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); - gap: 2rem; -} - -.game-card { - background-color: var(--bg-card); - border-radius: var(--border-radius); - overflow: hidden; - box-shadow: 0 5px 15px var(--shadow); - transition: var(--transition); - border: 1px solid var(--border); -} - -.game-card:hover { - transform: translateY(-5px); - box-shadow: 0 10px 25px var(--shadow); -} - -.game-image { - height: 200px; - background-size: cover; - background-position: center; -} - -.game-content { - padding: 1.5rem; -} - -.game-content h3 { - font-size: 1.25rem; - margin-bottom: 0.5rem; - color: var(--text); -} - -.game-content p { - color: var(--text-light); - margin-bottom: 1rem; - font-size: 0.9rem; - min-height: 3rem; -} - -.game-tags { - display: flex; - flex-wrap: wrap; - gap: 0.5rem; - margin-bottom: 1.5rem; -} - -.game-tag { - background-color: var(--bg-secondary); - color: var(--text-light); - padding: 0.25rem 0.75rem; - border-radius: 50px; - font-size: 0.8rem; -} - -.game-button { - display: inline-block; - width: 100%; - text-align: center; - background-color: var(--primary); - color: white; - padding: 0.75rem; - border-radius: 8px; - text-decoration: none; - font-weight: 500; - transition: var(--transition); -} - -.game-button:hover { - background-color: var(--secondary); -} - -/* Footer */ -footer { - background-color: var(--bg-secondary); - padding: 3rem 0 1.5rem; - margin-top: auto; -} - -.footer-content { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); - gap: 2rem; - margin-bottom: 2rem; -} - -.footer-column h3 { - color: var(--text); - margin-bottom: 1.5rem; - font-size: 1.25rem; -} - -.footer-links { - list-style: none; -} - -.footer-links li { - margin-bottom: 0.75rem; -} - -.footer-links a { - color: var(--text-light); - text-decoration: none; - transition: var(--transition); -} - -.footer-links a:hover { - color: var(--primary); -} - -.social-links { - display: flex; - gap: 1rem; -} - -.social-links a { - display: flex; - align-items: center; - justify-content: center; - width: 40px; - height: 40px; - background-color: var(--bg-card); - color: var(--text); - border-radius: 50%; - transition: var(--transition); -} - -.social-links a:hover { - background-color: var(--primary); - color: white; - transform: translateY(-3px); -} - -.copyright { - text-align: center; - padding-top: 1.5rem; - border-top: 1px solid var(--border); - color: var(--text-light); - font-size: 0.9rem; -} - -/* Responsive Design */ -@media (max-width: 768px) { - .nav-links { - display: none; - } - - .header-content { - justify-content: space-between; - } - - .hero-content { - text-align: center; - } - - .categories-grid { - grid-template-columns: 1fr; - } - - .games-grid { - grid-template-columns: 1fr; - } - - .page-header { - flex-direction: column; - gap: 1rem; - align-items: flex-start; - } -} - -/* Utility Classes */ -.text-center { - text-align: center; -} - -.mt-2 { - margin-top: 2rem; -} - -.animated-button { - /* Basic Button Styling */ - padding: 12px 24px; - font-size: 16px; - font-weight: bold; - color: white; - background-color: #007bff; - /* Primary Blue */ - border: none; - border-radius: 5px; - cursor: pointer; - outline: none; - /* Remove outline on focus */ - position: relative; - /* For pseudo-elements */ - overflow: hidden; - /* Hide overflowing animation */ - - /* Smooth Transitions for Hover */ - transition: all 0.3s ease-in-out; -} - -.animated-button:hover { - background-color: #0056b3; - /* Darker Blue on hover */ - transform: translateY(-2px); - /* Slight lift on hover */ - box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); - /* Subtle shadow */ -} - -.animated-button:active { - background-color: #004085; - /* Even darker blue on click */ - transform: translateY(0); - /* Return to original position */ - box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); - /* Smaller shadow on click */ -} - -/* Click Animation (using pseudo-element for a ripple effect) */ -.animated-button::before { - content: ''; - position: absolute; - top: 50%; - left: 50%; - width: 0; - height: 0; - background: rgba(255, 255, 255, 0.3); - /* White ripple */ - border-radius: 50%; - opacity: 0; - transform: translate(-50%, -50%); - transition: width 0.4s ease-out, height 0.4s ease-out, opacity 0.4s ease-out; -} - -.animated-button:active::before { - width: 200%; - /* Expand ripple */ - height: 200%; - /* Expand ripple */ - opacity: 1; - transition: 0s; - /* Reset transition for immediate effect */ +/* โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + LANDING PAGE โ€” CSS VARIABLES +โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• */ +:root { + --primary: #4361ee; + --primary-light: #4895ef; + --secondary: #3f37c9; + --success: #4cc9f0; + --text-light: #6c757d; + --bg: #ffffff; + --bg-card: #ffffff; + --bg-secondary: #f8fafc; + --border: #dee2e6; + --shadow: rgba(0, 0, 0, 0.1); + --header-bg: rgba(255, 255, 255, 0.95); + --transition: all 0.3s ease; + --border-radius: 12px; + --container-width: min(1200px, 95%); + --header-height: 80px; + --footer-height: 200px; + --text: #1a1a2e; + --text-dark: #0f172a; +} + +/* Dark mode โ€” matches globals.css gradient theme */ +[data-theme="dark"] { + --primary: #22d3ee; + --primary-light: #67e8f9; + --secondary: #0891b2; + + --success: #34d399; + + --text-light: #b8e6ee; + + --bg: transparent; + + --bg-card: linear-gradient(180deg, rgba(3, 26, 32, 0.72) 0%, rgba(5, 46, 56, 0.82) 100%); + + --bg-secondary: rgba(3, 26, 32, 0.72); + + --border: rgba(34, 211, 238, 0.14); + + --shadow: rgba(0, 0, 0, 0.45); + + --header-bg: rgba(2, 6, 8, 0.88); + + --text: #e0f7fa; + + --text-dark: #f0fdff; +} + +/* โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + LANDING CONTAINER +โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• */ +.container__landing { + color: var(--text); + background: transparent; + transition: var(--transition); + min-height: 100vh; + overflow-x: hidden; + overflow-y: auto; +} + +/* โ”€โ”€ Hero Wrapper โ”€โ”€ */ +.container__hero { + width: var(--container-width); + margin: 0 auto; + padding: 0 1rem; +} + +/* โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + HERO SECTION +โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• */ +.hero { + min-height: calc(100vh - var(--header-height)); + display: flex; + align-items: center; + background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%); + color: white; + position: relative; + overflow: hidden; + padding: 2rem 1rem; +} + +.hero::before { + content: ""; + position: absolute; + inset: 0; + background-image: url("https://i.pinimg.com/1200x/01/6c/ec/016cec5a9d134483c02417cdb290a4a7.jpg"); + background-position: center; + background-size: cover; + background-repeat: no-repeat; + opacity: 0.23; + pointer-events: none; +} + +.hero-content { + position: relative; + z-index: 1; + max-width: 600px; + width: 100%; +} + +.hero h1 { + font-size: clamp(2rem, 5vw, 4rem); + line-height: 1.2; + margin-bottom: 1.5rem; + text-align: left; +} + +.hero p { + font-size: clamp(1rem, 2.5vw, 1.25rem); + margin-bottom: 2rem; + opacity: 0.9; + line-height: 1.6; +} + +/* โ”€โ”€ CTA Button โ”€โ”€ */ +.cta-button { + display: inline-block; + background-color: white; + color: var(--primary); + padding: 0.85rem 2rem; + border-radius: 50px; + text-decoration: none; + font-weight: 600; + font-size: clamp(0.9rem, 2vw, 1rem); + transition: var(--transition); + box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); + white-space: nowrap; +} + +.cta-button:hover { + transform: translateY(-3px); + box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3); + color: var(--secondary); +} + +/* โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + SECTIONS +โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• */ +.section { + padding: 4rem 1.5rem; +} + +.section-title { + text-align: center; + margin-bottom: 3rem; +} + +.section-title h2 { + font-size: clamp(1.5rem, 4vw, 2.5rem); + color: var(--text); + margin-bottom: 1rem; + line-height: 1.3; +} + +.section-title p { + color: var(--text-light); + max-width: 600px; + margin: 0 auto; + font-size: clamp(0.9rem, 2vw, 1rem); + line-height: 1.6; +} + +/* โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + CATEGORY CARDS +โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• */ +.categories-grid { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); + gap: 1.5rem; +} + +.category-card { + background-color: var(--bg-card); + border-radius: var(--border-radius); + padding: 1.75rem; + text-align: center; + box-shadow: 0 5px 15px var(--shadow); + transition: var(--transition); + cursor: pointer; + border: 1px solid var(--border); + display: flex; + flex-direction: column; + align-items: center; + gap: 1rem; + text-decoration: none; + -webkit-backdrop-filter: blur(8px); + backdrop-filter: blur(8px); +} + +.category-card:hover { + transform: translateY(-8px); + box-shadow: 0 15px 30px var(--shadow); + border-color: var(--primary); +} + +[data-theme="dark"] .category-card:hover { + box-shadow: 0 0 24px rgba(34, 211, 238, 0.18); +} + +.category-icon { + width: 75px; + height: 75px; + border-radius: 50%; + background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); + display: flex; + align-items: center; + justify-content: center; + font-size: 1.75rem; + flex-shrink: 0; +} + +.category-card h3 { + font-size: clamp(1.1rem, 2.5vw, 1.5rem); + color: var(--text); +} + +.category-card p { + color: var(--text-light); + font-size: 0.9rem; + line-height: 1.5; +} + +/* โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + GAMES PAGE +โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• */ +.games-page { + display: block; + min-height: calc(100vh - var(--header-height)); + padding: 1rem 2rem 2rem 2rem; + width: 100%; + box-sizing: border-box; +} + +.page-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 2rem; + padding-bottom: 1rem; + border-bottom: 1px solid var(--border); + flex-wrap: wrap; + gap: 1rem; +} + +.back-button { + display: inline-flex; + align-items: center; + justify-content: center; + width: 44px; + height: 44px; + border-radius: 50%; + background: linear-gradient(135deg, rgba(3, 26, 32, 0.92), rgba(5, 46, 56, 0.92)); + border: 1px solid rgba(34, 211, 238, 0.16); + color: #22d3ee; + text-decoration: none; + font-weight: 600; + position: relative; + z-index: 1200; + flex-shrink: 0; + transition: all 0.25s ease; + box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); +} + +.back-button:hover { + transform: translateY(-2px); + border-color: rgba(34, 211, 238, 0.35); + box-shadow: + 0 6px 18px rgba(0, 0, 0, 0.45), + 0 0 18px rgba(34, 211, 238, 0.14); +} + +/* โ”€โ”€ Games Grid โ”€โ”€ */ +.games-grid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); + gap: 1.5rem; + padding: 0.5rem 0; +} + +.games-grid--centered { + display: flex; + flex-wrap: wrap; + justify-content: center; + gap: 1.5rem; + padding: 0.5rem 0; +} + +.games-grid--centered .game-card { + width: 380px; + flex: 0 0 380px; + max-width: calc(33.33% - 1rem); +} + +.games-grid--full { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); + gap: 1.5rem; + padding: 0.5rem 0; + width: 100%; +} + +.game-card { + background-color: var(--bg-card); + border-radius: var(--border-radius); + overflow: hidden; + box-shadow: 0 5px 15px var(--shadow); + transition: var(--transition); + border: 1px solid var(--border); + -webkit-backdrop-filter: blur(8px); + backdrop-filter: blur(8px); +} + +.game-card:hover { + transform: translateY(-5px); + box-shadow: 0 10px 25px var(--shadow); + border-color: var(--primary); +} + +.game-image { + height: 180px; + background-size: cover; + background-position: center; +} + +.game-content { + padding: 1.25rem; +} + +.game-content h3 { + font-size: 1.15rem; + margin-bottom: 0.5rem; + color: var(--text); +} + +.game-content p { + color: var(--text-light); + margin-bottom: 1rem; + font-size: 0.88rem; + min-height: 2.5rem; + line-height: 1.5; +} + +.game-tags { + display: flex; + flex-wrap: wrap; + gap: 0.4rem; + margin-bottom: 1.25rem; +} + +.game-tag { + background-color: var(--bg-secondary); + color: var(--text-light); + padding: 0.2rem 0.65rem; + border-radius: 50px; + font-size: 0.78rem; + border: 1px solid var(--border); +} + +.game-button { + display: inline-block; + width: 100%; + text-align: center; + background-color: var(--primary); + color: white; + padding: 0.75rem; + border-radius: 8px; + text-decoration: none; + font-weight: 500; + transition: var(--transition); + min-height: 44px; + display: flex; + align-items: center; + justify-content: center; +} + +.game-button:hover { + background-color: var(--secondary); + transform: translateY(-1px); +} + +/* โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + FOOTER (landing page internal) +โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• */ +footer { + background-color: var(--bg-secondary); + padding: 3rem 0 1.5rem; + margin-top: auto; +} + +.footer-content { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); + gap: 2rem; + margin-bottom: 2rem; +} + +.footer-column h3 { + color: var(--text); + margin-bottom: 1.25rem; + font-size: 1.1rem; +} + +.footer-links { + list-style: none; +} + +.footer-links li { + margin-bottom: 0.65rem; +} + +.footer-links a { + color: var(--text-light); + text-decoration: none; + transition: var(--transition); + font-size: 0.9rem; +} + +.footer-links a:hover { + color: var(--primary); +} + +.social-links { + display: flex; + gap: 0.75rem; + flex-wrap: wrap; +} + +.social-links a { + display: flex; + align-items: center; + justify-content: center; + width: 40px; + height: 40px; + background-color: var(--bg-card); + color: var(--text); + border-radius: 50%; + transition: var(--transition); + border: 1px solid var(--border); +} + +.social-links a:hover { + background-color: var(--primary); + color: white; + transform: translateY(-3px); + border-color: var(--primary); +} + +/* โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + UTILITY CLASSES +โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• */ +.text-center { + text-align: center; +} + +.mt-2 { + margin-top: 2rem; +} + +/* โ”€โ”€ Animated Button โ”€โ”€ */ +.animated-button { + padding: 12px 24px; + font-size: clamp(0.875rem, 2vw, 1rem); + font-weight: 700; + color: white; + background-color: var(--primary); + border: none; + border-radius: 8px; + cursor: pointer; + outline: none; + position: relative; + overflow: hidden; + transition: all 0.3s ease-in-out; + min-height: 44px; +} + +.animated-button:hover { + background-color: var(--secondary); + transform: translateY(-2px); + box-shadow: 0 4px 12px var(--shadow); +} + +.animated-button:active { + transform: translateY(0); + box-shadow: 0 2px 4px var(--shadow); +} + +/* Ripple effect */ +.animated-button::before { + content: ""; + position: absolute; + top: 50%; + left: 50%; + width: 0; + height: 0; + background: rgba(255, 255, 255, 0.3); + border-radius: 50%; + opacity: 0; + transform: translate(-50%, -50%); + transition: + width 0.4s ease-out, + height 0.4s ease-out, + opacity 0.4s ease-out; +} + +.animated-button:active::before { + width: 200%; + height: 200%; + opacity: 1; + transition: 0s; +} + +/* โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + TABLET โ€” 1024px +โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• */ +@media (max-width: 1024px) { + .section { + padding: 3rem 1.25rem; + } + + .categories-grid { + grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); + gap: 1.25rem; + } + + .games-grid { + grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); + gap: 1.25rem; + } + + .hero { + padding: 2rem 1.25rem; + } +} + +/* โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + MOBILE โ€” 768px +โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• */ +@media (max-width: 768px) { + .hero { + min-height: calc(100svh - 4rem); + padding: 2rem 1rem; + align-items: flex-start; + padding-top: 3rem; + } + + .hero-content { + text-align: center; + margin: 0 auto; + } + + .hero h1 { + text-align: center; + } + + .hero p { + text-align: center; + } + + .cta-button { + display: block; + text-align: center; + width: fit-content; + margin: 0 auto; + } + + .section { + padding: 2.5rem 0.75rem; + } + + .section-title { + margin-bottom: 2rem; + } + + .categories-grid { + grid-template-columns: repeat(2, 1fr); + gap: 0.75rem; + } + + .category-card { + padding: 1.25rem 1rem; + gap: 0.75rem; + } + + .category-icon { + width: 60px; + height: 60px; + font-size: 1.5rem; + } + + .category-card h3 { + font-size: 1rem; + } + + .games-grid { + grid-template-columns: 1fr; + gap: 1rem; + } + + .game-image { + height: 160px; + } + + .page-header { + flex-direction: column; + align-items: flex-start; + } + + .footer-content { + grid-template-columns: repeat(2, 1fr); + gap: 1.5rem; + } +} + +/* โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + SMALL MOBILE โ€” 480px +โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• */ +@media (max-width: 480px) { + .hero { + padding: 1.5rem 0.75rem; + padding-top: 2rem; + } + + .section { + padding: 2rem 0.5rem; + } + + .categories-grid { + grid-template-columns: 1fr; + gap: 0.75rem; + } + + .category-card { + flex-direction: row; + text-align: left; + padding: 1rem; + gap: 1rem; + } + + .category-icon { + width: 52px; + height: 52px; + font-size: 1.3rem; + flex-shrink: 0; + } + + .games-grid { + grid-template-columns: 1fr; + } + + .footer-content { + grid-template-columns: 1fr; + } + + .cta-button { + width: 100%; + text-align: center; + padding: 1rem; + } + + .animated-button { + width: 100%; + } +} + +/* โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + TOUCH DEVICES +โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• */ +@media (hover: none) and (pointer: coarse) { + + .category-card:hover, + .game-card:hover, + .cta-button:hover { + transform: none; + } + + .category-card:active { + transform: scale(0.98); + } + + .game-card:active { + transform: scale(0.99); + } } \ No newline at end of file diff --git a/src/assets/styles/letter-card.css b/src/assets/styles/letter-card.css index dc4134fc..5240a1e2 100644 --- a/src/assets/styles/letter-card.css +++ b/src/assets/styles/letter-card.css @@ -34,9 +34,11 @@ margin: 0; line-height: 1.2; /* Adjusted line-height */ - background: linear-gradient(135deg, - var(--character-gradient-start, var(--primary)) 0%, - var(--character-gradient-end, var(--primary-light)) 100%); + background: linear-gradient( + 135deg, + var(--character-gradient-start, var(--primary)) 0%, + var(--character-gradient-end, var(--primary-light)) 100% + ); -webkit-background-clip: text; background-clip: text; color: transparent; @@ -192,9 +194,11 @@ & .card__glow { position: absolute; inset: 0; - background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), - color-mix(in srgb, var(--primary) 10%, transparent) 0%, - transparent 60%); + background: radial-gradient( + circle at var(--mouse-x, 50%) var(--mouse-y, 50%), + color-mix(in srgb, var(--primary) 10%, transparent) 0%, + transparent 60% + ); opacity: 0; transition: opacity 0.3s ease; pointer-events: none; @@ -213,4 +217,4 @@ font-size: 0.875rem; } } -} \ No newline at end of file +} diff --git a/src/assets/styles/map/popup.css b/src/assets/styles/map/popup.css index 7e2e107b..bd4c4e19 100644 --- a/src/assets/styles/map/popup.css +++ b/src/assets/styles/map/popup.css @@ -1,87 +1,42 @@ -.container__popover { - container: setting/inline-size; - - .state-popup__close { - position: absolute; - anchor-name: --setting; - display: flex; - top: 1rem; - right: 0.5rem; - width: max-content; - cursor: pointer; - font-size: 3.5rem; - background: none; - border: none; - color: #888; - z-index: 2; - transition: color 0.2s; - - &:hover { - color: #1976d2; - background-color: white; - } +.state-popup__overlay { + display: none; + position: fixed; + inset: 0; + background: rgba(0, 0, 0, 0.45); + backdrop-filter: blur(2px); + z-index: 999; + + &.is-open { + display: block; } +} - .state-popup { - position: fixed; - position-anchor: --setting; - top: calc(anchor(bottom) + 15px); - right: calc(anchor(left) + 10px); - justify-self: anchor-center; - height: 26rem; - background-color: #fff; - border-radius: 4px; - padding: 0.74rem; - transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); - color: color(xyz 0 0 1); - - &::backdrop { - background-color: hsl(0 0% 10% / 0.5); - backdrop-filter: blur(2px); - } - - .state-popup__content { - display: grid; - grid-auto-flow: row; - gap: 0.5rem; - width: 20rem; - } - - &[popover] { - inset: unset; - width: auto; - bottom: 0; - margin: auto; - overflow-y: hidden; - padding: 1rem; - border: solid; - border-radius: 1rem; - opacity: 0; - visibility: hidden; - transition: - translate 0.7s ease-out, - display 0.7s ease-out allow-discrete, - overlay 0.7s ease-out allow-discrete, - height 0.5s ease-in-out; - translate: 0 -2rem; - - &:popover-open { - opacity: 1; - visibility: visible; - translate: 0 0; - top: 40px; - min-height: 26rem; - justify-content: center; - } - - @starting-style { - opacity: 0; - visibility: hidden; - } - } +.state-popup { + display: none; + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + z-index: 1000; + background: #fff; + border-radius: 1rem; + border: 2px solid #1976d2; + padding: 1rem; + width: 22rem; + max-width: 90vw; + box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18); + + &.is-open { + display: block; } } +.state-popup__content { + display: grid; + grid-auto-flow: row; + gap: 0.5rem; +} + .state-popup__header { display: flex; align-items: flex-start; @@ -103,13 +58,19 @@ .state-popup__close { flex: 0 0 auto; - margin-left: 1rem; -} + font-size: 2.5rem; + background: none; + border: none; + color: #888; + cursor: pointer; + line-height: 1; + padding: 0; + margin-left: 0.5rem; + transition: color 0.2s; -.state-popup { - width: auto; - min-width: 260px; - max-width: 700px; + &:hover { + color: #1976d2; + } } .state-popup__image { @@ -148,61 +109,32 @@ cursor: pointer; margin-top: 0.5rem; transition: background 0.2s; + + &:hover { + background: #1565c0; + } } @media (max-width: 600px) { - .container__popover { - .state-popup { - width: 80vw; - padding: 1.5rem 1rem; - - &[popover] { - min-height: 16rem; - - &:popover-open { - min-height: 20rem; - width: 30%; - } - } - - .state-popup__content { - width: 100%; - gap: 0.75rem; - } - - .state-popup__image { - width: 100%; - max-height: 200px; - object-fit: cover; - border-radius: 0.6rem; - } - - .state-popup__info { - font-size: 1rem; - } - - .state-popup__name { - font-size: 1.3rem; - margin-bottom: 0.5rem; - } - - .state-popup__buttons { - flex-direction: column; - gap: 0.5rem; - } - - .state-popup__button { - font-size: 1rem; - padding: 0.7rem; - } - - .state-popup__close { - font-size: 2rem; - top: 0.9rem; - right: 0; - width: 2.5rem; - height: 2.5rem; - } - } + .state-popup { + width: 85vw; + padding: 1rem; + } + + .state-popup__name { + font-size: 1.3rem; + } + + .state-popup__close { + font-size: 2rem; + } + + .state-popup__info { + font-size: 1rem; + } + + .state-popup__button { + font-size: 1rem; + padding: 0.7rem; } } \ No newline at end of file diff --git a/src/assets/styles/menu.css b/src/assets/styles/menu.css index bdebb69e..1c3d06f9 100644 --- a/src/assets/styles/menu.css +++ b/src/assets/styles/menu.css @@ -37,10 +37,10 @@ } [popover] .nav--list__item { - display: flex; - align-items: center; - padding: 0.25rem; - transition: all 0.2s ease; + transition: + transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), + filter 0.35s ease; + border-radius: 0.75rem; } [popover] .nav--list__item a { @@ -50,35 +50,40 @@ gap: 0.5rem; padding: 0.5rem; transition: all 0.2s ease; - background-image: linear-gradient(color-mix(in srgb, var(--primary) 35%, transparent)); - background-size: 0 100%; - background-repeat: no-repeat; - transition: 0.4s; - - &:hover { - background-size: 100% 100%; - } } [popover] .nav--list__item.active { background: color-mix(in srgb, var(--primary) 15%, transparent); color: color-contrast(var(--primary) vs white, black); - font-weight: 600; border-radius: 0.75rem; } [popover] .nav--list__item:hover { - color: color-contrast(var(--primary) vs white, black); border-radius: 0.75rem; + transform: none; + box-shadow: none; + background: transparent !important; + filter: drop-shadow(0 6px 16px #7c3aed33) drop-shadow(0 2px 6px #00000018); + } + + [popover] .nav--list__item:hover .icon svg { + filter: drop-shadow(0 0 5px color-mix(in srgb, var(--primary) 55%, transparent)); + transition: filter 0.25s ease; + } + + [popover] .nav--list__item:hover .icon svg circle { + stroke-width: 2.5; + transition: stroke-width 0.25s ease; } .sidebar_layout { position: relative; - width: max-content; - margin: 0 auto; - min-height: calc(100svh - var(--header-height)); + width: 100%; + margin: 0 !important; + padding: 0 !important; display: flex; + justify-content: flex-start; } [popover] { @@ -89,19 +94,21 @@ margin: 0; flex-shrink: 0; right: 100%; + left: 0 !important; top: var(--header-height); border: 0; background: var(--background); - height: 100%; + height: fit-content; + min-height: unset; padding: 1rem 0; overflow: visible; - min-height: calc(100svh - var(--header-height)); border-radius: 0.75rem; position: sticky; border-right: 1px solid var(--border); transition: width 0.3s ease; overflow-x: hidden; white-space: nowrap; + max-width: var(--sidebar-expanded); } [popover].minimized { @@ -169,11 +176,6 @@ transition: all 0.2s; } - [popover] .nav--list__item:hover { - background: color-mix(in srgb, var(--primary) 10%, transparent); - color: var(--primary); - } - [popover] { color: color-mix(in hsl, currentColor, #0000 15%); @@ -198,7 +200,7 @@ background: color-mix(in hsl, canvas, canvasText 15%); position: absolute; inset: 0; - border-radius: 6px; + border-radius: 50%; z-index: -1; opacity: var(--active, 0); transition: opacity 0.2s; @@ -219,7 +221,8 @@ cursor: pointer; } - .menu-button:is(:active, :hover, :focus-visible) { + /* menu-button hover โ€” theme-toggle aur pin-btn ko exclude karo */ + .menu-button:not(.theme-toggle):not(.pin-btn):is(:active, :hover, :focus-visible) { background: color-mix(in srgb, var(--primary) 30%, transparent) !important; --active: 1; } @@ -229,7 +232,7 @@ background: color-mix(in hsl, canvas, canvasText 15%); position: absolute; inset: 0; - border-radius: 6px; + border-radius: 50%; z-index: -1; opacity: var(--active, 0); transition: opacity 0.2s; @@ -274,17 +277,23 @@ } } + .top-actions { + position: relative !important; + margin: 0 0 1rem 0 !important; + border-bottom: 1px solid var(--border); + border-top: none !important; + } + .actions { - justify-content: flex-end; - position: sticky; - bottom: 0; - z-index: 1; - right: 0; - left: 0; - translate: 0 calc(clamp(0, var(--ty), var(--distance) - 88) * -1px); - transition-duration: var(--timing); - transition-timing-function: var(--ease); - min-width: var(--sidebar-expanded); + display: flex !important; + align-items: center !important; + gap: 0.5rem !important; + padding: 0.5rem 1rem 1rem 1rem !important; + margin: -12px 0 0 0 !important; + position: relative !important; + border: none !important; + background: transparent !important; + border-bottom: 1px solid var(--border) !important; } [popover] .bear-link { @@ -371,7 +380,7 @@ :root:has(:popover-open) body { scale: calc(0.95 + (clamp(0, var(--complete), 1) * 0.05)); translate: 0 calc((env(safe-area-inset-top) + 14px) * (1 - clamp(0, var(--complete), 1))); - border-radius: calc(12px * (1 - clamp(0, var (--complete), 1))); + border-radius: calc(12px * (1 - clamp(0, var(--complete), 1))); overflow: hidden; } @@ -452,30 +461,31 @@ gap: 0 0.25rem; padding-inline: 0.5rem; padding: 1rem; - border-top: 1px solid var(--border); margin-top: auto; position: sticky; bottom: 0; z-index: 1; + background: transparent; + min-width: var(--sidebar-expanded); button { - width: 44px; + width: 36px; + height: 36px; aspect-ratio: 1; display: grid; padding: 0; place-items: center; border: 0; color: var(--secondary); - border-radius: 0.5rem; + border-radius: 50%; transition: all 0.2s; + background: transparent; } button:hover { color: var(--primary); - background: color-mix(in srgb, var(--primary) 10%, transparent); + background: transparent !important; } - - min-width: var(--sidebar-expanded); } @media (max-width: 768px) { @@ -484,26 +494,6 @@ } } - [data-theme="system"] .theme-toggle use[href="#icon-system"], - [data-theme="light"] .theme-toggle use[href="#icon-sun"], - [data-theme="dark"] .theme-toggle use[href="#icon-moon"] { - display: block; - } - - .theme-toggle svg symbol { - display: none; - } - - .theme-toggle use { - display: none; - } - - [data-theme="system"] .theme-toggle svg symbol[id="icon-system"], - [data-theme="light"] .theme-toggle svg symbol[id="icon-sun"], - [data-theme="dark"] .theme-toggle svg symbol[id="icon-moon"] { - display: block; - } - [data-theme="light"] .placement-toggle, [data-theme="system"] .placement-toggle { color: black; @@ -531,4 +521,88 @@ [data-theme="system"] [popover] .nav--list__item:hover a { color: var(--primary); } + + /* โ”€โ”€ THEME TOGGLE BUTTON โ”€โ”€ */ + .theme-toggle { + pointer-events: all !important; + cursor: pointer !important; + width: 36px !important; + height: 36px !important; + border-radius: 50% !important; + border: 1.5px solid rgba(124, 58, 237, 0.3) !important; + background: transparent !important; + display: grid !important; + place-items: center !important; + transition: + background 0.25s ease, + border-color 0.25s ease, + transform 0.25s ease !important; + color: #7c3aed !important; + overflow: hidden !important; + } + + .theme-toggle::before { + display: none !important; + } + + .theme-toggle:hover { + background: rgba(124, 58, 237, 0.12) !important; + border-color: #7c3aed !important; + transform: rotate(20deg) scale(1.1) !important; + color: #7c3aed !important; + } + + .theme-toggle:active { + transform: rotate(20deg) scale(0.95) !important; + background: rgba(124, 58, 237, 0.2) !important; + } + + .theme-toggle svg { + pointer-events: none !important; + display: block !important; + width: 16px !important; + height: 16px !important; + } + + /* โ”€โ”€ PIN BUTTON โ”€โ”€ */ + .pin-btn { + pointer-events: all !important; + cursor: pointer !important; + width: 36px !important; + height: 36px !important; + border-radius: 50% !important; + border: 1.5px solid rgba(124, 58, 237, 0.3) !important; + background: transparent !important; + display: grid !important; + place-items: center !important; + transition: + background 0.25s ease, + border-color 0.25s ease, + transform 0.25s ease !important; + color: #7c3aed !important; + overflow: hidden !important; + } + + .pin-btn::before { + display: none !important; + } + + .pin-btn:hover { + background: rgba(124, 58, 237, 0.12) !important; + border-color: #7c3aed !important; + transform: scale(1.1) !important; + color: #7c3aed !important; + } + + .pin-btn:active { + transform: scale(0.95) !important; + background: rgba(124, 58, 237, 0.2) !important; + } + + .pin-btn svg { + pointer-events: none !important; + display: block !important; + width: 16px !important; + height: 16px !important; + } } diff --git a/src/assets/styles/nakshtra.css b/src/assets/styles/nakshtra.css index aa96ba14..c1dcda2b 100644 --- a/src/assets/styles/nakshtra.css +++ b/src/assets/styles/nakshtra.css @@ -48,7 +48,6 @@ gap: 1rem; margin-block: 1rem; - @container nakshtra (width <=700px) { .card__list { grid-template-columns: repeat(2, 1fr); @@ -72,9 +71,6 @@ opacity: 0.8; } - - - /* Nakshtra card */ .card { border-radius: 8px; @@ -137,4 +133,4 @@ } } } -} \ No newline at end of file +} diff --git a/src/assets/styles/poem-card.css b/src/assets/styles/poem-card.css index 1cc4956f..8d574e59 100644 --- a/src/assets/styles/poem-card.css +++ b/src/assets/styles/poem-card.css @@ -107,32 +107,6 @@ padding: 25px 0; } -.overlay { - position: absolute; - left: 2%; - top: 2%; - height: 96%; - width: 96%; - background-color: var(--container-bg); - border-radius: 25px 25px 0 25px; -} - -.overlay::before, -.overlay::after { - content: ""; - position: absolute; - right: 0; - bottom: -40px; - height: 40px; - width: 40px; - background-color: var(--container-bg); -} - -.overlay::after { - border-radius: 0 25px 0 0; - /*background-color: pink;*/ -} - .card-emoji { position: relative; height: 150px; @@ -159,4 +133,10 @@ margin-left: auto; right: 1rem; height: 24px; + width: 24px; +} + +.card-indicator svg { + width: 24px; + height: 24px; } diff --git a/src/assets/styles/quote-designer.css b/src/assets/styles/quote-designer.css index 93c27888..ecae291e 100644 --- a/src/assets/styles/quote-designer.css +++ b/src/assets/styles/quote-designer.css @@ -622,7 +622,7 @@ textarea.metallic-textarea { transform: rotate(45deg); } -.popover-details[open]>div { +.popover-details[open] > div { padding: 0 1rem 1rem 1rem; margin-top: 0.5rem; } @@ -667,7 +667,7 @@ textarea.metallic-textarea { transform: rotate(45deg); } -.control-section[open]>div { +.control-section[open] > div { padding: 0 1rem 1rem 1rem; margin-top: 0.5rem; } @@ -864,4 +864,4 @@ textarea.metallic-textarea { #quotePreview { padding: 0.5rem; } -} \ No newline at end of file +} diff --git a/src/assets/styles/setting.css b/src/assets/styles/setting.css index 226c05e6..e136d23d 100644 --- a/src/assets/styles/setting.css +++ b/src/assets/styles/setting.css @@ -148,4 +148,4 @@ transform: scale(1.05) rotate(45deg); } } -} \ No newline at end of file +} diff --git a/src/assets/styles/tile.css b/src/assets/styles/tile.css index 029d5b98..25cc7419 100644 --- a/src/assets/styles/tile.css +++ b/src/assets/styles/tile.css @@ -67,4 +67,4 @@ margin-top: 8px; font-size: clamp(1rem, 4vw, 2rem); } -} \ No newline at end of file +} diff --git a/src/assets/styles/varnmala/reader.css b/src/assets/styles/varnmala/reader.css index 15d47814..82bcbc68 100644 --- a/src/assets/styles/varnmala/reader.css +++ b/src/assets/styles/varnmala/reader.css @@ -28,7 +28,7 @@ padding: 0.5rem; } -.container__reader>.letter { +.container__reader > .letter { width: 100%; box-sizing: border-box; display: flex; @@ -186,7 +186,7 @@ font-size: min(200rem, 70vw); } - .container__reader>.letter { + .container__reader > .letter { justify-content: center; margin-left: auto; } @@ -194,4 +194,4 @@ .mute-button { font-size: min(1.5rem, 6vw); } -} \ No newline at end of file +} diff --git a/src/assets/styles/varnmala/speak.css b/src/assets/styles/varnmala/speak.css index 60206bf0..126b8067 100644 --- a/src/assets/styles/varnmala/speak.css +++ b/src/assets/styles/varnmala/speak.css @@ -150,27 +150,33 @@ /* Pattern styles */ & .bg-pattern1 { - background-image: repeating-linear-gradient(45deg, - rgba(0, 0, 0, 0.1) 0px, - rgba(0, 0, 0, 0.1) 2px, - transparent 2px, - transparent 4px); + background-image: repeating-linear-gradient( + 45deg, + rgba(0, 0, 0, 0.1) 0px, + rgba(0, 0, 0, 0.1) 2px, + transparent 2px, + transparent 4px + ); } & .bg-pattern2 { - background-image: repeating-linear-gradient(45deg, - transparent, - transparent 10px, - rgba(0, 0, 0, 0.05) 10px, - rgba(0, 0, 0, 0.05) 20px); + background-image: repeating-linear-gradient( + 45deg, + transparent, + transparent 10px, + rgba(0, 0, 0, 0.05) 10px, + rgba(0, 0, 0, 0.05) 20px + ); } & .bg-pattern3 { - background-image: repeating-radial-gradient(circle, - transparent, - transparent 10px, - rgba(0, 0, 0, 0.05) 10px, - rgba(0, 0, 0, 0.05) 20px); + background-image: repeating-radial-gradient( + circle, + transparent, + transparent 10px, + rgba(0, 0, 0, 0.05) 10px, + rgba(0, 0, 0, 0.05) 20px + ); } } @@ -188,4 +194,4 @@ transform: scale(1); opacity: 1; } -} \ No newline at end of file +} diff --git a/src/components/Back.astro b/src/components/Back.astro index 9e4d3ef9..e5604d83 100644 --- a/src/components/Back.astro +++ b/src/components/Back.astro @@ -1,19 +1,83 @@ --- -import BackIcon from "@/assets/icons/back.svg"; + --- + + + + + + - - - + .back-btn svg { + width: 1.125rem; + height: 1.125rem; + pointer-events: none; + } + + [data-theme="dark"] .back-btn { + background: #1e293b; + border-color: #334155; + color: #a78bfa; + } + + [data-theme="dark"] .back-btn:hover { + background: #2d1f5e; + border-color: #7c3aed; + } + diff --git a/src/components/Categories.astro b/src/components/Categories.astro index 29238e3c..1df6f5ca 100644 --- a/src/components/Categories.astro +++ b/src/components/Categories.astro @@ -1,54 +1,476 @@ ---- - ---- - -
-
-
-

Browse by Age Group

-

Select an age category to discover games and activities perfectly suited for that developmental stage.

-
- - -
-
+--- + +--- + +
+
+
+

Browse by Age Group

+ โœจ +
+

+ Select an age category to discover games and activities perfectly suited for that developmental stage! ๐Ÿ’œ +

+
+ +
+ + โ˜… + โ—† + ๐Ÿ”ต +
๐Ÿงธ
+

Toddlers

+
โ˜…  1 โ€“ 3 Years  โ˜…
+
+
+ + + โ˜๏ธ + โœฆ + โœฆ +
๐Ÿ 
+

Preschoolers

+
โ˜…  3 โ€“ 5 Years  โ˜…
+
+
+ + + โ˜… + โ€ข + โ€ข +
๐ŸŽจ
+

Early Learners

+
โ˜…  6 โ€“ 8 Years  โ˜…
+
+
+ + + ๐Ÿš€ + โ€ข โ€ข โ€ข + โ—‹ +
๐Ÿ’ก
+

Kids

+
โ˜…  9 โ€“ 12 Years  โ˜…
+
+
+ + + ๐Ÿ† + โšก + โšก +
๐ŸŽฎ
+

Teens

+
โ˜…  12+ Years  โ˜…
+
+
+ + + โค๏ธ + ๏ผ‹ + ๏ผ‹ +
๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ
+

Family

+
โ˜…  All Ages  โ˜…
+
+
+
+
+ + diff --git a/src/components/DrawKeyboard.astro b/src/components/DrawKeyboard.astro index 688fb8aa..1b0aa893 100644 --- a/src/components/DrawKeyboard.astro +++ b/src/components/DrawKeyboard.astro @@ -3,7 +3,7 @@ import { alphabetMapper } from "@/mappers/alphabet"; import { IMAGE_DIR, colorBox, fontBox, numberBox, fontColor } from "@/utils/constants"; --- -
+

Press any key

@@ -21,18 +21,7 @@ import { IMAGE_DIR, colorBox, fontBox, numberBox, fontColor } from "@/utils/cons
- diff --git a/src/components/PoemCard.astro b/src/components/PoemCard.astro index f2822840..36708f56 100644 --- a/src/components/PoemCard.astro +++ b/src/components/PoemCard.astro @@ -11,9 +11,8 @@ const { title, lines, emoji } = Astro.props; ---
-
+
-
@@ -28,3 +27,15 @@ const { title, lines, emoji } = Astro.props;
+ + diff --git a/src/components/PoemDialog.astro b/src/components/PoemDialog.astro index ea3f2975..5bcf1e2b 100644 --- a/src/components/PoemDialog.astro +++ b/src/components/PoemDialog.astro @@ -16,7 +16,7 @@ import "@/assets/styles/poem-dialog.css";
- + \ No newline at end of file diff --git a/src/components/Puzzle2.astro b/src/components/Puzzle2.astro index aaa13f92..4e2cc6a5 100644 --- a/src/components/Puzzle2.astro +++ b/src/components/Puzzle2.astro @@ -1,496 +1,496 @@ ---- -import Settings from "@/components/Settings.astro"; -import HintIcon from "@/assets/icons/hint.svg"; ---- - -
- -
- Word List -
-
- -
-
- Clicks: 0 -
-
- Found: 0/ -
- -
- -
- - -
+--- +import Settings from "@/components/Settings.astro"; +import HintIcon from "@/assets/icons/hint.svg"; +--- + +
+ +
+ Word List +
+
+ +
+
+ Clicks: 0 +
+
+ Found: 0/ +
+ +
+ +
+ + +
diff --git a/src/components/Speaker.astro b/src/components/Speaker.astro index aa4867bb..0378d549 100644 --- a/src/components/Speaker.astro +++ b/src/components/Speaker.astro @@ -24,7 +24,7 @@ declare global { display: flex; align-items: center; gap: 0.5rem; - cp;pr"#fff; + color: #fff; } #voice-dropdown { diff --git a/src/components/SpeechButton.astro b/src/components/SpeechButton.astro index d77d417b..c1b155df 100644 --- a/src/components/SpeechButton.astro +++ b/src/components/SpeechButton.astro @@ -1,75 +1,75 @@ ---- -// SpeechButtons.astro ---- - -
- - - - -
- - - - +--- +// SpeechButtons.astro +--- + +
+ + + + +
+ + + + diff --git a/src/components/ThemeProvider.astro b/src/components/ThemeProvider.astro index 3f03e697..3ff9fdd1 100644 --- a/src/components/ThemeProvider.astro +++ b/src/components/ThemeProvider.astro @@ -1,45 +1,78 @@ +--- +// ThemeProvider.astro +--- + diff --git a/src/components/ZodiacTab.astro b/src/components/ZodiacTab.astro index ab9b80ab..e3eb4ce0 100644 --- a/src/components/ZodiacTab.astro +++ b/src/components/ZodiacTab.astro @@ -1,5 +1,6 @@ --- import "@/assets/styles/zodiac.css"; +import zodiacs from "@/data/zodiac.json"; ---

Explore the Zodiac

@@ -16,75 +17,75 @@ import "@/assets/styles/zodiac.css";
- diff --git a/src/data/gamesData.ts b/src/data/gamesData.ts index b703083b..a31c505f 100644 --- a/src/data/gamesData.ts +++ b/src/data/gamesData.ts @@ -1,198 +1,215 @@ -// src/data/gamesData.ts -export type AgeKey = "3-5" | "6-8" | "9-12" | "teens" | "adults"; - -export type Game = { - title: string; - description: string; - image: string; - tags: string[]; - link: string; -}; - -export const gamesData: Record = { - "3-5": [ - { - title: "Draw", - description: "A fun game that helps toddlers learn alphabets and improve memory.", - image: - "https://images.unsplash.com/photo-1596461404969-9ae70f2830c1?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80", - tags: ["Educational", "Memory", "alphabet"], - link: "/draw" - }, - { - title: "Hide N Seek", - description: "Match animals with their sounds in this engaging audio game.", - image: "https://images.unsplash.com/photo-1550355291-bbee04a92027?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80", - tags: ["Alphabet", "Fun"], - link: "/hidenseek" - }, - { - title: "Alphabets", - description: "Learn basic alphabets and improve vocabulary skills.", - image: - "https://images.unsplash.com/photo-1598300042247-d088f8ab3a91?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80", - tags: ["Education", "Alphabet"], - link: "/alphabets" - }, - { - title: "Panel", - description: "Learn basic alphabets and improve vocabulary skills.", - image: - "https://images.unsplash.com/photo-1598300042247-d088f8ab3a91?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80", - tags: ["Education", "Alphabet"], - link: "/panel" - }, - { - title: "Gallery", - description: "Learn basic alphabets and improve vocabulary skills.", - image: - "https://images.unsplash.com/photo-1598300042247-d088f8ab3a91?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80", - tags: ["Education", "Alphabet"], - link: "/gallery" - } - ], - "6-8": [ - { - title: "Varnmala", - description: "Learn varnmala of hindi.", - image: - "https://images.unsplash.com/photo-1635070041078-e363dbe005cb?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80", - tags: ["vocab", "Educational"], - link: "/varnmala" - }, - { - title: "Number System", - description: "Learn Number System of word.", - image: - "https://images.unsplash.com/photo-1635070041078-e363dbe005cb?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80", - tags: ["vocab", "maths"], - link: "/numbers" - }, - { - title: "Math Adventure", - description: "Solve math problems to advance through an exciting adventure world.", - image: - "https://images.unsplash.com/photo-1635070041078-e363dbe005cb?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80", - tags: ["Math", "Adventure", "Educational"], - link: "/math" - }, - { - title: "Cross Word", - description: "Create words from letter tiles to earn points and unlock levels.", - image: - "https://images.unsplash.com/photo-1589998059171-988d887df646?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80", - tags: ["Language", "Spelling", "Fun"], - link: "/crossword" - }, - { - title: "Akshar", - description: "Learn local language basics", - image: - "https://images.unsplash.com/photo-1532094349884-543bc11b234d?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80", - tags: ["Language", "Educational"], - link: "/akshar" - }, - { - title: "Stories", - description: "our stories", - image: - "https://images.unsplash.com/photo-1585504198196-fb18f7b16b88?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80", - tags: ["story"], - link: "/story" - }, - { - title: "Capital", - description: "our State and Capital", - image: - "https://images.unsplash.com/photo-1585504198196-fb18f7b16b88?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80", - tags: ["geography", "gk"], - link: "/capital" - } - ], - "9-12": [ - { - title: "Canvas", - description: "Learn basic programming concepts through a fun puzzle game.", - image: "https://images.unsplash.com/photo-1555066931-4365d14bab8c?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80", - tags: ["Programming", "Logic", "Puzzle"], - link: "/canvas" - }, - { - title: "Our India", - description: "Learn about india state by dance.", - image: - "https://images.unsplash.com/photo-1481627834876-b7833e8f5570?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80", - tags: ["History", "Mystery", "Research"], - link: "/map" - }, - { - title: "Nakshtra", - description: "Learn about environmental science while protecting virtual ecosystems.", - image: - "https://images.unsplash.com/photo-1542601906990-b4d3fb778b09?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80", - tags: ["Environment", "Science", "Strategy"], - link: "/nakshtra" - } - ], - teens: [ - { - title: "Stories", - description: "A complex strategy game that challenges critical thinking and planning.", - image: - "https://images.unsplash.com/photo-1585504198196-fb18f7b16b88?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80", - tags: ["Strategy", "Critical Thinking", "Multiplayer"], - link: "/stories" - }, - { - title: "Poems", - description: "Design and create digital art, music, and animations.", - image: "https://images.unsplash.com/photo-1550745165-9bc0b252726f?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80", - tags: ["Creative", "Art", "Music"], - link: "/poems" - }, - { - title: "Glossary", - description: "Team-based challenges that promote collaboration and communication.", - image: - "https://images.unsplash.com/photo-1511632765486-a01980e01a18?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80", - tags: ["Social", "Teamwork", "Communication"], - link: "/glossary" - } - ], - adults: [ - { - title: "Our India", - description: "Test your knowledge across various parts of indian state.", - image: - "https://images.unsplash.com/photo-1535224206242-487f7090b5bb?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80", - tags: ["Trivia", "Knowledge", "Multiplayer"], - link: "/map" - }, - { - title: "Vedic", - description: "Work together to solve puzzles and escape before time runs out.", - image: "https://images.unsplash.com/photo-1552422535-93d5d0d6e7e5?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80", - tags: ["Puzzle", "Teamwork", "Mystery"], - link: "/vedic" - }, - { - title: "Zodiac", - description: "Ancient Indian Zodiac Signs.", - image: - "https://images.unsplash.com/photo-1610890716171-6b1bb98ffd09?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80", - tags: ["Strategy", "Classic", "Multiplayer"], - link: "/zodiac" - } - ] -}; - -export function getAgeGroupDisplayName(age: string | undefined) { - const names: Record = { - "3-5": "3-5 Years", - "6-8": "6-8 Years", - "9-12": "9-12 Years", - teens: "Teens", - adults: "Adults & Family" - }; - return (age && names[age]) || age || "Unknown Age Group"; -} +// src/data/gamesData.ts +export type AgeKey = "3-5" | "6-8" | "9-12" | "teens" | "adults"; + +export type Game = { + title: string; + description: string; + image: string; + tags: string[]; + link: string; +}; + +export const gamesData: Record = { + "3-5": [ + { + title: "Draw", + description: "A fun game that helps toddlers learn alphabets and improve memory.", + // child sitting at table drawing with crayons โ€” Tim Mossholder + image: + "https://images.unsplash.com/photo-1513364776144-60967b0f800f?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80", + tags: ["Educational", "Memory", "alphabet"], + link: "/draw" + }, + { + title: "Hide N Seek", + description: "Match animals with their sounds in this engaging audio game.", + // children playing hide and seek outdoors + image: + "https://images.unsplash.com/photo-1472162072942-cd5147eb3902?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80", + tags: ["Alphabet", "Fun"], + link: "/hidenseek" + }, + { + title: "Alphabets", + description: "Learn basic alphabets and improve vocabulary skills.", + // colorful alphabet wooden blocks โ€” Susan Holt Simpson + image: + "https://play-lh.googleusercontent.com/7TNnBrInykWUjDpuSNstTYdy5iuLuqz7z4Gt3O9R_KteTk2og68UtcDWCXA_I_xqmis=w526-h296-rw", + tags: ["Education", "Alphabet"], + link: "/alphabets" + }, + { + title: "Panel", + description: "Learn basic alphabets and improve vocabulary skills.", + // colorful jigsaw puzzle pieces + image: + "https://images.unsplash.com/photo-1611532736597-de2d4265fba3?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80", + tags: ["Education", "Alphabet"], + link: "/panel" + }, + { + title: "Gallery", + description: "Learn basic alphabets and improve vocabulary skills.", + // portrait of mother and little girl playing together โ€” Vivek Kumar + image: + "https://images.unsplash.com/photo-1476703993599-0035a21b17a9?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80", + tags: ["Education", "Alphabet"], + link: "/gallery" + } + ], + "6-8": [ + { + title: "Varnmala", + description: "Learn varnmala of hindi.", + + image: "https://m.media-amazon.com/images/I/91yXKcuCEwL._SX445_.jpg", + tags: ["vocab", "Educational"], + link: "/varnmala" + }, + { + title: "Number System", + description: "Learn Number System of word.", + // colorful plastic numbers on mint green background โ€” Kaboompics (Pexels) + image: "/assets/images/Number.png", + tags: ["vocab", "maths"], + link: "/numbers" + }, + { + title: "Math Adventure", + description: "Solve math problems to advance through an exciting adventure world.", + // colorful math equations / geometry + image: + "https://images.unsplash.com/photo-1635070041078-e363dbe005cb?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80", + tags: ["Math", "Adventure", "Educational"], + link: "/math" + }, + { + title: "Cross Word", + description: "Create words from letter tiles to earn points and unlock levels.", + // wooden scrabble letter tiles on surface โ€” Brett Jordan (Unsplash) + image: + "https://play-lh.googleusercontent.com/uz7mICzdnxxkVgTlJM5RRD6Y8F5M5kzu4syQKJruZ-8G7nqcsLeKjAuocxNJEaqFu7o=w526-h296-rw", + tags: ["Language", "Spelling", "Fun"], + link: "/crossword" + }, + { + title: "Akshar", + description: "Learn local language basics", + // pen writing letters on paper โ€” handwriting closeup + image: + "https://images.twinkl.co.uk/tw1n/image/private/s--aTNc3kQp--/e_sharpen:100,q_auto:eco,w_1260/image_repo/18/b1/in-hi-1732165038-hindi-vowel-alphabet-flashcards-with-words-i-hindi-varnamala-phlaisakarda_ver_2.avif", + tags: ["Language", "Educational"], + link: "/akshar" + }, + { + title: "Stories", + description: "Our stories", + // open storybook with magical fairy lights โ€” Nong + image: + "https://images.unsplash.com/photo-1512820790803-83ca734da794?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80", + tags: ["story"], + link: "/story" + }, + { + title: "Capital", + description: "Our State and Capital", + // India map photo โ€” Gayatri Malhotra (actual India map with states) + image: "https://www.mapsofindia.com/images2/india-map.jpg", + tags: ["geography", "gk"], + link: "/capital" + } + ], + "9-12": [ + { + title: "Canvas", + description: "Learn basic programming concepts through a fun puzzle game.", + // graphic drawing tablet with stylus pen โ€” digital art canvas tool + image: + "https://images.unsplash.com/photo-1609921212029-bb5a28e60960?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80", + tags: ["Programming", "Logic", "Puzzle"], + link: "/canvas" + }, + { + title: "Our India", + description: "Learn about india state by dance.", + // India map / tricolor flag + image: "https://images.pexels.com/photos/7235907/pexels-photo-7235907.jpeg?auto=compress&cs=tinysrgb&w=600", + tags: ["History", "Mystery", "Research"], + link: "/map" + }, + { + title: "Nakshtra", + description: "Learn about environmental science while protecting virtual ecosystems.", + // milky way stars constellation night sky โ€” Tobias Rademacher + image: "https://images.unsplash.com/photo-1532968961962-8a0cb3a2d4f5?auto=format&fit=crop&w=600&q=80", + tags: ["Environment", "Science", "Strategy"], + link: "/nakshtra" + } + ], + teens: [ + { + title: "Stories", + description: "A complex strategy game that challenges critical thinking and planning.", + // person reading a book dramatically lit โ€” emotional / teen vibe + image: "/assets/images/stories.webp", + tags: ["Strategy", "Critical Thinking", "Multiplayer"], + link: "/stories" + }, + { + title: "Poems", + description: "Design and create digital art, music, and animations.", + // open poetry book, person reading โ€” Toa Heftiba (poetry aesthetic) + image: + "https://media.slidesgo.com/storage/52467183/responsive-images/0-short-poems-for-kids___media_library_original_1600_900.jpg", + tags: ["Creative", "Art", "Music"], + link: "/poems" + }, + { + title: "Glossary", + description: "Team-based challenges that promote collaboration and communication.", + // magnifying glass on text / dictionary close-up + image: "/assets/images/glossary.png", + tags: ["Social", "Teamwork", "Communication"], + link: "/glossary" + } + ], + adults: [ + { + title: "Our India", + description: "Test your knowledge across various parts of indian state.", + // India map / tricolor flag + image: "/assets/images/OurIndia.png", + tags: ["Trivia", "Knowledge", "Multiplayer"], + link: "/map" + }, + { + title: "Vedic", + description: "Work together to solve puzzles and escape before time runs out.", + // ancient manuscript / old parchment handwritten text + image: + "https://ljfotzyzgckshahjzkya.supabase.co/storage/v1/object/public/site-assets/work/covers/1771405921711.png", + tags: ["Puzzle", "Teamwork", "Mystery"], + link: "/vedic" + }, + { + title: "Zodiac", + description: "Ancient Indian Zodiac Signs.", + // zodiac astrological wheel with celestial signs โ€” historical illustration + image: + "https://media.istockphoto.com/id/1532619550/vector/cute-signs-zodiac-flat-style-adorable-characters-with-lettering.jpg?s=612x612&w=0&k=20&c=vHhOs9wHHce5tauJMUYfhNbG6WjUPzCsU5jb_so9xCs=", + tags: ["Strategy", "Classic", "Multiplayer"], + link: "/zodiac" + } + ] +}; + +export function getAgeGroupDisplayName(age: string | undefined) { + const names: Record = { + "3-5": "3-5 Years", + "6-8": "6-8 Years", + "9-12": "9-12 Years", + teens: "Teens", + adults: "Adults & Family" + }; + return (age && names[age]) || age || "Unknown Age Group"; +} diff --git a/src/data/glossary.json b/src/data/glossary.json index c1b3e6ae..c3722bbf 100644 --- a/src/data/glossary.json +++ b/src/data/glossary.json @@ -1086,4 +1086,4 @@ "author": "explained in the work of a highly influential 12th-century scholar:Nฤrฤyaแน‡a (เคจเคพเคฐเคพเคฏเคฃ)" } } -} \ No newline at end of file +} diff --git a/src/data/state.json b/src/data/state.json index f9940568..94663b14 100644 --- a/src/data/state.json +++ b/src/data/state.json @@ -31,17 +31,8 @@ "capital": "Amaravati", "population": 53903393, "literacy_rate": 67.35, - "languages": [ - "Telugu", - "Urdu", - "Hindi" - ], - "major_rivers": [ - "Krishna", - "Godavari", - "Penna", - "Vamsadhara" - ] + "languages": ["Telugu", "Urdu", "Hindi"], + "major_rivers": ["Krishna", "Godavari", "Penna", "Vamsadhara"] }, { "id": "assam", @@ -75,18 +66,8 @@ "capital": "Dispur", "population": 31205576, "literacy_rate": 72.19, - "languages": [ - "Assamese", - "Boro", - "Bengali", - "Meitei" - ], - "major_rivers": [ - "Brahmaputra", - "Barak", - "Subansiri", - "Manas" - ] + "languages": ["Assamese", "Boro", "Bengali", "Meitei"], + "major_rivers": ["Brahmaputra", "Barak", "Subansiri", "Manas"] }, { "id": "arunachalpradesh", @@ -120,21 +101,8 @@ "capital": "Itanagar", "population": 1383727, "literacy_rate": 65.38, - "languages": [ - "Nyishi", - "Apatani", - "Bokar", - "Galo", - "Tagin", - "Adi" - ], - "major_rivers": [ - "Kameng", - "Subansiri", - "Siang", - "Dibang", - "Lohit" - ] + "languages": ["Nyishi", "Apatani", "Bokar", "Galo", "Tagin", "Adi"], + "major_rivers": ["Kameng", "Subansiri", "Siang", "Dibang", "Lohit"] }, { "id": "bihar", @@ -168,18 +136,8 @@ "capital": "Patna", "population": 104099452, "literacy_rate": 61.8, - "languages": [ - "Hindi", - "Bhojpuri", - "Maithili", - "Magahi" - ], - "major_rivers": [ - "Ganges", - "Son", - "Gandak", - "Kosi" - ] + "languages": ["Hindi", "Bhojpuri", "Maithili", "Magahi"], + "major_rivers": ["Ganges", "Son", "Gandak", "Kosi"] }, { "id": "telangana", @@ -213,17 +171,8 @@ "capital": "Hyderabad", "population": "35,190,000", "literacy_rate": "66.54%", - "languages": [ - "Telugu", - "Urdu" - ], - "major_rivers": [ - "Godavari", - "Krishna", - "Musi", - "Bhima", - "Manjira" - ] + "languages": ["Telugu", "Urdu"], + "major_rivers": ["Godavari", "Krishna", "Musi", "Bhima", "Manjira"] }, { "id": "gujarat", @@ -257,17 +206,8 @@ "capital": "Gandhinagar", "population": 63872399, "literacy_rate": 78.03, - "languages": [ - "Gujarati", - "Hindi", - "English" - ], - "major_rivers": [ - "Narmada", - "Tapi", - "Sabarmati", - "Mahi" - ] + "languages": ["Gujarati", "Hindi", "English"], + "major_rivers": ["Narmada", "Tapi", "Sabarmati", "Mahi"] }, { "id": "chhattisgarh", @@ -301,18 +241,8 @@ "capital": "Raipur", "population": 25540196, "literacy_rate": 70.28, - "languages": [ - "Chhattisgarhi", - "Hindi" - ], - "major_rivers": [ - "Mahanadi", - "Indravati", - "Arpa", - "Pairi", - "Hasdo", - "Shivnath" - ] + "languages": ["Chhattisgarhi", "Hindi"], + "major_rivers": ["Mahanadi", "Indravati", "Arpa", "Pairi", "Hasdo", "Shivnath"] }, { "id": "goa", @@ -346,18 +276,8 @@ "capital": "Panaji", "population": 1458545, "literacy_rate": 88.7, - "languages": [ - "Konkani", - "Marathi", - "English", - "Hindi" - ], - "major_rivers": [ - "Mandovi", - "Zuari", - "Terekhol", - "Chapor" - ] + "languages": ["Konkani", "Marathi", "English", "Hindi"], + "major_rivers": ["Mandovi", "Zuari", "Terekhol", "Chapor"] }, { "id": "delhi", @@ -391,16 +311,8 @@ "capital": "New Delhi", "population": 16753235, "literacy_rate": 86.21, - "languages": [ - "Hindi", - "English", - "Punjabi", - "Urdu" - ], - "major_rivers": [ - "Yamuna", - "Hindon" - ] + "languages": ["Hindi", "English", "Punjabi", "Urdu"], + "major_rivers": ["Yamuna", "Hindon"] }, { "id": "dadraandnagarhavelianddamananddiu", @@ -434,15 +346,8 @@ "capital": "Daman", "population": 585764, "literacy_rate": 87.8, - "languages": [ - "Gujarati", - "Hindi", - "Marathi", - "English" - ], - "major_rivers": [ - "Daman Ganga" - ] + "languages": ["Gujarati", "Hindi", "Marathi", "English"], + "major_rivers": ["Daman Ganga"] }, { "id": "kerala", @@ -476,17 +381,8 @@ "capital": "Thiruvananthapuram", "population": 35699443, "literacy_rate": 94.0, - "languages": [ - "Malayalam", - "Tamil", - "English" - ], - "major_rivers": [ - "Periyar", - "Bharathapuzha", - "Pamba", - "Chaliyar" - ] + "languages": ["Malayalam", "Tamil", "English"], + "major_rivers": ["Periyar", "Bharathapuzha", "Pamba", "Chaliyar"] }, { "id": "karnataka", @@ -520,19 +416,8 @@ "capital": "Bengaluru", "population": 67562686, "literacy_rate": 75.36, - "languages": [ - "Kannada", - "Tulu", - "Konkani", - "Urdu", - "English" - ], - "major_rivers": [ - "Krishna", - "Cauvery (Kaveri)", - "Tungabhadra", - "Sharavathi" - ] + "languages": ["Kannada", "Tulu", "Konkani", "Urdu", "English"], + "major_rivers": ["Krishna", "Cauvery (Kaveri)", "Tungabhadra", "Sharavathi"] }, { "id": "maharashtra", @@ -566,18 +451,8 @@ "capital": "Mumbai ( in summer ), Nagpur ( in winter )", "population": 123144223, "literacy_rate": 82.34, - "languages": [ - "Marathi", - "Hindi", - "English", - "Konkani" - ], - "major_rivers": [ - "Godavari", - "Krishna", - "Bhima", - "Tapi" - ] + "languages": ["Marathi", "Hindi", "English", "Konkani"], + "major_rivers": ["Godavari", "Krishna", "Bhima", "Tapi"] }, { "id": "madhyapradesh", @@ -611,20 +486,8 @@ "capital": "Bhopal", "population": 86484569, "literacy_rate": 70.63, - "languages": [ - "Hindi", - "Bundeli", - "Malvi", - "Nimadi", - "Gondi" - ], - "major_rivers": [ - "Narmada", - "Tapi", - "Chambal", - "Betwa", - "Son" - ] + "languages": ["Hindi", "Bundeli", "Malvi", "Nimadi", "Gondi"], + "major_rivers": ["Narmada", "Tapi", "Chambal", "Betwa", "Son"] }, { "id": "odisha", @@ -658,19 +521,8 @@ "capital": "Bhubaneswar", "population": 46356334, "literacy_rate": 72.87, - "languages": [ - "Odia", - "Hindi", - "English", - "Sambalpuri", - "Santali" - ], - "major_rivers": [ - "Mahanadi", - "Brahmani", - "Baitarani", - "Rushikulya" - ] + "languages": ["Odia", "Hindi", "English", "Sambalpuri", "Santali"], + "major_rivers": ["Mahanadi", "Brahmani", "Baitarani", "Rushikulya"] }, { "id": "westbengal", @@ -704,19 +556,8 @@ "capital": "Kolkata", "population": 101174280, "literacy_rate": 77.08, - "languages": [ - "Bengali", - "Hindi", - "English", - "Nepali", - "Urdu" - ], - "major_rivers": [ - "Ganges", - "Hooghly", - "Teesta", - "Subarnarekha" - ] + "languages": ["Bengali", "Hindi", "English", "Nepali", "Urdu"], + "major_rivers": ["Ganges", "Hooghly", "Teesta", "Subarnarekha"] }, { "id": "jharkhand", @@ -750,19 +591,8 @@ "capital": "Ranchi", "population": 38471377, "literacy_rate": 67.63, - "languages": [ - "Hindi", - "Nagpuri", - "Santhali", - "Khortha", - "Kurukh" - ], - "major_rivers": [ - "Damodar", - "Subarnarekha", - "Koel", - "Barakar" - ] + "languages": ["Hindi", "Nagpuri", "Santhali", "Khortha", "Kurukh"], + "major_rivers": ["Damodar", "Subarnarekha", "Koel", "Barakar"] }, { "id": "uttarpradesh", @@ -796,20 +626,8 @@ "capital": "Lucknow", "population": 241066874, "literacy_rate": 73.0, - "languages": [ - "Hindi", - "Urdu", - "Awadhi", - "Bhojpuri", - "English" - ], - "major_rivers": [ - "Ganga", - "Yamuna", - "Ghaghra", - "Gomti", - "Sarayu" - ] + "languages": ["Hindi", "Urdu", "Awadhi", "Bhojpuri", "English"], + "major_rivers": ["Ganga", "Yamuna", "Ghaghra", "Gomti", "Sarayu"] }, { "id": "nagaland", @@ -843,19 +661,8 @@ "capital": "Kohima", "population": 2249695, "literacy_rate": 80.11, - "languages": [ - "Nagamese", - "English", - "Ao", - "Konyak", - "Lotha" - ], - "major_rivers": [ - "Doyang", - "Dhansiri", - "Tizu", - "Zungki" - ] + "languages": ["Nagamese", "English", "Ao", "Konyak", "Lotha"], + "major_rivers": ["Doyang", "Dhansiri", "Tizu", "Zungki"] }, { "id": "manipur", @@ -889,18 +696,8 @@ "capital": "Imphal", "population": 2855794, "literacy_rate": 79.85, - "languages": [ - "Meitei", - "English", - "Hindi", - "Tangkhul", - "Thadou" - ], - "major_rivers": [ - "Imphal River", - "Iril River", - "Thoubal River" - ] + "languages": ["Meitei", "English", "Hindi", "Tangkhul", "Thadou"], + "major_rivers": ["Imphal River", "Iril River", "Thoubal River"] }, { "id": "meghalaya", @@ -934,18 +731,8 @@ "capital": "Shillong", "population": 3366710, "literacy_rate": 75.48, - "languages": [ - "Khasi", - "Garo", - "English", - "Hindi" - ], - "major_rivers": [ - "Umiam", - "Myntdu", - "Kynshi", - "Simsang" - ] + "languages": ["Khasi", "Garo", "English", "Hindi"], + "major_rivers": ["Umiam", "Myntdu", "Kynshi", "Simsang"] }, { "id": "mizoram", @@ -979,17 +766,8 @@ "capital": "Aizawl", "population": 1091014, "literacy_rate": 91.58, - "languages": [ - "Mizo", - "English", - "Hindi" - ], - "major_rivers": [ - "Tlawng", - "Tuirial", - "Chhimtuipui", - "Serchhip" - ] + "languages": ["Mizo", "English", "Hindi"], + "major_rivers": ["Tlawng", "Tuirial", "Chhimtuipui", "Serchhip"] }, { "id": "rajasthan", @@ -1022,18 +800,8 @@ "capital": "Jaipur", "population": 68548437, "literacy_rate": 66.11, - "languages": [ - "Rajasthani", - "Hindi", - "Marwari", - "Mewari" - ], - "major_rivers": [ - "Chambal", - "Luni", - "Banas", - "Mahi" - ] + "languages": ["Rajasthani", "Hindi", "Marwari", "Mewari"], + "major_rivers": ["Chambal", "Luni", "Banas", "Mahi"] }, { "id": "sikkim", @@ -1067,17 +835,8 @@ "capital": "Gangtok", "population": 610577, "literacy_rate": 81.42, - "languages": [ - "Nepali", - "Bhutia", - "Lepcha", - "English", - "Hindi" - ], - "major_rivers": [ - "Teesta", - "Rangit" - ] + "languages": ["Nepali", "Bhutia", "Lepcha", "English", "Hindi"], + "major_rivers": ["Teesta", "Rangit"] }, { "id": "tamilnadu", @@ -1111,19 +870,8 @@ "capital": "Chennai", "population": 72147030, "literacy_rate": 80.33, - "languages": [ - "Tamil", - "Telugu", - "Urdu", - "Malayalam", - "English" - ], - "major_rivers": [ - "Kaveri", - "Vaigai", - "Palar", - "Thamirabarani" - ] + "languages": ["Tamil", "Telugu", "Urdu", "Malayalam", "English"], + "major_rivers": ["Kaveri", "Vaigai", "Palar", "Thamirabarani"] }, { "id": "tripura", @@ -1157,18 +905,8 @@ "capital": "Agartala", "population": 4169794, "literacy_rate": 87.22, - "languages": [ - "Bengali", - "Kokborok", - "Hindi", - "English" - ], - "major_rivers": [ - "Gomati", - "Manu", - "Khowai", - "Dhalai" - ] + "languages": ["Bengali", "Kokborok", "Hindi", "English"], + "major_rivers": ["Gomati", "Manu", "Khowai", "Dhalai"] }, { "id": "haryana", @@ -1202,19 +940,8 @@ "capital": "Chandigarh", "population": 28900000, "literacy_rate": 76.64, - "languages": [ - "Haryanvi", - "Hindi", - "Punjabi", - "English" - ], - "major_rivers": [ - "Yamuna", - "Ghaggar", - "Sarasvati", - "Markanda", - "Tangri" - ] + "languages": ["Haryanvi", "Hindi", "Punjabi", "English"], + "major_rivers": ["Yamuna", "Ghaggar", "Sarasvati", "Markanda", "Tangri"] }, { "id": "punjab", @@ -1248,16 +975,8 @@ "capital": "Chandigarh", "population": 27743338, "literacy_rate": 76.68, - "languages": [ - "Punjabi", - "Hindi", - "English" - ], - "major_rivers": [ - "Sutlej", - "Beas", - "Ravi" - ] + "languages": ["Punjabi", "Hindi", "English"], + "major_rivers": ["Sutlej", "Beas", "Ravi"] }, { "id": "uttarakhand", @@ -1291,19 +1010,8 @@ "capital": "Dehradun, Gairsain", "population": 11250000, "literacy_rate": 78.82, - "languages": [ - "Hindi", - "Garhwali", - "Kumaoni", - "Jaunsari", - "English" - ], - "major_rivers": [ - "Ganga", - "Yamuna", - "Alaknanda", - "Bhagirathi" - ] + "languages": ["Hindi", "Garhwali", "Kumaoni", "Jaunsari", "English"], + "major_rivers": ["Ganga", "Yamuna", "Alaknanda", "Bhagirathi"] }, { "id": "himachalpradesh", @@ -1337,19 +1045,8 @@ "capital": "Shimla (Summer), Dharamshala (Winter)", "population": 7300000, "literacy_rate": 83.78, - "languages": [ - "Hindi", - "Pahari", - "Punjabi", - "Kinnauri" - ], - "major_rivers": [ - "Sutlej", - "Beas", - "Chenab", - "Ravi", - "Yamuna" - ] + "languages": ["Hindi", "Pahari", "Punjabi", "Kinnauri"], + "major_rivers": ["Sutlej", "Beas", "Chenab", "Ravi", "Yamuna"] }, { "id": "jammuandkashmir", @@ -1383,19 +1080,8 @@ "capital": "Srinagar (Summer), Jammu (Winter)", "population": 13600000, "literacy_rate": 68.74, - "languages": [ - "Kashmiri", - "Urdu", - "Dogri", - "Hindi", - "English" - ], - "major_rivers": [ - "Jhelum", - "Chenab", - "Tawi", - "Ravi" - ] + "languages": ["Kashmiri", "Urdu", "Dogri", "Hindi", "English"], + "major_rivers": ["Jhelum", "Chenab", "Tawi", "Ravi"] }, { "id": "andamanandnicobarislands", @@ -1429,18 +1115,8 @@ "capital": "Port Blair", "population": 380520, "literacy_rate": 86.27, - "languages": [ - "Hindi", - "Tamil", - "Telugu", - "Bengali", - "Nicobarese", - "English" - ], - "major_rivers": [ - "Kalpong River", - "Galathea River" - ] + "languages": ["Hindi", "Tamil", "Telugu", "Bengali", "Nicobarese", "English"], + "major_rivers": ["Kalpong River", "Galathea River"] }, { "id": "chandigarh", @@ -1474,11 +1150,7 @@ "capital": "Chandigarh", "population": 1158473, "literacy_rate": 86.05, - "languages": [ - "Hindi", - "Punjabi", - "English" - ], + "languages": ["Hindi", "Punjabi", "English"], "major_rivers": [] }, { @@ -1513,15 +1185,8 @@ "capital": "Kavaratti", "population": 64473, "literacy_rate": 91.85, - "languages": [ - "Malayalam", - "Jeseri", - "Dhawari", - "English" - ], - "major_rivers": [ - "N/A" - ] + "languages": ["Malayalam", "Jeseri", "Dhawari", "English"], + "major_rivers": ["N/A"] }, { "id": "ladakh", @@ -1555,18 +1220,8 @@ "capital": "Leh, Kargil", "population": 274289, "literacy_rate": 77.2, - "languages": [ - "Ladakhi", - "Balti", - "Urdu", - "Hindi", - "English" - ], - "major_rivers": [ - "Indus", - "Zanskar", - "Shyok" - ] + "languages": ["Ladakhi", "Balti", "Urdu", "Hindi", "English"], + "major_rivers": ["Indus", "Zanskar", "Shyok"] }, { "id": "puducherry", @@ -1600,17 +1255,7 @@ "capital": "Puducherry", "population": 1394467, "literacy_rate": 86.55, - "languages": [ - "Tamil", - "French", - "English", - "Telugu", - "Malayalam" - ], - "major_rivers": [ - "Sankaraparani", - "Pennaiyar", - "Arasalar" - ] + "languages": ["Tamil", "French", "English", "Telugu", "Malayalam"], + "major_rivers": ["Sankaraparani", "Pennaiyar", "Arasalar"] } -] \ No newline at end of file +] diff --git a/src/layouts/Base.astro b/src/layouts/Base.astro index 0fd6559d..38c93e62 100755 --- a/src/layouts/Base.astro +++ b/src/layouts/Base.astro @@ -5,7 +5,6 @@ import Footer from "@/layouts/common/Footer"; import Header from "@/layouts/common/Header"; import Menu from "@/layouts/common/Menu"; import { siteConfig } from "@/site-config"; -//import Shortcut from "@/components/Shortcut.astro"; const { meta: { title, description = siteConfig.description, ogImage }, @@ -13,31 +12,465 @@ const { } = Astro.props; --- - + - + -
- -
+ { + sidebar && ( + + ) + } + + + +

This is my fallback content, if there is no child passed into slot

+ + { + sidebar && ( + + ) + } + + + +