Skip to content

Commit 5871442

Browse files
committed
fix issue, Image loading order is not F pattern. #5
1 parent a3045de commit 5871442

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

app/campus-life/page.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -333,15 +333,15 @@ export default function CampusLifePage() {
333333
<h2 className="text-3xl font-display font-bold mb-4">Life at BIT</h2>
334334
<p className="text-muted-foreground">Everything you need within walking distance.</p>
335335
</div>
336-
<div className="grid grid-cols-2 md:grid-cols-3 gap-6">
336+
<div className="flex flex-wrap gap-6">
337337
{facilities.map((item, idx) => (
338338
<motion.div
339339
key={idx}
340340
initial={{ opacity: 0, scale: 0.95 }}
341341
whileInView={{ opacity: 1, scale: 1 }}
342342
viewport={{ once: true, margin: "-50px" }}
343343
transition={{ delay: idx * 0.05 }}
344-
className="bg-white/60 backdrop-blur-sm p-6 rounded-2xl border border-white/40 hover:bg-white/80 transition-colors"
344+
className="bg-white/60 backdrop-blur-sm p-6 rounded-2xl border border-white/40 hover:bg-white/80 transition-colors w-[calc(50%-0.75rem)] md:w-[calc(33.333%-1rem)]"
345345
>
346346
<item.icon className="w-8 h-8 text-primary mb-4" />
347347
<h3 className="font-bold text-lg mb-2">{item.title}</h3>
@@ -354,15 +354,15 @@ export default function CampusLifePage() {
354354
{/* Gallery */}
355355
<div>
356356
<h2 className="text-3xl font-display font-bold mb-12 text-center">Campus Moments</h2>
357-
<div className="mb-24 columns-2 md:columns-3 gap-4 md:gap-6">
357+
<div className="mb-24 flex flex-wrap gap-4 md:gap-6">
358358
{galleryImages.map((img, idx) => (
359359
<motion.div
360360
key={idx}
361361
initial={{ opacity: 0, scale: 0.9 }}
362362
whileInView={{ opacity: 1, scale: 1 }}
363363
viewport={{ once: true, margin: "-50px" }}
364364
transition={{ delay: idx * 0.1 }}
365-
className="relative rounded-2xl overflow-hidden group break-inside-avoid mb-6"
365+
className="relative rounded-2xl overflow-hidden group w-[calc(50%-0.5rem)] md:w-[calc(33.333%-1rem)]"
366366
>
367367
<div className="absolute inset-0 bg-gradient-to-t from-black/60 via-transparent to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300 z-10" />
368368
<BlurImage

0 commit comments

Comments
 (0)