Skip to content

Commit

Permalink
Add Nav
Browse files Browse the repository at this point in the history
  • Loading branch information
AjaiKN committed Nov 9, 2023
1 parent 5e04e70 commit 9c5874a
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 11 deletions.
15 changes: 15 additions & 0 deletions src/components/Nav.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Link } from "react-router-dom";
import style from "./Nav.module.css";

export default function Nav() {
return (
<nav className={style.nav}>
<Link className={style.homeLink} to="/">
CSMC
</Link>
<Link to="/charter">Charter</Link>
<Link to="/officers">Officers</Link>
<Link to="/tshirts">T-Shirts</Link>
</nav>
);
}
28 changes: 28 additions & 0 deletions src/components/Nav.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
.nav {
position: sticky;
top: 0;
display: flex;
width: 100%;
padding: 0rem 0rem;
justify-content: space-between;
align-items: center;
height: 4rem;
z-index: 1;
font-size: 18px;
}

@media screen and (min-width: 768px) {
.nav {
height: 6rem;
font-size: 25px;
}

.homeLink {
width: 60vw;
}
}

.nav a {
color: var(--color-obiesource-accent);
text-decoration: none;
}
3 changes: 3 additions & 0 deletions src/routes/charter.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import Nav from "../components/Nav";

/* eslint-disable react/no-unescaped-entities */
export default function Charter() {
return (
<>
<Nav />
<h1>Oberlin CS Majors' Committee Charter</h1>

<h2>Purpose & Responsibilities</h2>
Expand Down
7 changes: 5 additions & 2 deletions src/routes/officers.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import Nav from "../components/Nav";

export default function Officers() {
// prettier-ignore
const officersHtml = <>
Expand Down Expand Up @@ -367,9 +369,10 @@ export default function Officers() {
);

return (
<div>
<>
<Nav />
{officersHtml}
{notes}
</div>
</>
);
}
15 changes: 9 additions & 6 deletions src/routes/root.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import { Link } from "react-router-dom";

Check failure on line 1 in src/routes/root.jsx

View workflow job for this annotation

GitHub Actions / buildAndTest

'Link' is defined but never used
import CSMCAnimation from "../components/CSMCAnimation";
import style from "./root.module.css";

Check failure on line 3 in src/routes/root.jsx

View workflow job for this annotation

GitHub Actions / buildAndTest

'style' is defined but never used
import Nav from "../components/Nav";

export default function Root() {
return (
<main>
<div>
<h1>CSMC</h1>
</div>
<CSMCAnimation />
</main>
<>
<Nav />
<main>
<CSMCAnimation />
</main>
</>
);
}
3 changes: 0 additions & 3 deletions src/routes/root.module.css
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
.oberlin {
color: var(--color-oberlin-red3);
}
3 changes: 3 additions & 0 deletions src/routes/tshirts.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import Nav from "../components/Nav";

export default function Tshirts() {
return (
<>
<Nav />
<h1>Annual CS T-Shirt Designs</h1>
<p>
In the spring of each year since time untold, the students of the OCCS
Expand Down

0 comments on commit 9c5874a

Please sign in to comment.