File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22import { getCollection } from ' astro:content' ;
33import BaseLayout from ' @layouts/BaseLayout.astro' ;
44import ProjectCard from ' @components/ProjectCard.astro' ;
5+ import ImageGalleryModal from ' @components/ImageGalleryModal.astro' ;
56import { getLangFromUrl , useTranslations } from ' @i18n/utils' ;
67
78const lang = getLangFromUrl (Astro .url );
@@ -63,7 +64,7 @@ const getCategoryName = (category: string) => {
6364 class = " project-item"
6465 data-category = { project .data .category .toLowerCase ()}
6566 >
66- <ProjectCard { ... project .data } />
67+ <ProjectCard { ... project .data } id = { project . data . id } />
6768 </div >
6869 ))}
6970 </div >
@@ -91,6 +92,9 @@ const getCategoryName = (category: string) => {
9192 </button >
9293 </div >
9394 </div >
95+
96+ <!-- Image Gallery Modals (rendered at page level) -->
97+ <ImageGalleryModal projects ={ sortedProjects .map (p => ({ id: p .data .id , title: p .data .title , images: p .data .images }))} />
9498</BaseLayout >
9599
96100<style >
Original file line number Diff line number Diff line change 22import { getCollection } from ' astro:content' ;
33import BaseLayout from ' @layouts/BaseLayout.astro' ;
44import ProjectCard from ' @components/ProjectCard.astro' ;
5+ import ImageGalleryModal from ' @components/ImageGalleryModal.astro' ;
56import { getLangFromUrl , useTranslations } from ' @i18n/utils' ;
67
78const lang = getLangFromUrl (Astro .url );
@@ -63,7 +64,7 @@ const getCategoryName = (category: string) => {
6364 class = " project-item"
6465 data-category = { project .data .category .toLowerCase ()}
6566 >
66- <ProjectCard { ... project .data } />
67+ <ProjectCard { ... project .data } id = { project . data . id } />
6768 </div >
6869 ))}
6970 </div >
@@ -91,6 +92,9 @@ const getCategoryName = (category: string) => {
9192 </button >
9293 </div >
9394 </div >
95+
96+ <!-- Image Gallery Modals (rendered at page level) -->
97+ <ImageGalleryModal projects ={ sortedProjects .map (p => ({ id: p .data .id , title: p .data .title , images: p .data .images }))} />
9498</BaseLayout >
9599
96100<style >
You can’t perform that action at this time.
0 commit comments