Showing
1 changed file
with
15 additions
and
0 deletions
1 | <script setup lang="ts"> | 1 | <script setup lang="ts"> |
2 | import SearchBar from "~/components/SearchBar.vue"; | 2 | import SearchBar from "~/components/SearchBar.vue"; |
3 | +import { ref } from "vue"; | ||
4 | + | ||
5 | +const isInitialLoading = ref(true); | ||
3 | </script> | 6 | </script> |
4 | 7 | ||
5 | <template> | 8 | <template> |
6 | <section> | 9 | <section> |
7 | <h1 class="text-4xl font-bold mb-8 text-center">Découvrez les films populaires</h1> | 10 | <h1 class="text-4xl font-bold mb-8 text-center">Découvrez les films populaires</h1> |
11 | + | ||
8 | <!-- Barre de recherche --> | 12 | <!-- Barre de recherche --> |
9 | <search-bar placeholder="Rechercher un film..."/> | 13 | <search-bar placeholder="Rechercher un film..."/> |
14 | + | ||
15 | + <!-- Skeleton loader pendant le chargement initial --> | ||
16 | + <div v-if="isInitialLoading" class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-6"> | ||
17 | + <div v-for="i in 8" :key="i" class="bg-gray-800 rounded-lg overflow-hidden shadow-lg animate-pulse"> | ||
18 | + <div class="h-80 bg-gray-700"/> | ||
19 | + <div class="p-4"> | ||
20 | + <div class="h-6 bg-gray-700 rounded mb-3"/> | ||
21 | + <div class="h-4 bg-gray-700 rounded w-2/3"/> | ||
22 | + </div> | ||
23 | + </div> | ||
24 | + </div> | ||
10 | </section> | 25 | </section> |
11 | </template> | 26 | </template> |
12 | 27 |
-
Please register or login to post a comment