37 lines
880 B
Text
37 lines
880 B
Text
|
|
---
|
||
|
|
import PhotoLayout from '../../../layouts/PhotoLayout.astro';
|
||
|
|
import CategoryGrid from '../../../components/photo/CategoryGrid.astro';
|
||
|
|
|
||
|
|
export async function getStaticPaths() {
|
||
|
|
const categories = [
|
||
|
|
'blog', 'portraits', 'places', 'nature',
|
||
|
|
'cultures', 'music', 'sports', 'engines', 'everyday'
|
||
|
|
];
|
||
|
|
|
||
|
|
return categories.map(category => ({
|
||
|
|
params: { category },
|
||
|
|
props: { category }
|
||
|
|
}));
|
||
|
|
}
|
||
|
|
|
||
|
|
const { category } = Astro.params;
|
||
|
|
|
||
|
|
const categoryLabels = {
|
||
|
|
'blog': 'Blog',
|
||
|
|
'portraits': 'Portraits',
|
||
|
|
'places': 'Paysages',
|
||
|
|
'nature': 'Nature',
|
||
|
|
'cultures': 'Cultures',
|
||
|
|
'music': 'Musique',
|
||
|
|
'sports': 'Sports',
|
||
|
|
'engines': 'Moteurs',
|
||
|
|
'everyday': 'Quotidien'
|
||
|
|
};
|
||
|
|
|
||
|
|
const title = `Galerie ${categoryLabels[category] || category} - Jalil Arfaoui`;
|
||
|
|
---
|
||
|
|
|
||
|
|
<PhotoLayout title={title} enableScroll={true}>
|
||
|
|
<CategoryGrid category={category} />
|
||
|
|
</PhotoLayout>
|