-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: SRIMANKS <[email protected]>
- Loading branch information
1 parent
a6d665f
commit e9ab610
Showing
12 changed files
with
254 additions
and
7 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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,93 @@ | ||
'use client'; | ||
import React, { useEffect, useState } from 'react'; | ||
import Image from 'next/image'; | ||
import Link from 'next/link'; | ||
import MenuItem from '@/components/MenuItem/MenuItem'; | ||
import disk from '../../assets/images/disk.png'; | ||
import diskglow from '../../assets/images/diskglow.png'; | ||
import styles from '../NavBar/navbar.module.css'; | ||
|
||
interface MenuProps { | ||
isOpened: boolean; | ||
setIsOpened?: React.Dispatch<React.SetStateAction<boolean>>; | ||
} | ||
|
||
const Menu: React.FC<MenuProps> = ({ isOpened, setIsOpened }) => { | ||
const [width, setWidth] = useState<number>(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 ( | ||
<div> | ||
{isOpened ? ( | ||
<div className="flex w-full justify-center items-center absolute z-10 top-0 left-0 bg-black"> | ||
<div | ||
className="absolute top-10 right-10 z-[20] text-white text-3xl hover:cursor-pointer" | ||
onClick={() => { | ||
if (setIsOpened) setIsOpened(false); | ||
}} | ||
> | ||
X | ||
</div> | ||
<Image | ||
src={disk} | ||
alt="disk" | ||
className="absolute bottom-4 lg:bottom-0" | ||
id={styles.disk} | ||
/> | ||
<Image | ||
src={diskglow} | ||
alt="diskglow" | ||
className="absolute bottom-4" | ||
id={styles.glow} | ||
/> | ||
|
||
<div | ||
className=" lg:top-1/5 absolute w-full lg:h-2/3 h-full" | ||
id={styles.menubg} | ||
/> | ||
<ul | ||
className=" md:flex w-full font-Orbitron flex lg:flex-row flex-col justify-evenly items-center pb-24 md:[40vh%] min-h-screen text-white" | ||
id={styles.mainContent} | ||
> | ||
{menuItems.map((item, index) => ( | ||
<li className={styles.li} key={index}> | ||
<Link href={item.link}> | ||
<MenuItem name={item.name} phone={width < 1020} /> | ||
</Link> | ||
</li> | ||
))} | ||
</ul> | ||
<style> | ||
{` | ||
`} | ||
</style> | ||
</div> | ||
) : ( | ||
'' | ||
)} | ||
</div> | ||
); | ||
}; | ||
|
||
export default Menu; |
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 |
---|---|---|
@@ -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 ( | ||
<li | ||
className={`flex text-center text-sm items-center relative hover:scale-110 h-2 ease-in-out`} | ||
> | ||
<Image className="" src={phonebg} alt="bg" width="120" /> | ||
{props.name} | ||
</li> | ||
); | ||
} | ||
|
||
return ( | ||
<li | ||
className={`flex-col w-20 text-center md:text-lg relative hover:scale-110 h-fit ease-in-out`} | ||
> | ||
{props.name} | ||
<Image className="absolute mt-[-2em]" src={bg} alt="bg" /> | ||
</li> | ||
); | ||
}; | ||
|
||
export default MenuItem; |
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
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 |
---|---|---|
@@ -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; | ||
} | ||
} |
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