The portfolio showcase is the core feature of the website, displaying Juan Roccia’s work through an elegant, responsive project gallery powered by Astro’s content collections.
The portfolio showcase consists of two main pages:
Home Page (/index.astro) - Featured projects (4 most recent)
Work Page (/work.astro) - Complete project gallery (all projects)
Individual Project Pages (/work/[slug].astro) - Detailed project information
All portfolio projects are sourced from Astro content collections in /src/content/work/, ensuring type-safe content management with automatic validation.
The dedicated work page displays all portfolio projects without limitation:
---import { getCollection } from 'astro:content';import BaseLayout from '../layouts/BaseLayout.astro';import PortfolioPreview from '../components/PortfolioPreview.astro';import Hero from '../components/Hero.astro';import Grid from '../components/Grid.astro';import ContactCTA from '../components/ContactCTA.astro';const projects = (await getCollection('work')).sort( (a, b) => b.data.publishDate.valueOf() - a.data.publishDate.valueOf());---<BaseLayout title="My Work | Juan Roccia" description="Learn about Juan Roccia's most recent projects"> <div class="stack gap-20"> <main class="wrapper stack gap-8"> <Hero title="Mi Trabajo" tagline="Podes ver los proyectos más recientes a continuación para hacerte una idea de mi talento y experiencia." align="start" /> <Grid variant="offset"> { projects.map((project) => ( <li> <PortfolioPreview project={project} /> </li> )) } </Grid> </main> <ContactCTA /> </div></BaseLayout>
Each project includes rich metadata for categorization and filtering:
---title: AudioGPTpublishDate: 2024-03-10 00:00:00img: /assets/stock-2.jpgimg_alt: AudioGPT application interfacedescription: | Aplicación de inteligencia artificial que convierte texto a voz con diversas opciones de personalización y control.tags: - AI - Audio Generation - Web App - Speech Synthesis---## AudioGPT: Generación de voz avanzada con IAEste proyecto combina tecnologías de procesamiento de lenguaje natural y síntesis de voz...
All project pages are pre-rendered at build time for instant loading
2
Lazy Loading
Images load only when entering the viewport, reducing initial page weight
3
Async Decoding
Browser decodes images asynchronously without blocking the main thread
4
Optimized Sorting
Projects sorted once at build time, not on each page load
The portfolio showcase demonstrates Astro’s strengths: type-safe content management, zero-JS by default, and excellent performance through static site generation.