diff --git a/src/app/about/page.tsx b/src/app/about/page.tsx index d69539a..f2f16fb 100644 --- a/src/app/about/page.tsx +++ b/src/app/about/page.tsx @@ -68,7 +68,7 @@ const About = () => { return (
{ onTouchMove={scrollAllowed ? handleTouchMove : undefined} onTouchEnd={scrollAllowed ? handleTouchEnd : undefined} > -
- -
+ {/*
*/} + + {/*
*/} >; +} + +const Menu: React.FC = ({ isOpened, setIsOpened }) => { + const [width, setWidth] = useState(0); + + useEffect(() => { + if (typeof window !== 'undefined') { + setWidth(window.innerWidth); + window.addEventListener('resize', () => setWidth(window.innerWidth)); + } + }, []); + + const menuItems = [ + { name: 'Events', link: '/events' }, + { name: 'Workshops', link: '/workshops' }, + { name: 'Guest Lectures', link: '/guest-lectures' }, + { name: 'Sponsors', link: '/sponsors' }, + { name: 'Sangam Hardware', link: '/sangam-hardware' }, + { name: 'Campus Ambassador', link: '/campus-ambassador' }, + { name: 'Ingenium', link: '/ingenium' }, + { name: 'Patronages', link: '/patronages' }, + { name: 'Youth Summit', link: '/youth-summit' }, + { name: 'Hospitality', link: '/hospitality' }, + { name: 'Campus', link: '/campus' }, + ]; + + return ( +
+ {isOpened ? ( +
+
{ + if (setIsOpened) setIsOpened(false); + }} + > + X +
+ disk + diskglow + +
+
    + {menuItems.map((item, index) => ( +
  • + + + +
  • + ))} +
+ +
+ ) : ( + '' + )} +
+ ); +}; + +export default Menu; diff --git a/src/components/MenuItem/MenuItem.tsx b/src/components/MenuItem/MenuItem.tsx new file mode 100644 index 0000000..b84933d --- /dev/null +++ b/src/components/MenuItem/MenuItem.tsx @@ -0,0 +1,29 @@ +'use client'; +import React from 'react'; +import bg from '../../assets/images/menuItembg.png'; +import phonebg from '../../assets/images/bgphonemenuitem.png'; +import Image from 'next/image'; + +const MenuItem = (props: { name: string; phone: boolean }) => { + if (props.phone) { + return ( +
  • + bg + {props.name} +
  • + ); + } + + return ( +
  • + {props.name} + bg +
  • + ); +}; + +export default MenuItem; diff --git a/src/components/NavBar/NavBar.tsx b/src/components/NavBar/NavBar.tsx index 6a2311d..9cc2e85 100644 --- a/src/components/NavBar/NavBar.tsx +++ b/src/components/NavBar/NavBar.tsx @@ -1,14 +1,18 @@ -import React from 'react'; +'use client'; +import { useState } from 'react'; import Image from 'next/image'; -import Link from 'next/link'; import pragyanlogo from '../../assets/images/main-logo-22-white.svg'; import pragyanlogomobile from '../../assets/images/main-logo-mobile.png'; import hamburgerIcon from '../../assets/images/hamburgerMenu.svg'; import LoginButton from '../LoginButton/LoginButton'; +import Link from 'next/link'; +import Menu from '@/components/Menu/Menu'; const NavBar = () => { + const [isOpened, setIsOpened] = useState(false); return ( -
    +
    +
    { alt="Hamburger Icon" draggable={false} className="md:w-8 w-6 hover:cursor-pointer" + onClick={() => setIsOpened(!isOpened)} />
    diff --git a/src/components/NavBar/navbar.module.css b/src/components/NavBar/navbar.module.css new file mode 100644 index 0000000..447d483 --- /dev/null +++ b/src/components/NavBar/navbar.module.css @@ -0,0 +1,119 @@ +/* menu.module.css */ + +#mainContent { + animation: fadeInLast 3s ease-in-out; + } + #disk { + animation: fall 3s linear; + } + #glow { + animation: fadeInFirst 3s ease-in-out; + } + +#menubg { + background: url('../../assets/images/menubg.png') no-repeat; + background-size: contain; + animation: fadeInLast 3s ease-in-out; + fill: 0.5; +} + + +@keyframes fall { + 0% { + transform: translateY(-100vh); + } + 50% { + transform: translateY(0); + } + 100% { + transform: translateY(0); + } +} + + +@keyframes fadeInFirst { + 0% { + opacity: 0; + } + 50% { + opacity: 0; + } + 75% { + opacity: 1; + } + 100% { + opacity: 1; + } +} + +@keyframes fadeInLast { + 0% { + opacity: 0; + } + 75% { + opacity: 0; + } + 100% { + opacity: 1; + } +} + + +#main-content { + animation: fadeInLast 3s ease-in-out; +} + +#disk { + animation: fall 3s linear; + z-index: 20; +} + +#glow { + animation: fadeInFirst 3s ease-in-out; +} + +#menubg { + animation: fadeInLast 3s ease-in-out; + +} + +.li:nth-child(2n+1){ + margin-top: 5rem; +} +.li:nth-child(3n){ + margin-top: 12rem; +} + +/* +@keyframes imagewipe { + 0% { + opacity: 0; + width: 0%; + } + 100% { + opacity: 1; + width: 100% + } +} */ + +@media (max-width: 1020px) { + + #menubg { + background: url('../../assets/images/bgphone.png') no-repeat; + background-size: contain; + ; + } + + .li:nth-child(2n+1){ + margin-top: 0rem; + margin-left: 2rem; + } + .li:nth-child(3n){ + margin-top: 0rem; + margin-left: 1rem; + } + + #disk { + width: 100px; + } +} diff --git a/src/components/index.ts b/src/components/index.ts index 32abd2b..59f87ce 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -11,3 +11,4 @@ export { default as Carousel } from './Carousel/carousel'; export { default as LoadingWebView } from './Landing/LoadingWebView'; export { default as LoadingMobileView } from './Landing/LoadingMobileView'; export { default as ClusterCarousel } from './ClusterCarousel/ClusterCarousel'; +export { default as Menu } from './Menu/Menu';