mirror of
https://github.com/Drop-OSS/drop.git
synced 2026-06-22 04:11:32 +10:00
feat: add skeleton for loading game carousel
This commit is contained in:
@@ -15,18 +15,14 @@
|
|||||||
</template>
|
</template>
|
||||||
</VueCarousel>
|
</VueCarousel>
|
||||||
<template #fallback>
|
<template #fallback>
|
||||||
<!-- this will be rendered on server side -->
|
<div
|
||||||
<div class="min-h-55">
|
class="flex flex-nowrap flex-row overflow-hidden whitespace-nowrap"
|
||||||
<div class="flex items-center justify-center p-4">
|
>
|
||||||
<div
|
<SkeletonCard
|
||||||
class="flex items-center space-x-2 animate-pulse rounded-xl shadow-lg p-6"
|
v-for="index in 10"
|
||||||
>
|
:key="index"
|
||||||
<div class="w-4 h-4 bg-gray-400 rounded-full"></div>
|
class="mr-3 flex-none"
|
||||||
<div class="w-4 h-4 bg-gray-400 rounded-full"></div>
|
/>
|
||||||
<div class="w-4 h-4 bg-gray-400 rounded-full"></div>
|
|
||||||
<span class="ml-4 text-gray-200 font-medium">Loading...</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</ClientOnly>
|
</ClientOnly>
|
||||||
|
|||||||
@@ -32,14 +32,7 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</NuxtLink>
|
</NuxtLink>
|
||||||
<div
|
<SkeletonCard v-else message="no game" />>
|
||||||
v-else
|
|
||||||
class="rounded-lg w-48 h-64 bg-zinc-800/50 flex items-center justify-center transition-all duration-300 hover:bg-zinc-800"
|
|
||||||
>
|
|
||||||
<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">
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
<template>
|
||||||
|
<div
|
||||||
|
class="rounded-lg w-48 h-64 bg-zinc-800/50 flex items-center justify-center transition-all duration-300 hover:bg-zinc-800 animate-pulse"
|
||||||
|
>
|
||||||
|
<p class="text-zinc-700 text-sm font-semibold font-display uppercase">
|
||||||
|
{{ props.message }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
const props = defineProps<{
|
||||||
|
message?: string;
|
||||||
|
}>();
|
||||||
|
</script>
|
||||||
Reference in New Issue
Block a user