diff --git a/app.vue b/app.vue index 5b6668f..34f6d70 100644 --- a/app.vue +++ b/app.vue @@ -8,3 +8,15 @@ + + diff --git a/components/GamePanel.vue b/components/GamePanel.vue index 8460bde..9eeb88c 100644 --- a/components/GamePanel.vue +++ b/components/GamePanel.vue @@ -3,20 +3,31 @@ v-if="game" :href="props.href ?? `/store/${game.id}`" class="group relative w-48 h-64 rounded-lg overflow-hidden transition-all duration-300 text-left hover:scale-[1.02] hover:shadow-lg hover:-translate-y-0.5" + @click.native="active = game.id" > -
- + +
-
-
-

+
+

{{ game.mName }}

-

+

{{ game.mShortDescription }}

@@ -35,13 +46,23 @@ import type { SerializeObject } from "nitropack"; const props = defineProps<{ - game: SerializeObject<{ - id: string; - mCoverId: string; - mName: string; - mShortDescription: string; - }> | undefined; + game: + | SerializeObject<{ + id: string; + mCoverId: string; + mName: string; + mShortDescription: string; + }> + | undefined; href?: string; }>(); + +const active = useState(); + diff --git a/nuxt.config.ts b/nuxt.config.ts index 4aad488..3b17a10 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -11,6 +11,7 @@ export default defineNuxtConfig({ experimental: { buildCache: true, + viewTransition: true, }, vite: { diff --git a/pages/store/[id]/index.vue b/pages/store/[id]/index.vue index 4aeac95..7d9b7ab 100644 --- a/pages/store/[id]/index.vue +++ b/pages/store/[id]/index.vue @@ -27,8 +27,9 @@ class="col-start-1 lg:col-start-4 flex flex-col gap-y-6 items-center" >
@@ -219,3 +220,19 @@ useHead({ title: game.mName, }); + + + +