File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<script setup lang="ts">
22import type { Post } from ' @/interfaces' ;
33import PostSingleCardFeature from ' ./PostSingleCardFeature.vue' ;
4+ import { TransitionGroup } from ' vue' ;
45
56defineProps <{
67 posts: Post [];
8+ isLoading? : boolean ;
79}>();
810 </script >
911
1012<template >
11- <ul class =" list" >
13+ <TransitionGroup
14+ name =" fade"
15+ tag =" ul"
16+ class =" list"
17+ >
1218 <li
13- v-for =" post in posts"
19+ v-for =" ( post, index) in posts"
1420 :key =" post.path"
1521 class =" p-0 not-sm:p-2 my-4"
22+ :style =" { transitionDelay: `${index * 100}ms` }"
1623 >
1724 <PostSingleCardFeature :post =" post" />
1825 </li >
19- </ul >
26+ </TransitionGroup >
2027</template >
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import { useRoute } from 'vue-router'
55import PostTimelineFeature from ' @/components/Blog/PostTimelineFeature.vue'
66
77import { SitemapBridge } from ' @/router/sitemap'
8- import { Post } from ' @data/Posts '
8+ import { Post } from ' @/interfaces '
99
1010const route = useRoute ()
1111const isLoading = ref (true )
@@ -62,18 +62,7 @@ onMounted(() => {
6262 </h1 >
6363 </SectionWithHeader >
6464
65- <div
66- v-if =" isLoading"
67- class =" w-full px-6 max-w-5xl mx-auto py-12 flex flex-col items-center"
68- >
69- <span class =" loading loading-dots" />
70- <p >Carregando posts...</p >
65+ <div class =" max-w-5xl mx-auto md:px-5" >
66+ <PostTimelineFeature :posts =" posts" :is-loading =" isLoading" />
7167 </div >
72-
73- <ul
74- v-else
75- class =" py-4 px-2 md:px-4 lg:w-5/6 mx-auto list"
76- >
77- <PostTimelineFeature :posts =" posts" />
78- </ul >
7968</template >
Original file line number Diff line number Diff line change @@ -225,20 +225,3 @@ onMounted(() => {
225225 />
226226 </div >
227227</template >
228-
229- <style scoped>
230- .fade-enter-active ,
231- .fade-leave-active {
232- transition : all 0.5s ease ;
233- }
234-
235- .fade-enter-from {
236- opacity : 0 ;
237- transform : translateY (10px );
238- }
239-
240- .fade-leave-to {
241- opacity : 0 ;
242- transform : translateY (-10px );
243- }
244- </style >
You can’t perform that action at this time.
0 commit comments