Skip to content

Commit 3c56301

Browse files
Merge pull request #73 from the-collab-lab/nav-styling-gb
Nav Menu Styling
2 parents 2a8dc17 + c7fba10 commit 3c56301

File tree

5 files changed

+20
-25
lines changed

5 files changed

+20
-25
lines changed

src/components/SingleList.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
display: flex;
44
flex-direction: row;
55
font-size: 1.2em;
6+
padding: 0.05em;
67
}
78

89
.SingleList-label {

src/views/Home.jsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ export function Home({ data, setListPath, userId, userEmail }) {
3535

3636
return (
3737
<div className="Home">
38-
<p>
39-
Hello from the home (<code>/</code>) page!
40-
</p>
4138
<form id="list-form" onSubmit={handleSubmit}>
4239
<TextInputElement
4340
key="list-name"

src/views/Layout.css

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
display: flex;
1212
flex-direction: column;
1313
height: 100dvh;
14+
padding-top: 80px;
1415
}
1516

1617
.Layout > * {
@@ -31,43 +32,42 @@
3132
.Layout-main {
3233
margin: 0 auto;
3334
padding-block: 0;
34-
padding-block-end: 6.26rem;
35+
padding-block-start: 4rem;
3536
width: min(72ch, 100%);
3637
}
3738

3839
.Nav {
3940
background-color: var(--color-bg);
40-
border-top: 1px solid var(--color-border);
41-
bottom: 0;
42-
display: flex;
43-
flex-direction: row;
44-
padding-bottom: max(env(safe-area-inset-bottom), 1rem);
45-
padding-top: 1rem;
41+
top: 0;
42+
left: 0;
43+
padding: 10px 20px;
44+
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
4645
place-content: center;
4746
position: fixed;
4847
width: 100%;
48+
color: white;
4949
}
5050

5151
.Nav-container {
5252
display: flex;
53-
flex-direction: row;
54-
justify-content: space-evenly;
55-
width: min(72ch, 100%);
53+
align-items: center;
5654
}
5755

5856
.Nav-link {
59-
--color-text: var(--color-accent);
60-
61-
color: var(--color-text);
62-
font-size: 1.4em;
57+
color: #2588f2;
58+
font-size: 1em;
6359
flex: 0 1 auto;
64-
line-height: 1;
6560
padding: 0.8rem;
6661
text-align: center;
67-
text-underline-offset: 0.1em;
62+
text-decoration: none;
6863
}
6964

7065
.Nav-link.active {
71-
text-decoration-thickness: 0.22em;
72-
text-underline-offset: 0.1em;
66+
background-color: #becfe1;
67+
border-radius: 4px;
68+
}
69+
70+
.App-title {
71+
padding-right: 15px;
72+
font-weight: bold;
7373
}

src/views/Layout.jsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,13 @@ export function Layout() {
1919
return (
2020
<>
2121
<div className="Layout">
22-
<header className="Layout-header">
23-
<h1>Smart shopping list</h1>
24-
</header>
2522
<a>{user ? <SignOutButton /> : <SignInButton />}</a>
2623
<main className="Layout-main">
2724
<Outlet />
2825
</main>
2926
<nav className="Nav">
3027
<div className="Nav-container">
28+
<div className="App-title">Shopping List</div>
3129
<NavLink to="/" end className="Nav-link">
3230
Home
3331
</NavLink>

tests/Layout.test.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ describe('Layout Component', () => {
2222
</MemoryRouter>,
2323
);
2424

25-
expect(screen.getByText('Smart shopping list')).toBeInTheDocument();
2625
expect(screen.getByText('Home')).toBeInTheDocument();
2726
expect(screen.getByText('List')).toBeInTheDocument();
2827
expect(screen.getByText('Manage List')).toBeInTheDocument();

0 commit comments

Comments
 (0)