Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 35 additions & 7 deletions src/components/EventCard.jsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,41 @@
import React from "react";
import React, { useState, useEffect } from "react";

const EventCard = ({ title, description, images }) => {
const [currentImageIndex, setCurrentImageIndex] = useState(0);

// Auto-change image every 3 seconds
useEffect(() => {
if (!images || images.length <= 1) return; // skip if 0 or 1 image
const interval = setInterval(() => {
setCurrentImageIndex((prevIndex) => (prevIndex + 1) % images.length);
}, 3000);
return () => clearInterval(interval);
}, [images]);

const EventCard = ({ title, description, image }) => {
return (
<div className="bg-gray-50 rounded-xl shadow-md overflow-hidden flex flex-col md:flex-row border-2 border-[#0B2044]">
<img
src={image}
alt={title}
className="w-full md:w-2/5 object-cover aspect-[4/3]"
/>
<div className="relative w-full md:w-2/5 flex-shrink-0">
<div className="w-full aspect-[16/9] relative overflow-hidden rounded-l-xl">
<img
src={images?.[currentImageIndex]}
alt={`${title} image ${currentImageIndex + 1}`}
className="w-full h-full object-cover transition-all duration-500 absolute top-0 left-0"
/>
</div>

{images?.length > 1 && (
<div className="absolute bottom-2 left-2/5 transform -translate-x-1/2 flex gap-1">
{images.map((_, idx) => (
<span
key={idx}
className={`h-2 w-2 rounded-full ${
idx === currentImageIndex ? "bg-white" : "bg-gray-400"
}`}
></span>
))}
</div>
)}
</div>
<div className="p-4 flex flex-col justify-center">
<h3 className="text-2xl font-semibold text-[#0B2044]">{title}</h3>
<p className="text-base text-gray-600 mt-2">{description}</p>
Expand Down
42 changes: 25 additions & 17 deletions src/components/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ const Footer = ({
year = new Date().getFullYear(),
}) => {
return (
<footer className="bg-[#0B2044] text-white px-4 py-8 sm:px-8 sm:py-10 md:px-12 md:py-12">
<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">
<div className="max-w-7xl mx-auto grid grid-cols-1 gap-10 sm:gap-12 md:grid-cols-3 md:gap-8">
{/* Logo and Description Section */}
<div className="order-1 md:order-none">
<div className="flex items-center gap-4 mb-6 flex-wrap">
<div className="flex items-center gap-4 mb-3 flex-wrap">
<img
src="https://res.cloudinary.com/dswk9scro/image/upload/v1752377324/Group_cropped_qgqzw9.png"
src="https://res.cloudinary.com/dswk9scro/image/upload/v1755092506/ASME_NIT_Rourkela_Student_Section_White_T_oe5ox2.png"
alt="ASME Logo"
className="w-12 h-12 object-contain"
className="w-24 h-20 object-contain -mt-1"
/>
<h2 className="text-2xl font-bold">{title}</h2>
</div>
Expand All @@ -47,14 +47,9 @@ const Footer = ({
</div>

{/* Middle Section */}
<div>
<h3 className="text-lg font-semibold">Quick Links</h3>
<ul className="mt-2 space-y-1 text-sm">
<li>
<Link to="/about" className="hover:underline">
About us
</Link>
</li>
<div className="md:ml-15">
<h3 className="text-2xl font-semibold">Quick Links</h3>
<ul className="mt-5 space-y-3 text-base">
<li>
<Link to="/team" className="hover:underline">
Team
Expand All @@ -79,12 +74,17 @@ const Footer = ({
</div>

{/* Contact Info Section */}
<div className="order-2 md:order-none">
<div className="order-2 md:ml-6">
<h3 className="text-2xl font-semibold mb-6">Contact Info</h3>
<div className="text-base space-y-6">
<div className="flex items-center gap-4">
<FiMail className="text-[#51B8F2] text-2xl hover:text-white transition" />
<span>asme.nitrkl@gmail.com</span>
<a
href="mailto:asme.nitrkl@gmail.com"
className="no-underline hover:underline"
>
asme.nitrkl@gmail.com
</a>
</div>
<div className="flex items-center gap-4">
<FiPhone className="text-[#51B8F2] text-2xl hover:text-white transition" />
Expand All @@ -100,9 +100,17 @@ const Footer = ({
</div>
</div>
</div>

<div className="text-center text-base mt-10 border-t border-white/20 pt-6">
© {year} {title}. All rights reserved.
<div className="flex flex-col md:flex-row justify-between items-center text-base mt-5 border-t border-white/20 pt-2">
<p>
© {year} {title}. All rights reserved.
</p>
<a
href="https://opencodenitr.in/"
target="_blank"
className="hover:underline "
>
Architected with ♥ by Team OpenCode
</a>
</div>
</footer>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/Navbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default function Navbar() {
<img
src={siteConfig.navigation.logo}
alt="Logo"
className="h-10 w-auto"
className="h-16 w-auto"
/>
</div>

Expand Down
12 changes: 9 additions & 3 deletions src/config/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,30 @@ const events = [
title: "Dart-a-Thon",
description:
"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.",
image:
images: [
"https://res.cloudinary.com/dswk9scro/image/upload/v1754816191/Dart-a-thon_z29oj0.jpg",
"https://res.cloudinary.com/dswk9scro/image/upload/v1755101733/dart_a_thon_2_fzykjn.jpg",
],
type: "past",
},
{
title: "Turbogen X",
description:
"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.",
image:
images: [
"https://res.cloudinary.com/dswk9scro/image/upload/v1754816173/Turbogen_x_ozbic4.jpg",
],
type: "past",
},
{
title: "3D Printing Workshop",
description:
"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.",
image:
images: [
"https://res.cloudinary.com/dswk9scro/image/upload/v1754816159/3D_printing_workshop_nrxkho.jpg",
"https://res.cloudinary.com/dswk9scro/image/upload/v1755101758/3d_2_ccbovp.jpg",
"https://res.cloudinary.com/dswk9scro/image/upload/v1755101776/3d_3_chypdi.jpg",
],
type: "past",
},
];
Expand Down
2 changes: 1 addition & 1 deletion src/config/navbarHero.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const siteConfig = {
navigation: {
logo: "https://res.cloudinary.com/dwjcki9ey/image/upload/v1752133616/Group2_e25wne.png",
logo: "https://res.cloudinary.com/dswk9scro/image/upload/v1755092284/ASME_NIT_Rourkela_Student_Section_Blue_ldskye.png",
links: [
{ name: "Home", href: "/" },
{ name: "Team", href: "/team" },
Expand Down
10 changes: 7 additions & 3 deletions src/pages/events/Events.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@ const Events = () => {
<EventCard key={index} {...event} />
))
) : (
<p className="text-center col-span-full text-gray-500">
No events found.
</p>
<EventCard
title="Coming Soon"
description="Stay tuned! Exciting future events are on the way."
images={[
"https://res.cloudinary.com/dswk9scro/image/upload/v1752313324/image_urekzp.png",
]}
/>
)}
</div>
);
Expand Down
Loading