add better hero

This commit is contained in:
ordinarthur 2026-04-05 15:11:41 +02:00
parent fdcccd49aa
commit 4c444dc682
3 changed files with 107 additions and 76 deletions

1
.astro/types.d.ts vendored
View File

@ -1 +1,2 @@
/// <reference types="astro/client" /> /// <reference types="astro/client" />
/// <reference path="content.d.ts" />

View File

@ -1,6 +1,6 @@
--- ---
const currentPath = Astro.url.pathname; const currentPath = Astro.url.pathname;
const isHome = currentPath === '/'; const isHome = false; // hero is now white bg, no dark variant needed
const nav = [ const nav = [
{ label: 'projets', href: '/creations-evenement' }, { label: 'projets', href: '/creations-evenement' },
{ label: 'pérenne', href: '/realisations-perennes' }, { label: 'pérenne', href: '/realisations-perennes' },

View File

@ -2,9 +2,7 @@
import BaseLayout from '../layouts/BaseLayout.astro'; import BaseLayout from '../layouts/BaseLayout.astro';
import { getMockFeaturedProjects, getMockProjects } from '../lib/mock-data'; import { getMockFeaturedProjects, getMockProjects } from '../lib/mock-data';
const featured = getMockFeaturedProjects();
const allProjects = getMockProjects(); const allProjects = getMockProjects();
// Pick 6 best projects for the index
const showcase = [ const showcase = [
allProjects.find(p => p.slug.current === 'moet-chandon'), allProjects.find(p => p.slug.current === 'moet-chandon'),
allProjects.find(p => p.slug.current === 'dior-christmas'), allProjects.find(p => p.slug.current === 'dior-christmas'),
@ -14,30 +12,47 @@ const showcase = [
allProjects.find(p => p.slug.current === 'ami'), allProjects.find(p => p.slug.current === 'ami'),
].filter(Boolean); ].filter(Boolean);
// 4 images for the hero strip
const stripImages = [
{ src: '/images/events/alula/06.jpg', alt: 'AlUla' },
{ src: '/images/events/ami/04.jpg', alt: 'AMI Paris' },
{ src: '/images/perennes/cisco/03.jpeg', alt: 'Cisco' },
{ src: '/images/events/moet/05.jpg', alt: 'Moët' },
];
const allEvents = getMockProjects('event'); const allEvents = getMockProjects('event');
const allPerennes = getMockProjects('perenne'); const allPerennes = getMockProjects('perenne');
--- ---
<BaseLayout> <BaseLayout>
<!-- ====== HERO: full-viewport image with name overlay ====== --> <!-- ====== HERO: white bg, big typo, photo strip below ====== -->
<section class="hero"> <section class="hero">
<div class="hero__img"> <div class="wrap">
<img src="/images/events/dior/01.jpeg" alt="Dior Christmas" /> <div class="hero__content">
<h1 class="hero__name">
<span class="hero__line hero__line--1">Aurélie</span>
<span class="hero__line hero__line--2">Barré</span>
</h1>
<div class="hero__info">
<p class="hero__role">directrice artistique<br />& design d'intérieur</p>
<div class="hero__scroll-hint">
<div class="hero__scroll-line"></div>
</div>
</div>
</div>
</div> </div>
<div class="hero__content">
<h1 class="hero__name"> <!-- Photo strip: 4 images edge-to-edge -->
<span class="hero__line">Aurélie</span> <div class="hero__strip">
<span class="hero__line">Barré</span> {stripImages.map((img, i) => (
</h1> <div class="hero__strip-img" style={`--i:${i}`}>
<p class="hero__role">directrice artistique & design d'intérieur</p> <img src={img.src} alt={img.alt} />
</div> </div>
<div class="hero__scroll"> ))}
<span>scroll</span>
<div class="hero__scroll-line"></div>
</div> </div>
</section> </section>
<!-- ====== FEATURED: hover-reveal image grid ====== --> <!-- ====== FEATURED: asymmetric grid ====== -->
<section class="feat"> <section class="feat">
<div class="wrap"> <div class="wrap">
<span class="label rv">sélection</span> <span class="label rv">sélection</span>
@ -65,7 +80,7 @@ const allPerennes = getMockProjects('perenne');
</div> </div>
</section> </section>
<!-- ====== PROJECT INDEX: text list with hover image ====== --> <!-- ====== PROJECT INDEX ====== -->
<section class="idx"> <section class="idx">
<div class="wrap"> <div class="wrap">
<div class="idx__head"> <div class="idx__head">
@ -114,12 +129,12 @@ const allPerennes = getMockProjects('perenne');
</div> </div>
</section> </section>
<!-- ====== ABOUT TEASER ====== --> <!-- ====== ABOUT ====== -->
<section class="about"> <section class="about">
<div class="wrap"> <div class="wrap">
<div class="about__inner rv"> <div class="about__inner rv">
<p class="about__text"> <p class="about__text">
Aurélie Barré conçoit des espaces qui racontent. Du siège social au lancement produit, Du siège social au lancement produit,
chaque projet naît d'une écoute attentive et se construit dans le souci du détail. chaque projet naît d'une écoute attentive et se construit dans le souci du détail.
</p> </p>
<a href="/processus" class="about__link"> <a href="/processus" class="about__link">
@ -182,75 +197,61 @@ const allPerennes = getMockProjects('perenne');
<style> <style>
/* ---- Hero ---- */ /* ---- Hero ---- */
.hero { .hero {
position: relative; padding-top: calc(var(--header-h) + 4vh);
height: 100vh; padding-bottom: 0;
overflow: hidden; min-height: 100vh;
} display: flex;
flex-direction: column;
.hero__img { justify-content: space-between;
position: absolute;
inset: 0;
}
.hero__img img {
width: 100%;
height: 100%;
object-fit: cover;
filter: brightness(0.7);
} }
.hero__content { .hero__content {
position: absolute; padding-bottom: 3rem;
bottom: 0;
left: 0;
right: 0;
padding: 0 var(--pad) 8vh;
z-index: 2;
} }
.hero__name { .hero__name {
font-size: clamp(3.5rem, 10vw, 9rem); font-size: clamp(4rem, 12vw, 11rem);
line-height: 0.92; line-height: 0.88;
color: #fff; letter-spacing: -0.04em;
letter-spacing: -0.03em; color: var(--text);
margin-bottom: 1.5rem; margin-bottom: 2rem;
} }
.hero__line { .hero__line {
display: block; display: block;
} }
.hero__line--2 {
font-style: italic;
color: var(--text-2);
}
.hero__info {
display: flex;
justify-content: space-between;
align-items: flex-end;
}
.hero__role { .hero__role {
font-family: var(--sans); font-family: var(--sans);
font-size: 0.7rem; font-size: 0.7rem;
font-weight: 300; font-weight: 300;
letter-spacing: 0.12em; letter-spacing: 0.1em;
color: rgba(255,255,255,0.65); line-height: 1.7;
color: var(--text-3);
max-width: none; max-width: none;
} }
.hero__scroll { .hero__scroll-hint {
position: absolute;
bottom: 3vh;
right: var(--pad);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
gap: 8px;
z-index: 2;
}
.hero__scroll span {
font-size: 0.55rem;
letter-spacing: 0.2em;
color: rgba(255,255,255,0.45);
writing-mode: vertical-rl;
} }
.hero__scroll-line { .hero__scroll-line {
width: 1px; width: 1px;
height: 40px; height: 50px;
background: rgba(255,255,255,0.25); background: var(--border);
position: relative; position: relative;
overflow: hidden; overflow: hidden;
} }
@ -262,8 +263,8 @@ const allPerennes = getMockProjects('perenne');
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
background: rgba(255,255,255,0.8); background: var(--text-3);
animation: scrollLine 2s ease-in-out infinite; animation: scrollLine 2.5s ease-in-out infinite;
} }
@keyframes scrollLine { @keyframes scrollLine {
@ -272,9 +273,39 @@ const allPerennes = getMockProjects('perenne');
100% { top: 100%; } 100% { top: 100%; }
} }
/* Photo strip — 4 images, edge to edge, no padding */
.hero__strip {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 3px;
width: 100%;
}
.hero__strip-img {
aspect-ratio: 3 / 2;
overflow: hidden;
}
.hero__strip-img img {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.8s var(--ease);
}
.hero__strip-img:hover img {
transform: scale(1.04);
}
/* Dim siblings */
.hero__strip:hover .hero__strip-img:not(:hover) img {
filter: brightness(0.85);
transition: filter 0.4s, transform 0.8s var(--ease);
}
/* ---- Featured Grid ---- */ /* ---- Featured Grid ---- */
.feat { .feat {
padding: 10rem 0 6rem; padding: 8rem 0 6rem;
} }
.feat .label { .feat .label {
@ -295,7 +326,6 @@ const allPerennes = getMockProjects('perenne');
color: inherit; color: inherit;
} }
/* Asymmetric placement — each item gets its own span */
.feat__item:nth-child(1) { grid-column: 1 / 8; } .feat__item:nth-child(1) { grid-column: 1 / 8; }
.feat__item:nth-child(2) { grid-column: 8 / 13; } .feat__item:nth-child(2) { grid-column: 8 / 13; }
.feat__item:nth-child(3) { grid-column: 1 / 5; } .feat__item:nth-child(3) { grid-column: 1 / 5; }
@ -323,7 +353,6 @@ const allPerennes = getMockProjects('perenne');
transform: scale(1.04); transform: scale(1.04);
} }
/* Dim siblings on any hover */
.feat__grid:hover .feat__item:not(:hover) .feat__img img { .feat__grid:hover .feat__item:not(:hover) .feat__img img {
filter: brightness(0.85); filter: brightness(0.85);
} }
@ -464,6 +493,15 @@ const allPerennes = getMockProjects('perenne');
/* ---- Responsive ---- */ /* ---- Responsive ---- */
@media (max-width: 768px) { @media (max-width: 768px) {
.hero__name {
font-size: clamp(3rem, 14vw, 5rem);
}
.hero__strip {
grid-template-columns: 1fr 1fr;
gap: 2px;
}
.feat__grid { .feat__grid {
grid-template-columns: 1fr 1fr; grid-template-columns: 1fr 1fr;
gap: 0.75rem; gap: 0.75rem;
@ -476,19 +514,11 @@ const allPerennes = getMockProjects('perenne');
.feat__item:nth-child(5) { grid-column: 1 / 2; } .feat__item:nth-child(5) { grid-column: 1 / 2; }
.feat__item:nth-child(6) { grid-column: 2 / 3; } .feat__item:nth-child(6) { grid-column: 2 / 3; }
.feat__item:nth-child(2) .feat__img,
.feat__item:nth-child(3) .feat__img { aspect-ratio: 3 / 4; }
.idx__row { .idx__row {
grid-template-columns: 2rem 1fr 3rem; grid-template-columns: 2rem 1fr 3rem;
} }
.idx__client { display: none; } .idx__client { display: none; }
.cursor-img { display: none; } .cursor-img { display: none; }
.hero__name {
font-size: clamp(2.8rem, 12vw, 5rem);
}
} }
</style> </style>