-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(assets): update hero section images and components (#48)
* feat(assets): update hero section images and components - Added new image: all-excom.jpg - Removed outdated image: duothan4.2.jpg - Updated hero-section.tsx to reflect new content - Modified vm-section.tsx for improved content structure * feat: update carousel to fit viewport size on hero section - Modified page.tsx and hero-section.tsx to make carousel dynamically adjust to the viewport size. - Ensured images are responsive and fill available space with object-cover.
- Loading branch information
Showing
5 changed files
with
70 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,78 @@ | ||
"use client"; | ||
import placeholder from "@/assets/placeholder.png"; | ||
import Autoplay from "embla-carousel-autoplay"; | ||
import Image from "next/image"; | ||
import * as React from "react"; | ||
|
||
import allexcom from "@/assets/hero-images/all-excom.jpg"; | ||
import duothanImg from "@/assets/hero-images/duothan4.0.jpg"; | ||
import duothanImg2 from "@/assets/hero-images/duothan4.1.jpg"; | ||
import duothanImg4 from "@/assets/hero-images/duothan4.3.jpg"; | ||
import skillshare from "@/assets/hero-images/skill-share.jpg"; | ||
import { | ||
Carousel, | ||
CarouselContent, | ||
CarouselItem, | ||
CarouselNext, | ||
CarouselPrevious, | ||
} from "@/components/ui/carousel"; | ||
import Autoplay from "embla-carousel-autoplay"; | ||
import Image from "next/image"; | ||
import * as React from "react"; | ||
|
||
export function HeroCarousel() { | ||
const images = [ | ||
placeholder, | ||
placeholder, | ||
placeholder, | ||
placeholder, | ||
placeholder, | ||
export default function HeroCarousel() { | ||
const cimages = [ | ||
{ | ||
image: duothanImg, | ||
text: "Discover a community where ideas meet innovation, and creativity knows no limits Where technology.", | ||
}, | ||
{ | ||
image: duothanImg2, | ||
text: "Empowering students to shape the future, one project at a time A place for curious minds and bold thinkers to connect and create.", | ||
}, | ||
{ | ||
image: allexcom, | ||
text: "Pushing boundaries, embracing challenges, and building a brighter future together. Innovation starts here, where students turn vision into reality.", | ||
}, | ||
{ | ||
image: duothanImg4, | ||
text: "Explore, create, and lead with a community that shares your drive Where every challenge is an opportunity to grow and inspire.", | ||
}, | ||
{ | ||
image: skillshare, | ||
text: "Building skills, making connections, and transforming ideas into action Redefining innovation through teamwork, passion, and dedication.", | ||
}, | ||
]; | ||
|
||
const plugin = React.useRef( | ||
Autoplay({ delay: 2000, stopOnInteraction: true }), | ||
); | ||
|
||
return ( | ||
<Carousel | ||
plugins={[plugin.current]} | ||
className="container mx-auto w-full" | ||
onMouseEnter={plugin.current.stop} | ||
onMouseLeave={plugin.current.reset} | ||
> | ||
<CarouselContent> | ||
{images.map((image, index) => ( | ||
<CarouselItem key={index}> | ||
<div className="aspect-video"> | ||
<Image | ||
src={image} | ||
alt={`carousel image ${index + 1}`} | ||
width={1600} | ||
height={900} | ||
/> | ||
</div> | ||
</CarouselItem> | ||
))} | ||
</CarouselContent> | ||
<CarouselPrevious /> | ||
<CarouselNext /> | ||
</Carousel> | ||
<> | ||
<Carousel plugins={[plugin.current]} className="w-full"> | ||
<CarouselContent> | ||
{cimages.map((item, index) => ( | ||
<CarouselItem key={index} className="relative"> | ||
<div className="w-full xl:h-[85vh]"> | ||
<Image | ||
src={item.image} | ||
alt={`carousel image ${index + 1}`} | ||
height={1080} | ||
width={1920} | ||
className="object-cover object-center aspect-video" | ||
/> | ||
<div className="absolute bottom-0 w-full h-[170px] bg-gradient-to-t from-primaryLight via-primaryLight"> | ||
<p className="absolute left-2 xl:left-10 bottom-0 text-xs xl:text-base text-white"> | ||
{item.text} | ||
</p> | ||
</div> | ||
</div> | ||
</CarouselItem> | ||
))} | ||
</CarouselContent> | ||
<div> | ||
<h1 className="absolute left-3 xl:left-10 xl:bottom-8 bottom-10 font-semibold text-white xl:text-3xl text-base"> | ||
Welcome to IEEE Student Branch of NSBM | ||
</h1> | ||
</div> | ||
{/* <CarouselPrevious /> | ||
<CarouselNext /> */} | ||
</Carousel> | ||
<div className="bg-gradient-to-b mt-[-2px] from-primaryLight from-50% h-[50px]" /> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters