-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(NavBar): Implemented a responsive navbar
- Loading branch information
Showing
15 changed files
with
2,366 additions
and
69 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
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,18 @@ | ||
import React from "react"; | ||
import type { Metadata } from "next"; | ||
|
||
export const metadata: Metadata = { | ||
title: "Create Next App", | ||
description: "This is a base site for Andy to create his websites.", | ||
}; | ||
const Contact = () => { | ||
return ( | ||
<section className="About flex min-h-screen w-full items-center justify-center bg-light dark:bg-dark"> | ||
<h1 className="Homepage-text text-center text-8xl font-bold text-dark dark:text-light"> | ||
Contact Page | ||
</h1> | ||
</section> | ||
); | ||
}; | ||
|
||
export default Contact; |
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 was deleted.
Oops, something went wrong.
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
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,18 @@ | ||
import React from "react"; | ||
import type { Metadata } from "next"; | ||
|
||
export const metadata: Metadata = { | ||
title: "Create Next App", | ||
description: "This is a base site for Andy to create his websites.", | ||
}; | ||
const Projects = () => { | ||
return ( | ||
<section className="About flex min-h-screen w-full items-center justify-center bg-light dark:bg-dark"> | ||
<h1 className="Homepage-text text-8xl text-center font-bold text-dark dark:text-light"> | ||
Projects Page | ||
</h1> | ||
</section> | ||
); | ||
}; | ||
|
||
export default Projects; |
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
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,41 @@ | ||
"use client"; | ||
|
||
import { FaAngleRight, FaAngleLeft } from "react-icons/fa"; | ||
import React from "react"; | ||
import { Button } from "@nextui-org/react"; | ||
|
||
const NavBarExpander = ({ | ||
expanded, | ||
setExpanded, | ||
}: { | ||
expanded: boolean; | ||
setExpanded: Function; | ||
}) => { | ||
if (!expanded) { | ||
return ( | ||
<Button | ||
isIconOnly={true} | ||
onClick={() => setExpanded(true)} | ||
aria-label="Expand" | ||
color="default" | ||
className="h-full w-5 md:hidden"> | ||
<FaAngleRight size={24} className=" text-dark dark:text-light" /> | ||
</Button> | ||
); | ||
} | ||
|
||
if (expanded) { | ||
return ( | ||
<Button | ||
isIconOnly={true} | ||
onClick={() => setExpanded(false)} | ||
aria-label="Unexpand" | ||
color="default" | ||
className="h-full w-10 md:hidden"> | ||
<FaAngleLeft size={48} className=" text-dark dark:text-light" /> | ||
</Button> | ||
); | ||
} | ||
}; | ||
|
||
export default NavBarExpander; |
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,39 @@ | ||
"use client"; | ||
|
||
import { usePathname } from "next/navigation"; | ||
import React, { ReactNode } from "react"; | ||
import { Link, Button } from "@nextui-org/react"; | ||
|
||
const NavBarLink = ({ | ||
label, | ||
link, | ||
icon, | ||
expanded, | ||
}: { | ||
label: string; | ||
link: string; | ||
icon: ReactNode; | ||
expanded: boolean; | ||
}) => { | ||
const pathname = usePathname(); | ||
|
||
return ( | ||
<Button | ||
as={Link} | ||
isIconOnly={true} | ||
href={link} | ||
aria-label={label} | ||
color="default" | ||
className={`flex justify-start rounded-lg p-3 hover:bg-light dark:hover:bg-dark md:w-full ${expanded ? "w-full" : "w-12"} ${pathname === link && "bg-light dark:bg-dark"}`}> | ||
{icon} | ||
{ | ||
<div | ||
className={`text-2xl font-semibold md:block ${expanded ? "block" : "hidden"}`}> | ||
{label} | ||
</div> | ||
} | ||
</Button> | ||
); | ||
}; | ||
|
||
export default NavBarLink; |
Oops, something went wrong.
7c47597
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
andy1uu-github-io – ./
andyluu.vercel.app
andy1uu-github-io-andy-luus-projects.vercel.app
andy1uu-github-io-git-master-andy-luus-projects.vercel.app