Skip to content

Commit 4fdf494

Browse files
authored
add speaker & add lazy loading on pages (#43)
1 parent befb964 commit 4fdf494

File tree

6 files changed

+96
-30
lines changed

6 files changed

+96
-30
lines changed
49.6 KB
Loading

public/krypto-tour/timetable.webp

1.12 KB
Loading

src/components/SponsorsSection.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const SponsorsSection = () => {
6969
items: { name: string; logo: string }[],
7070
autoScrollSpeed: number
7171
) => (
72-
<section className="py-12">
72+
<section className="py-12" style={{ contentVisibility: 'auto', containIntrinsicSize: '800px' }}>
7373
<div className="max-w-7xl mx-auto px-6">
7474
<h3 className="text-white text-2xl md:text-3xl font-bold text-center mb-8">{title}</h3>
7575
<div className="relative">
@@ -82,6 +82,9 @@ const SponsorsSection = () => {
8282
src={item.logo}
8383
alt={item.name}
8484
loading="lazy"
85+
decoding="async"
86+
width={256}
87+
height={64}
8588
className="h-16 w-auto max-w-full object-contain"
8689
/>
8790
</div>
@@ -96,7 +99,7 @@ const SponsorsSection = () => {
9699

97100
// Media carousel (autoplay)
98101
const renderMediaCarousel = (title: string, items: { name: string; logo: string }[], autoScrollSpeed: number) => (
99-
<section className="py-16 border-t border-slate-800">
102+
<section className="py-16 border-t border-slate-800" style={{ contentVisibility: 'auto', containIntrinsicSize: '700px' }}>
100103
<div className="max-w-7xl mx-auto px-6">
101104
<h3 className="text-white text-3xl font-bold text-center mb-12">{title}</h3>
102105
<div className="relative">
@@ -109,6 +112,9 @@ const SponsorsSection = () => {
109112
src={outlet.logo}
110113
alt={outlet.name}
111114
loading="lazy"
115+
decoding="async"
116+
width={256}
117+
height={64}
112118
className="h-16 w-auto max-w-full object-contain"
113119
/>
114120
</div>

src/pages/AntenneDetail.tsx

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,9 @@ const AntenneDetail = () => {
494494
src={antenne.schoolLogo}
495495
alt={antenne.school}
496496
loading="lazy"
497+
decoding="async"
498+
width={112}
499+
height={112}
497500
className="max-w-28 max-h-28 bg-white rounded-lg p-2 object-contain"
498501
/>
499502
<div>
@@ -516,7 +519,7 @@ const AntenneDetail = () => {
516519
</div>
517520
</section>
518521
{/* Bureau Section */}
519-
<section className="py-20">
522+
<section className="py-20" style={{ contentVisibility: 'auto', containIntrinsicSize: '1200px' }}>
520523
<div className="max-w-7xl mx-auto px-6">
521524
<h2 className="text-4xl font-bold text-white text-center mb-16">
522525
{t('branches.bureauYear').replace('{city}', antenne.name)}
@@ -526,15 +529,19 @@ const AntenneDetail = () => {
526529
{antenne.bureau.map((member, index) => (
527530
<div
528531
key={index}
529-
className="bg-slate-800/50 backdrop-blur-lg rounded-2xl border border-slate-700/50 hover:border-blue-500/50 transition-all duration-300 group hover:shadow-2xl hover:shadow-blue-500/10 overflow-hidden"
532+
className="bg-slate-800/50 md:backdrop-blur-lg rounded-2xl border border-slate-700/50 hover:border-blue-500/50 transition-all duration-300 group hover:shadow-2xl hover:shadow-blue-500/10 overflow-hidden"
533+
style={{ contain: 'paint' }}
530534
>
531535
<div className="p-8 text-center">
532536
<div className="w-32 h-32 rounded-xl overflow-hidden mx-auto mb-6 border-2 border-blue-500/30 group-hover:border-blue-400 transition-all duration-300">
533537
<img
534538
src={member.photo}
535539
alt={member.name}
536540
loading="lazy"
537-
className="w-full h-full object-cover transform group-hover:scale-105 transition-transform duration-300"
541+
decoding="async"
542+
width={128}
543+
height={128}
544+
className="w-full h-full object-cover md:transform-gpu md:group-hover:scale-105 transition-transform duration-300"
538545
/>
539546
</div>
540547
<h3 className="text-xl font-bold mb-2 text-white group-hover:text-blue-300 transition-colors">
@@ -551,7 +558,7 @@ const AntenneDetail = () => {
551558
</section>
552559

553560
{/* Contact & Map Section */}
554-
<section className="py-20 bg-slate-800/30">
561+
<section className="py-20 bg-slate-800/30" style={{ contentVisibility: 'auto', containIntrinsicSize: '900px' }}>
555562
<div className="max-w-7xl mx-auto px-6">
556563
<div className="grid grid-cols-1 lg:grid-cols-2 gap-12">
557564
{/* Contact Info */}
@@ -601,17 +608,20 @@ const AntenneDetail = () => {
601608

602609
{/* Gallery Section */}
603610
{antenne.gallery && antenne.gallery.length > 0 && (
604-
<section className="py-20">
611+
<section className="py-20" style={{ contentVisibility: 'auto', containIntrinsicSize: '900px' }}>
605612
<div className="max-w-7xl mx-auto px-6">
606613
<h2 className="text-3xl font-bold text-white text-center mb-16">{t('branches.gallery')}</h2>
607614
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
608615
{antenne.gallery.map((image, index) => (
609-
<div key={index} className="aspect-video rounded-xl overflow-hidden bg-slate-800">
616+
<div key={index} className="aspect-video rounded-xl overflow-hidden bg-slate-800" style={{ contain: 'paint' }}>
610617
<img
611618
src={image}
612619
alt={`${t('branches.gallery')} ${index + 1}`}
613620
loading="lazy"
614-
className="w-full h-full object-cover hover:scale-105 transition-transform duration-300"
621+
decoding="async"
622+
width={1280}
623+
height={720}
624+
className="w-full h-full object-cover md:transform-gpu md:hover:scale-105 transition-transform duration-300"
615625
/>
616626
</div>
617627
))}

src/pages/Antennes.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ const Antennes = () => {
122122
coordinates: { lat: 49.238939, lng: 4.002990 },
123123
school: 'NEOMA',
124124
description: t('antennes.neoma.littleDescription'),
125-
image: 'https://www.fondation-neoma.fr/sites/fondation/files/styles/w2000/public/2023-11/NEOMA_Front.png?h=fb205de0&itok=sDaXH5eq',
125+
image: 'https://neoma-bs.fr/sites/default/files/styles/press_release_content_md/public/img/HenningLarsen_ReimsSchool_LobbyView_Final_Sora-1-scaled.jpg?itok=-STT0oRW',
126126
},
127127
{
128128
id: 'aes',

0 commit comments

Comments
 (0)