diff --git a/src/app/page.tsx b/src/app/page.tsx index 1b432d1..01663c1 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,21 +1,39 @@ "use client"; -import { useState } from "react"; import React from "react"; import HorizontalScroll from "@/components/HorizontalScrollCarousel"; import TextReveal from "@/components/ui/text-reveal"; +import HeroVideoDialog from "@/components/ui/hero-video-dialog"; +import ParallaxFooter from "@/components/Footer"; export default function Home() { return ( <> -
-
- +
+
+
+ +
+
+

+ Check out the
Previous Editions +

+
+ +
+
+
+ +
-
- -
-
+ + ); } diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx new file mode 100644 index 0000000..7c9afd7 --- /dev/null +++ b/src/components/Footer.tsx @@ -0,0 +1,84 @@ +import Link from "next/link"; +import React from "react"; + +type Props = {}; + +const Footer = (props: Props) => { + return ( + <> +
+

Contact

+
+
+
+
+
+
+

+ St Joseph Engineering College +

+

+ St Joseph Engineering College, +
Vamanjoor,Mangalore - 575028 +
Karnataka, India +

+
+
+
+
+

Contact

+

+ Dr. Binu K G :{" "} + + +91-9739866947 + +

+
+
+

+ Socials +

+ + Instagram + + + LinkedIn + +
+
+
+
+ +
+ + +
+
+
+ + ); +}; + +export default Footer; diff --git a/src/components/ui/hero-video-dialog.tsx b/src/components/ui/hero-video-dialog.tsx new file mode 100644 index 0000000..a0cf2c3 --- /dev/null +++ b/src/components/ui/hero-video-dialog.tsx @@ -0,0 +1,140 @@ +"use client"; + +import { useState } from "react"; +import { AnimatePresence, motion } from "framer-motion"; +import { Play, XIcon } from "lucide-react"; + +import { cn } from "@/lib/utils"; + +type AnimationStyle = + | "from-bottom" + | "from-center" + | "from-top" + | "from-left" + | "from-right" + | "fade" + | "top-in-bottom-out" + | "left-in-right-out"; + +interface HeroVideoProps { + animationStyle?: AnimationStyle; + videoSrc: string; + thumbnailSrc: string; + thumbnailAlt?: string; + className?: string; +} + +const animationVariants = { + "from-bottom": { + initial: { y: "100%", opacity: 0 }, + animate: { y: 0, opacity: 1 }, + exit: { y: "100%", opacity: 0 }, + }, + "from-center": { + initial: { scale: 0.5, opacity: 0 }, + animate: { scale: 1, opacity: 1 }, + exit: { scale: 0.5, opacity: 0 }, + }, + "from-top": { + initial: { y: "-100%", opacity: 0 }, + animate: { y: 0, opacity: 1 }, + exit: { y: "-100%", opacity: 0 }, + }, + "from-left": { + initial: { x: "-100%", opacity: 0 }, + animate: { x: 0, opacity: 1 }, + exit: { x: "-100%", opacity: 0 }, + }, + "from-right": { + initial: { x: "100%", opacity: 0 }, + animate: { x: 0, opacity: 1 }, + exit: { x: "100%", opacity: 0 }, + }, + fade: { + initial: { opacity: 0 }, + animate: { opacity: 1 }, + exit: { opacity: 0 }, + }, + "top-in-bottom-out": { + initial: { y: "-100%", opacity: 0 }, + animate: { y: 0, opacity: 1 }, + exit: { y: "100%", opacity: 0 }, + }, + "left-in-right-out": { + initial: { x: "-100%", opacity: 0 }, + animate: { x: 0, opacity: 1 }, + exit: { x: "100%", opacity: 0 }, + }, +}; + +export default function HeroVideoDialog({ + animationStyle = "from-center", + videoSrc, + thumbnailSrc, + thumbnailAlt = "Video thumbnail", + className, +}: HeroVideoProps) { + const [isVideoOpen, setIsVideoOpen] = useState(false); + const selectedAnimation = animationVariants[animationStyle]; + + return ( +
+
setIsVideoOpen(true)} + > + {thumbnailAlt} +
+
+
+ +
+
+
+
+ + {isVideoOpen && ( + setIsVideoOpen(false)} + exit={{ opacity: 0 }} + className="fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-md" + > + + + + +
+ +
+
+
+ )} +
+
+ ); +}