Skip to content

Commit f7a96f0

Browse files
authored
Merge pull request #5 from the-collab-lab/ADV-3-ALT-Navbar
add basic navbar - still static
2 parents 6f6b33f + 3ed9fb2 commit f7a96f0

File tree

3 files changed

+73
-3
lines changed

3 files changed

+73
-3
lines changed

src/App.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Header from './components/Header';
22
import Footer from './components/Footer';
3-
import './App.css';
3+
import Navbar from './components/Navbar';
44

55
import { Map } from './components/Map';
66

@@ -14,7 +14,7 @@ function App() {
1414
<Map />
1515
</main>
1616
<Footer>
17-
<p>Footer</p>
17+
<Navbar />
1818
</Footer>
1919
</div>
2020
);

src/components/Navbar.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
const Navbar = () => {
2+
return (
3+
<nav className="navbar" aria-label="Main Menu">
4+
<ul className="navbar__list">
5+
<li className="navbar__list-item">
6+
<span class="current">
7+
<span class="visually-hidden">Current Page: </span>
8+
Map
9+
</span>
10+
</li>
11+
<li className="navbar__list-item">
12+
<a href="list" className="navbar__list-link">
13+
List
14+
</a>
15+
</li>
16+
<li className="navbar__list-item">
17+
<a href="settings" className="navbar__list-link">
18+
Settings
19+
</a>
20+
</li>
21+
<li className="navbar__list-item">
22+
<a href="help" className="navbar__list-link">
23+
Help
24+
</a>
25+
</li>
26+
</ul>
27+
</nav>
28+
);
29+
};
30+
31+
export default Navbar;

src/index.css

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/****** VARIABLES ******/
2+
:root {
3+
--main-bg-color: #3e2e88;
4+
}
5+
6+
/****** BASELINE ******/
17
*,
28
*::after,
39
*::before {
@@ -35,7 +41,9 @@ h5 {
3541
font-size: 1.8rem;
3642
}
3743

38-
p {
44+
span,
45+
p,
46+
a {
3947
font-size: 1.6rem;
4048
}
4149

@@ -47,6 +55,37 @@ p {
4755
min-height: 66vh;
4856
}
4957

58+
.visually-hidden {
59+
clip: rect(0 0 0 0);
60+
clip-path: inset(50%);
61+
height: 1px;
62+
overflow: hidden;
63+
position: absolute;
64+
white-space: nowrap;
65+
width: 1px;
66+
}
67+
68+
/****** MAP STYLES ******/
69+
70+
/****** FOOTER STYLES ******/
71+
5072
.footer {
5173
min-height: 33vh;
74+
display: flex;
75+
justify-content: center;
76+
align-items: center;
77+
}
78+
79+
.navbar {
80+
width: 100%;
81+
}
82+
83+
.navbar__list {
84+
display: flex;
85+
justify-content: center;
86+
list-style-type: none;
87+
}
88+
89+
.navbar__list-item {
90+
padding: 1rem;
5291
}

0 commit comments

Comments
 (0)