138 lines
3.8 KiB
Plaintext
138 lines
3.8 KiB
Plaintext
---
|
|
import BaseLayout from '../../layouts/BaseLayout.astro';
|
|
import MasonryGallery from '../../components/MasonryGallery.astro';
|
|
import { getMockProjects, getMockProjectBySlug } from '../../lib/mock-data';
|
|
|
|
export function getStaticPaths() {
|
|
return getMockProjects('perenne').map(p => ({ params: { slug: p.slug.current } }));
|
|
}
|
|
|
|
const { slug } = Astro.params;
|
|
const project = getMockProjectBySlug(slug!);
|
|
if (!project) return Astro.redirect('/realisations-perennes');
|
|
|
|
const date = new Date(project.date).toLocaleDateString('fr-FR', { year: 'numeric', month: 'long' });
|
|
---
|
|
|
|
<BaseLayout title={`${project.title} — Aurélie Barré`} description={project.description}>
|
|
<section class="phero">
|
|
<div class="phero__img">
|
|
<img src={project.heroImage} alt={project.title} />
|
|
</div>
|
|
<div class="phero__overlay"></div>
|
|
</section>
|
|
|
|
<section class="pinfo">
|
|
<div class="wrap">
|
|
<div class="pinfo__top rv">
|
|
<h1 class="pinfo__title">{project.title}</h1>
|
|
<div class="pinfo__meta">
|
|
<div class="pinfo__col">
|
|
<span class="label">client</span>
|
|
<span class="pinfo__val">{project.client}</span>
|
|
</div>
|
|
<div class="pinfo__col">
|
|
<span class="label">date</span>
|
|
<span class="pinfo__val">{date}</span>
|
|
</div>
|
|
{project.location && (
|
|
<div class="pinfo__col">
|
|
<span class="label">lieu</span>
|
|
<span class="pinfo__val">{project.location}</span>
|
|
</div>
|
|
)}
|
|
</div>
|
|
</div>
|
|
<p class="pinfo__desc rv" style="--d:2">{project.description}</p>
|
|
</div>
|
|
</section>
|
|
|
|
{project.gallery && project.gallery.length > 0 && (
|
|
<section class="pgallery">
|
|
<div class="wrap">
|
|
<MasonryGallery
|
|
images={project.gallery.map(img => ({ src: img.src, alt: img.alt }))}
|
|
/>
|
|
</div>
|
|
</section>
|
|
)}
|
|
|
|
<section class="pnav">
|
|
<div class="wrap">
|
|
<a href="/realisations-perennes/" class="pnav__link">
|
|
<svg width="14" height="14" viewBox="0 0 16 16" fill="none">
|
|
<path d="M13 8H3M3 8L7 4M3 8L7 12" stroke="currentColor" stroke-width="1"/>
|
|
</svg>
|
|
retour
|
|
</a>
|
|
</div>
|
|
</section>
|
|
</BaseLayout>
|
|
|
|
<style>
|
|
.phero {
|
|
position: relative;
|
|
height: 75vh;
|
|
min-height: 500px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.phero__img { position: absolute; inset: 0; }
|
|
.phero__img img { width: 100%; height: 100%; object-fit: cover; }
|
|
.phero__overlay {
|
|
position: absolute; inset: 0;
|
|
background: linear-gradient(to bottom, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0.02) 100%);
|
|
}
|
|
|
|
.pinfo { padding: 4rem 0 3rem; }
|
|
|
|
.pinfo__top {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: flex-start;
|
|
gap: 2rem;
|
|
padding-bottom: 2.5rem;
|
|
border-bottom: 1px solid var(--border-light);
|
|
margin-bottom: 2.5rem;
|
|
}
|
|
|
|
.pinfo__title {
|
|
font-size: clamp(1.8rem, 4vw, 3rem);
|
|
max-width: 55%;
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.pinfo__meta { display: flex; gap: 2.5rem; flex-shrink: 0; }
|
|
.pinfo__col { display: flex; flex-direction: column; gap: 0.35rem; }
|
|
.pinfo__val { font-size: 0.85rem; color: var(--text); }
|
|
|
|
.pinfo__desc {
|
|
font-size: 1.05rem;
|
|
line-height: 1.75;
|
|
color: var(--text-2);
|
|
max-width: 650px;
|
|
}
|
|
|
|
.pgallery { padding: 2rem 0 6rem; }
|
|
|
|
.pnav { padding: 0 0 5rem; }
|
|
.pnav__link {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
font-size: 0.7rem;
|
|
letter-spacing: 0.08em;
|
|
color: var(--text-3);
|
|
text-decoration: none;
|
|
transition: color 0.2s;
|
|
}
|
|
.pnav__link:hover { color: var(--text); }
|
|
|
|
@media (max-width: 768px) {
|
|
.phero { height: 55vh; }
|
|
.pinfo__top { flex-direction: column; }
|
|
.pinfo__title { max-width: 100%; }
|
|
.pinfo__meta { flex-wrap: wrap; gap: 1.5rem; }
|
|
}
|
|
</style>
|