Skip to content

Commit

Permalink
Refactor contact nav link
Browse files Browse the repository at this point in the history
  • Loading branch information
celinalou92 committed Jul 12, 2024
1 parent bafdd30 commit 00f08aa
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
6 changes: 4 additions & 2 deletions app/components/Nav/Nav.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Stack, Typography } from "@mui/material";
import { Stack, Typography, useMediaQuery } from "@mui/material";
import Link from "next/link";
import { Contact } from "../Contact/Contact";

Expand All @@ -7,6 +7,7 @@ export const NavBar = () => {
{ name: "About", link: "/#about" },
{ name: "Skills", link: "/#skills" },
{ name: "Portfolio", link: "/#projects" },
{ name: "Contact", link: "/#home" },
];
return (
<Stack
Expand All @@ -23,7 +24,8 @@ export const NavBar = () => {
>
{navItems.map((navItem) => (
<Link
className="hover mobileNavItem"
id={`${navItem.name}-link`}
className="hover mobileNavItem navContact"
key={navItem.name}
href={navItem.link}
>
Expand Down
8 changes: 8 additions & 0 deletions app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ a:hover {
justify-content: center;
}

#Contact-link {
display: none;
}

@media (prefers-color-scheme: dark) {
html {
color-scheme: dark;
Expand Down Expand Up @@ -164,6 +168,10 @@ a:hover {
background-color: #1C1C1D;
}

#Contact-link {
display: block;
}

.mobileNavItem {
padding-right: 1rem;
}
Expand Down
2 changes: 1 addition & 1 deletion app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default function RootLayout(props: { children: any }) {
<html lang="en">
<ThemeRegistry options={{ key: "mui" }}>
<body className="outer">
<Stack className="asideContainer">
<Stack id="home" className="asideContainer">
<Hero />
</Stack>
<Stack>{children}</Stack>
Expand Down

0 comments on commit 00f08aa

Please sign in to comment.