-
Notifications
You must be signed in to change notification settings - Fork 0
[CW2-9] Add navbar / hamburger menu to mobile #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
aabb7c0
added id for sponsors and added hamburger menu
QuadAces 650e22e
made linter shut up
QuadAces d7d746a
made linter shut up
QuadAces d3333e6
removed css file
QuadAces 0811e61
fixed the complainy pls allow or else <3
QuadAces c0a370b
removed random code comment
QuadAces File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,38 +1,51 @@ | ||
import Image from 'next/image'; | ||
import Link from 'next/link'; | ||
import { socialLinks } from '../public/data/data'; | ||
|
||
const Footer = () => { | ||
return ( | ||
<section> | ||
<div className="sm:flex justify-between"> | ||
<div className="flex items-center"> | ||
<img src="assets/csesoc_logo_white.svg" alt="CSESoc Logo" /> | ||
<Link href="/flag/ollie_is_hiding.png" target="_blank" className="sm:hidden block"> | ||
<img | ||
src="/flag/ollie_is_hiding.png" | ||
alt="Ollie" | ||
draggable="false" | ||
width={60} | ||
height={60} | ||
className="ml-10" | ||
/> | ||
</Link> | ||
<img | ||
src="/flag/ollie_is_hiding.png" | ||
alt="Ollie" | ||
draggable="false" | ||
width={60} | ||
height={60} | ||
className="ml-10 sm:block hidden" | ||
/> | ||
<div className="sm:flex justify-between pb-10"> | ||
<div className="flex flex-col gap-10"> | ||
<div className="flex items-center"> | ||
<Link href="/" className="flex"> | ||
<Image src="assets/csesoc_logo_white.svg" width={231} height={53} alt="CSESoc Logo" /> | ||
<Image | ||
src="/flag/ollie_is_hiding.png" | ||
alt="Ollie" | ||
draggable="false" | ||
width={60} | ||
height={60} | ||
className="ml-10" | ||
/> | ||
</Link> | ||
</div> | ||
<div className="grid grid-cols-8 gap-4"> | ||
{socialLinks.map((item, index) => { | ||
return ( | ||
<a key={index} className="" href={item.href}> | ||
<Image | ||
className="h-4 fill-white min-w-full hover:scale-125 transition-all" | ||
src={item.src} | ||
alt={item.alt} | ||
height={0} | ||
width={0} | ||
/> | ||
</a> | ||
); | ||
})} | ||
</div> | ||
</div> | ||
<div className="flex flex-col max-w-[14rem] sm:mt-0 mt-10 font-light"> | ||
<p className="mb-6">B03 CSE Building K17, UNSW [email protected]</p> | ||
<p>© 2021 — CSESoc UNSW</p> | ||
</div> | ||
</div> | ||
<img | ||
<Image | ||
src="assets/sponsors_backdrop.svg" | ||
alt="Sponsors backdrop" | ||
height={0} | ||
width={0} | ||
className="absolute bottom-0 left-0 w-screen -z-10" | ||
/> | ||
</section> | ||
|
This file contains hidden or 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,56 @@ | ||
import React from 'react'; | ||
import { AnimatePresence, motion, useCycle } from 'framer-motion'; | ||
import Link from 'next/link'; | ||
|
||
export default function Hamburger() { | ||
const [isOpen, toggleOpen] = useCycle(false, true); | ||
|
||
return ( | ||
<button | ||
onClick={() => { | ||
toggleOpen(); | ||
}} | ||
> | ||
<svg | ||
className="w-10 h-10" | ||
fill="none" | ||
stroke="currentColor" | ||
viewBox="0 0 24 24" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<path | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
strokeWidth={2} | ||
d="M4 6h16M4 12h16m-7 6h7" | ||
/> | ||
</svg> | ||
<AnimatePresence> | ||
{isOpen && ( | ||
<motion.div | ||
initial={{ opacity: 0, y: -10 }} | ||
animate={{ opacity: 1, y: 0 }} | ||
exit={{ opacity: 0, y: -10 }} | ||
transition={{ duration: 0.2 }} | ||
className="absolute top-16 right-0 bg-[#3977F9] p-4 shadow-lg w-40 rounded-2xl" | ||
> | ||
<ul> | ||
<li className="py-2 text-lg"> | ||
<Link href={'./about'}>About Us</Link> | ||
</li> | ||
<li className="py-2 text-lg"> | ||
<Link href={'./events'}>Events</Link> | ||
</li> | ||
<li className="py-2 text-lg"> | ||
<Link href={'./resources'}>Resources</Link> | ||
</li> | ||
<li className="py-2 text-lg"> | ||
<Link href={'./sponsors'}>Sponsors</Link> | ||
</li> | ||
</ul> | ||
</motion.div> | ||
)} | ||
</AnimatePresence> | ||
</button> | ||
); | ||
} |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.