Skip to content

Commit f7c09be

Browse files
committed
style: Update styling in CSS and HTML files for flex layout and navigation menus
1 parent 3567c14 commit f7c09be

File tree

3 files changed

+48
-11
lines changed

3 files changed

+48
-11
lines changed

public/css/style.css

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ body {
22
max-width: 54ch;
33
margin: 0 auto;
44
padding: 1rem 20px;
5+
56
color: #1e1e1e;
67
font-family:
78
Segoe UI,
@@ -10,10 +11,34 @@ body {
1011
sans-serif;
1112
font-size: clamp(1rem, -0.875rem + 8.333vw, 1.5rem);
1213
line-height: 1.5;
14+
15+
display: flex;
16+
flex-direction: column;
17+
min-height: 100vh;
18+
19+
box-sizing: border-box;
1320
}
1421

1522
h1,
1623
h2,
1724
h3 {
1825
line-height: 1.2;
1926
}
27+
28+
header,
29+
footer {
30+
flex-shrink: 0;
31+
}
32+
33+
main {
34+
flex: 1;
35+
}
36+
37+
nav ul {
38+
display: flex;
39+
list-style-type: none;
40+
padding: 0;
41+
margin: 0;
42+
gap: 20px;
43+
flex-wrap: wrap;
44+
}

src/views/components/header.html

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,25 @@
11
<header>
2-
<h1>
3-
<a href="/">
4-
notify
5-
</a>
6-
</h1>
7-
<p>send notification to discord, email, and sms</p>
2+
<div>
3+
<h1>
4+
<a href="/">
5+
notify
6+
</a>
7+
</h1>
8+
<p>send notification to discord, email, and sms</p>
9+
</div>
10+
11+
<nav>
12+
<ul>
13+
<li>
14+
<a href="/">home</a>
15+
</li>
16+
<li>
17+
<a href="/login">login</a>
18+
</li>
19+
<li>
20+
<a href="/dashboard">dashboard</a>
21+
</li>
22+
</ul>
23+
</nav>
24+
825
</header>

src/views/pages/home.html

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
11
<p>home page</p>
2-
3-
4-
<nav>
5-
<a href="/login">login</a>
6-
</nav>

0 commit comments

Comments
 (0)