Skip to content

Commit c231d45

Browse files
authored
Merge pull request #45 from Anwesha28S/Footer_Events
<refractor>Event Carousel,Logo Update,Footer Revamp
2 parents 2d079c1 + 4f3c84c commit c231d45

6 files changed

Lines changed: 78 additions & 32 deletions

File tree

src/components/EventCard.jsx

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,41 @@
1-
import React from "react";
1+
import React, { useState, useEffect } from "react";
2+
3+
const EventCard = ({ title, description, images }) => {
4+
const [currentImageIndex, setCurrentImageIndex] = useState(0);
5+
6+
// Auto-change image every 3 seconds
7+
useEffect(() => {
8+
if (!images || images.length <= 1) return; // skip if 0 or 1 image
9+
const interval = setInterval(() => {
10+
setCurrentImageIndex((prevIndex) => (prevIndex + 1) % images.length);
11+
}, 3000);
12+
return () => clearInterval(interval);
13+
}, [images]);
214

3-
const EventCard = ({ title, description, image }) => {
415
return (
516
<div className="bg-gray-50 rounded-xl shadow-md overflow-hidden flex flex-col md:flex-row border-2 border-[#0B2044]">
6-
<img
7-
src={image}
8-
alt={title}
9-
className="w-full md:w-2/5 object-cover aspect-[4/3]"
10-
/>
17+
<div className="relative w-full md:w-2/5 flex-shrink-0">
18+
<div className="w-full aspect-[16/9] relative overflow-hidden rounded-l-xl">
19+
<img
20+
src={images?.[currentImageIndex]}
21+
alt={`${title} image ${currentImageIndex + 1}`}
22+
className="w-full h-full object-cover transition-all duration-500 absolute top-0 left-0"
23+
/>
24+
</div>
25+
26+
{images?.length > 1 && (
27+
<div className="absolute bottom-2 left-2/5 transform -translate-x-1/2 flex gap-1">
28+
{images.map((_, idx) => (
29+
<span
30+
key={idx}
31+
className={`h-2 w-2 rounded-full ${
32+
idx === currentImageIndex ? "bg-white" : "bg-gray-400"
33+
}`}
34+
></span>
35+
))}
36+
</div>
37+
)}
38+
</div>
1139
<div className="p-4 flex flex-col justify-center">
1240
<h3 className="text-2xl font-semibold text-[#0B2044]">{title}</h3>
1341
<p className="text-base text-gray-600 mt-2">{description}</p>

src/components/Footer.jsx

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ const Footer = ({
1313
year = new Date().getFullYear(),
1414
}) => {
1515
return (
16-
<footer className="bg-[#0B2044] text-white px-4 py-8 sm:px-8 sm:py-10 md:px-12 md:py-12">
16+
<footer className="bg-[#0B2044] text-white px-4 pt-4 pb-8 sm:px-8 sm:pt-6 sm:pb-10 md:px-12 md:pt-8 md:pb-12">
1717
<div className="max-w-7xl mx-auto grid grid-cols-1 gap-10 sm:gap-12 md:grid-cols-3 md:gap-8">
1818
{/* Logo and Description Section */}
1919
<div className="order-1 md:order-none">
20-
<div className="flex items-center gap-4 mb-6 flex-wrap">
20+
<div className="flex items-center gap-4 mb-3 flex-wrap">
2121
<img
22-
src="https://res.cloudinary.com/dswk9scro/image/upload/v1752377324/Group_cropped_qgqzw9.png"
22+
src="https://res.cloudinary.com/dswk9scro/image/upload/v1755092506/ASME_NIT_Rourkela_Student_Section_White_T_oe5ox2.png"
2323
alt="ASME Logo"
24-
className="w-12 h-12 object-contain"
24+
className="w-24 h-20 object-contain -mt-1"
2525
/>
2626
<h2 className="text-2xl font-bold">{title}</h2>
2727
</div>
@@ -47,14 +47,9 @@ const Footer = ({
4747
</div>
4848

4949
{/* Middle Section */}
50-
<div>
51-
<h3 className="text-lg font-semibold">Quick Links</h3>
52-
<ul className="mt-2 space-y-1 text-sm">
53-
<li>
54-
<Link to="/about" className="hover:underline">
55-
About us
56-
</Link>
57-
</li>
50+
<div className="md:ml-15">
51+
<h3 className="text-2xl font-semibold">Quick Links</h3>
52+
<ul className="mt-5 space-y-3 text-base">
5853
<li>
5954
<Link to="/team" className="hover:underline">
6055
Team
@@ -79,12 +74,17 @@ const Footer = ({
7974
</div>
8075

8176
{/* Contact Info Section */}
82-
<div className="order-2 md:order-none">
77+
<div className="order-2 md:ml-6">
8378
<h3 className="text-2xl font-semibold mb-6">Contact Info</h3>
8479
<div className="text-base space-y-6">
8580
<div className="flex items-center gap-4">
8681
<FiMail className="text-[#51B8F2] text-2xl hover:text-white transition" />
87-
<span>asme.nitrkl@gmail.com</span>
82+
<a
83+
href="mailto:asme.nitrkl@gmail.com"
84+
className="no-underline hover:underline"
85+
>
86+
asme.nitrkl@gmail.com
87+
</a>
8888
</div>
8989
<div className="flex items-center gap-4">
9090
<FiPhone className="text-[#51B8F2] text-2xl hover:text-white transition" />
@@ -100,9 +100,17 @@ const Footer = ({
100100
</div>
101101
</div>
102102
</div>
103-
104-
<div className="text-center text-base mt-10 border-t border-white/20 pt-6">
105-
© {year} {title}. All rights reserved.
103+
<div className="flex flex-col md:flex-row justify-between items-center text-base mt-5 border-t border-white/20 pt-2">
104+
<p>
105+
© {year} {title}. All rights reserved.
106+
</p>
107+
<a
108+
href="https://opencodenitr.in/"
109+
target="_blank"
110+
className="hover:underline "
111+
>
112+
Architected with ♥ by Team OpenCode
113+
</a>
106114
</div>
107115
</footer>
108116
);

src/components/Navbar.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default function Navbar() {
2727
<img
2828
src={siteConfig.navigation.logo}
2929
alt="Logo"
30-
className="h-10 w-auto"
30+
className="h-16 w-auto"
3131
/>
3232
</div>
3333

src/config/events.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,30 @@ const events = [
33
title: "Dart-a-Thon",
44
description:
55
"Dart-a-Thon was an exciting hands-on challenge where participants were provided with simple DIY materials—such as stretchable rubber bands, ice cream sticks, and more—to design their own dart-launching mechanism. Using their creations, they aimed at a target board to score points. The participant with the highest score emerged as the champion, combining creativity, engineering, and precision in one thrilling competition.",
6-
image:
6+
images: [
77
"https://res.cloudinary.com/dswk9scro/image/upload/v1754816191/Dart-a-thon_z29oj0.jpg",
8+
"https://res.cloudinary.com/dswk9scro/image/upload/v1755101733/dart_a_thon_2_fzykjn.jpg",
9+
],
810
type: "past",
911
},
1012
{
1113
title: "Turbogen X",
1214
description:
1315
"Turbogen-X put participants' ingenuity to the test as they crafted custom wind blades from simple DIY materials. With limited resources and unlimited imagination, they raced to create designs capable of capturing the wind most efficiently, turning a simple build into a battle of innovation and aerodynamics.",
14-
image:
16+
images: [
1517
"https://res.cloudinary.com/dswk9scro/image/upload/v1754816173/Turbogen_x_ozbic4.jpg",
18+
],
1619
type: "past",
1720
},
1821
{
1922
title: "3D Printing Workshop",
2023
description:
2124
"An interactive 3D Printing Workshop was hosted, showcasing real-world applications and hands-on training with industry-standard software. Professionals and teachers from nearby schools attended to promote awareness of the technology. A live highlight was the 3D-printing of a chess pawn in just 30 minutes, captivating the audience.",
22-
image:
25+
images: [
2326
"https://res.cloudinary.com/dswk9scro/image/upload/v1754816159/3D_printing_workshop_nrxkho.jpg",
27+
"https://res.cloudinary.com/dswk9scro/image/upload/v1755101758/3d_2_ccbovp.jpg",
28+
"https://res.cloudinary.com/dswk9scro/image/upload/v1755101776/3d_3_chypdi.jpg",
29+
],
2430
type: "past",
2531
},
2632
];

src/config/navbarHero.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export const siteConfig = {
22
navigation: {
3-
logo: "https://res.cloudinary.com/dwjcki9ey/image/upload/v1752133616/Group2_e25wne.png",
3+
logo: "https://res.cloudinary.com/dswk9scro/image/upload/v1755092284/ASME_NIT_Rourkela_Student_Section_Blue_ldskye.png",
44
links: [
55
{ name: "Home", href: "/" },
66
{ name: "Team", href: "/team" },

src/pages/events/Events.jsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,13 @@ const Events = () => {
1515
<EventCard key={index} {...event} />
1616
))
1717
) : (
18-
<p className="text-center col-span-full text-gray-500">
19-
No events found.
20-
</p>
18+
<EventCard
19+
title="Coming Soon"
20+
description="Stay tuned! Exciting future events are on the way."
21+
images={[
22+
"https://res.cloudinary.com/dswk9scro/image/upload/v1752313324/image_urekzp.png",
23+
]}
24+
/>
2125
)}
2226
</div>
2327
);

0 commit comments

Comments
 (0)