fix(style): game panel now always shows 3 lines exactly
This commit is contained in:
parent
7b3b919581
commit
9c2249ed08
1 changed files with 30 additions and 35 deletions
|
|
@ -1,46 +1,41 @@
|
||||||
<template>
|
<template>
|
||||||
<NuxtLink
|
<NuxtLink
|
||||||
v-if="game"
|
v-if="game"
|
||||||
:href="`/store/${game.id}`"
|
:href="`/store/${game.id}`"
|
||||||
class="rounded overflow-hidden w-48 h-64 group relative transition-all duration-300 hover:scale-105 hover:shadow-xl"
|
class="rounded overflow-hidden w-48 h-64 group relative transition-all duration-300 hover:scale-105 hover:shadow-xl"
|
||||||
>
|
>
|
||||||
<img
|
<img :src="useObject(game.mCoverId)" class="w-full h-full object-cover" />
|
||||||
:src="useObject(game.mCoverId)"
|
|
||||||
class="w-full h-full object-cover"
|
|
||||||
/>
|
|
||||||
<div
|
|
||||||
class="absolute inset-0 bg-gradient-to-b from-transparent to-90% to-zinc-800"
|
|
||||||
/>
|
|
||||||
<div class="absolute bottom-0 left-0 px-2 py-1.5">
|
|
||||||
<h1 class="text-zinc-100 text-sm font-bold font-display">
|
|
||||||
{{ game.mName }}
|
|
||||||
</h1>
|
|
||||||
<p class="text-zinc-400 text-xs">
|
|
||||||
{{
|
|
||||||
game.mShortDescription.split(" ").slice(0, 10).join(" ")
|
|
||||||
}}...
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</NuxtLink>
|
|
||||||
<div
|
<div
|
||||||
v-else
|
class="absolute inset-0 bg-gradient-to-b from-transparent to-95% to-zinc-800"
|
||||||
class="rounded w-48 h-64 bg-zinc-800 flex items-center justify-center"
|
/>
|
||||||
>
|
<div class="absolute bottom-0 left-0 px-2 py-1.5">
|
||||||
<p class="text-zinc-700 text-sm font-semibold font-display uppercase">
|
<h1 class="text-zinc-100 text-sm font-bold font-display">
|
||||||
no game
|
{{ game.mName }}
|
||||||
</p>
|
</h1>
|
||||||
|
<p class="text-zinc-400 text-xs line-clamp-2">
|
||||||
|
{{ game.mShortDescription }}
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
</NuxtLink>
|
||||||
|
<div
|
||||||
|
v-else
|
||||||
|
class="rounded w-48 h-64 bg-zinc-800 flex items-center justify-center"
|
||||||
|
>
|
||||||
|
<p class="text-zinc-700 text-sm font-semibold font-display uppercase">
|
||||||
|
no game
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { SerializeObject } from "nitropack";
|
import type { SerializeObject } from "nitropack";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
game?: SerializeObject<{
|
game?: SerializeObject<{
|
||||||
id: string;
|
id: string;
|
||||||
mCoverId: string;
|
mCoverId: string;
|
||||||
mName: string;
|
mName: string;
|
||||||
mShortDescription: string;
|
mShortDescription: string;
|
||||||
}>;
|
}>;
|
||||||
}>();
|
}>();
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue