Galerie photo : - Ajout du layout photo avec slideshow plein écran - Navigation par catégories (portraits, paysages, nature, etc.) - Section "Fil Photo" avec posts illustrés (photoBlogPosts) - Lightbox pour les albums de catégories - Composants : Slideshow, CategoryNav, CategoryGrid, Lightbox, MasonryGallery Nettoyage : - Suppression du contenu démo du template (posts, images, about) - Consolidation src/collections/ dans src/data/ - Suppression du config.js dupliqué (garde config.ts) - Nettoyage des assets inutilisés (posts/, experiences/) Corrections : - Favicon récupéré du site actuel - Chemins favicon corrigés dans les layouts UI : - Page d'accueil mise à jour - Header/Footer simplifiés - Nouvelle page À propos
155 lines
No EOL
2.7 KiB
Text
155 lines
No EOL
2.7 KiB
Text
---
|
|
import { Image } from 'astro:assets';
|
|
import ScrollIndicator from './ScrollIndicator.astro';
|
|
|
|
interface Props {
|
|
title: string;
|
|
description?: string;
|
|
date?: Date;
|
|
tags?: string[];
|
|
coverImage?: ImageMetadata;
|
|
scrollTarget?: string;
|
|
}
|
|
|
|
const { title, description, date, tags, coverImage, scrollTarget = '.info-section' } = Astro.props;
|
|
---
|
|
|
|
{coverImage && (
|
|
<div class="hero-image">
|
|
<Image src={coverImage} alt={title} widths={[800, 1200, 1920]} formats={['webp', 'avif']} />
|
|
<div class="hero-overlay">
|
|
<div class="hero-content">
|
|
<h1 class="album-title">{title}</h1>
|
|
{description && <p class="album-description">{description}</p>}
|
|
{date && (
|
|
<time class="album-date">
|
|
{date.toLocaleDateString('fr-FR', {
|
|
year: 'numeric',
|
|
month: 'long',
|
|
day: 'numeric'
|
|
})}
|
|
</time>
|
|
)}
|
|
</div>
|
|
<ScrollIndicator targetSelector={scrollTarget} />
|
|
</div>
|
|
</div>
|
|
)}
|
|
|
|
{tags && tags.length > 0 && (
|
|
<div class="info-section">
|
|
<div class="album-tags">
|
|
{tags.map(tag => (
|
|
<span class="tag">{tag}</span>
|
|
))}
|
|
</div>
|
|
</div>
|
|
)}
|
|
|
|
<style>
|
|
.hero-image {
|
|
width: 100%;
|
|
height: calc(100vh - var(--header-height, 53px) - var(--footer-height, 54px));
|
|
overflow: hidden;
|
|
position: relative;
|
|
}
|
|
|
|
.hero-image img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.hero-overlay {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: rgba(0, 0, 0, 0.4);
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.hero-content {
|
|
text-align: center;
|
|
color: white;
|
|
width: 100%;
|
|
padding: 0 20px;
|
|
}
|
|
|
|
.album-title {
|
|
font-size: 64px;
|
|
font-weight: 600;
|
|
margin: 0 0 16px 0;
|
|
letter-spacing: -2px;
|
|
color: white;
|
|
text-align: center;
|
|
}
|
|
|
|
.album-description {
|
|
font-size: 18px;
|
|
font-weight: 300;
|
|
margin: 0 auto;
|
|
color: rgba(255, 255, 255, 0.9);
|
|
max-width: 600px;
|
|
line-height: 1.4;
|
|
text-align: center;
|
|
}
|
|
|
|
.album-date {
|
|
font-size: 16px;
|
|
margin-top: 12px;
|
|
color: rgba(255, 255, 255, 0.8);
|
|
display: block;
|
|
text-align: center;
|
|
}
|
|
|
|
.info-section {
|
|
padding: 20px;
|
|
text-align: center;
|
|
}
|
|
|
|
.album-tags {
|
|
display: flex;
|
|
gap: 8px;
|
|
flex-wrap: wrap;
|
|
justify-content: center;
|
|
}
|
|
|
|
.tag {
|
|
background: rgba(255, 255, 255, 0.2);
|
|
padding: 6px 12px;
|
|
border-radius: 16px;
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
color: white;
|
|
}
|
|
|
|
@media (max-width: 767px) {
|
|
.album-title {
|
|
font-size: 36px;
|
|
letter-spacing: -1px;
|
|
}
|
|
|
|
.album-description {
|
|
font-size: 16px;
|
|
}
|
|
|
|
.info-section {
|
|
padding: 30px 20px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.album-title {
|
|
font-size: 28px;
|
|
}
|
|
|
|
.info-section {
|
|
padding: 20px 15px;
|
|
}
|
|
}
|
|
</style> |