22import { VideoPlayer } from ' @videojs-player/vue'
33import ' video.js/dist/video-js.css'
44
5- const { data : page } = await useAsyncData (' index' , () => queryCollection (' index' ).first ())
5+ const { data : page } = await useAsyncData (' page- index' , () => queryCollection (' index' ).first ())
66
77const title = page .value ?.seo ?.title || page .value ?.title
88const description = page .value ?.seo ?.description || page .value ?.description
@@ -19,7 +19,7 @@ const { isMobile } = useDevice()
1919
2020const videoReady = ref (false )
2121
22- const projects = ref <ProjectItem []>([])
22+ const projects = ref <ProjectExportItem []>([])
2323const contributors = ref <ContributorItem []>([])
2424
2525const loadingProjects = ref (true )
@@ -57,6 +57,8 @@ onMounted(async () => {
5757
5858 projects .value = projectData
5959
60+ console .log (' Projects loaded:' , projects .value )
61+
6062 await new Promise (resolve => setTimeout (resolve , 300 ))
6163 } catch (error ) {
6264 console .error (' Error loading projects:' , error )
@@ -130,77 +132,13 @@ onMounted(async () => {
130132 container: 'pb-8 sm:pb-12 lg:pb-20'
131133 }"
132134 >
133- <UPageGrid >
134- <template v-if =" loadingProjects " >
135- <USkeleton
136- v-for =" index in 6"
137- :key =" 'project-' + index"
138- class =" h-[198px] rounded-xl"
139- />
140- </template >
141-
142- <template v-else >
143- <UPageCard
144- v-for =" (project, index) in projects"
145- :key =" index"
146- variant =" ghost"
147- :to =" project.html_url"
148- target =" _blank"
149- :ui =" {
150- footer: 'pt-4 mt-auto self-stretch'
151- }"
152- >
153- <template #body >
154- <UUser
155- :name =" useStyleName(project.name)"
156- :description =" project.description"
157- :avatar =" { src: project.owner.avatar_url, alt: project.owner.login }"
158- size =" lg"
159- class =" relative"
160- orientation =" vertical"
161- :ui =" {
162- description: 'text-xs pt-1'
163-
164- }"
165- />
166- </template >
167-
168- <template #footer >
169- <div class =" flex items-center justify-between text-xs text-gray-500" >
170- <span
171- v-if =" project.updated_at"
172- class =" self-stretch"
173- >
174- {{ useStyleDate(project.updated_at) }}
175- </span >
176-
177- <div class =" space-x-2 flex items-center" >
178- <span
179- v-if =" project.stargazers_count > 0"
180- class =" flex items-center"
181- >
182- <UIcon
183- name =" i-lucide-star"
184- class =" mr-1 size-3"
185- />
186- {{ useStyleCount(project.stargazers_count) }}
187- </span >
188- <span
189- v-if =" project.forks_count > 0"
190- class =" flex items-center"
191- >
192- <UIcon
193- name =" i-lucide-git-fork"
194- class =" mr-1 size-3"
195- />
196- {{ useStyleCount(project.forks_count) }}
197- </span >
198- </div >
199- </div >
200- </template >
201- </UPageCard >
202- </template >
203- </UPageGrid >
135+ <ProjectsGitHubGrid
136+ :items =" projects"
137+ :items-to-show =" page.projects.itemsToShow"
138+ :spotlight =" true"
139+ spotlight-class =" [--spotlight-color:var(--ui-primary)] [--spotlight-size:360px]"
140+ :loading =" loadingProjects"
141+ />
204142 </UPageSection >
205143
206144 <UContainer
0 commit comments