Skip to content

Commit 8c72714

Browse files
Add: navbar structure
1 parent 6c14aad commit 8c72714

File tree

5 files changed

+112
-2647
lines changed

5 files changed

+112
-2647
lines changed

components/Nav.js

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
import Link from "next/link";
2+
3+
export default function Nav() {
4+
return (
5+
<nav className="nav">
6+
<div className="navContainer">
7+
<Link href="/">
8+
<img
9+
className="logo"
10+
src="/images/web-dev-path-logo-small.png"
11+
alt="Logo"
12+
/>
13+
</Link>
14+
<div className="linksContainer">
15+
<ul className="links">
16+
<li>
17+
<Link href="/about-us">
18+
<a className="link">About Us</a>
19+
</Link>
20+
</li>
21+
<li>
22+
<Link href="/active-projects">
23+
<a className="link">Active Projects</a>
24+
</Link>
25+
</li>
26+
<li>
27+
<Link href="/blog/index">
28+
<a className="link">Blog</a>
29+
</Link>
30+
</li>
31+
<li>
32+
<Link className="link" href="/contact-us">
33+
<a className="link">Contact Us</a>
34+
</Link>
35+
</li>
36+
</ul>
37+
</div>
38+
</div>
39+
<style jsx>
40+
{`
41+
.nav {
42+
width: 100%;
43+
}
44+
45+
.logo {
46+
padding: 1rem;
47+
border-radius: 100%;
48+
}
49+
50+
.navContainer {
51+
margin: 0 auto;
52+
display: flex;
53+
align-items: center;
54+
justify-content: space-between;
55+
56+
max-width: 800px;
57+
}
58+
59+
.linksContainer {
60+
flex-basis: 50%;
61+
}
62+
63+
.links {
64+
list-style: none;
65+
display: flex;
66+
justify-content: space-between;
67+
align-items: center;
68+
margin: 0;
69+
padding-left: 0;
70+
}
71+
72+
.link {
73+
text-decoration: none;
74+
color: black;
75+
}
76+
77+
.link:hover {
78+
opacity: 70%;
79+
}
80+
81+
@media (max-width: 768px) {
82+
.links {
83+
flex-direction: column;
84+
}
85+
}
86+
`}
87+
</style>
88+
</nav>
89+
);
90+
}

0 commit comments

Comments
 (0)