Skip to content

Commit b33d468

Browse files
committed
Update mobile navigation to be more user friendly
- Make navigation bar stick to top on mobile. - Increase font size and spacing of navigation entries on mobile and increase their clickable area. - Expanded mobile navigation now spans the entire height.
1 parent 0e76ba4 commit b33d468

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

sitestatic/archweb.css

+25-3
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
height: 30px;
4343
display: none;
4444
margin-left: auto;
45+
margin-right: 30px;
4546
}
4647

4748
#hamburger span {
@@ -52,12 +53,13 @@
5253
display: block;
5354
margin: 5px;
5455
transition: 0.5s;
56+
transform-origin: 25%;
5557
}
5658

5759
/* animate hamburger */
58-
#hamburger.open span:nth-child(1) { transform: rotate(45deg) translateY(10px); }
60+
#hamburger.open span:nth-child(1) { transform: rotate(45deg); }
5961
#hamburger.open span:nth-child(2) { opacity: 0; }
60-
#hamburger.open span:nth-child(3) { transform: rotate(-45deg) translateY(-10px); }
62+
#hamburger.open span:nth-child(3) { transform: rotate(-45deg); }
6163

6264
/* display nav items in hamburger menu fashion */
6365
.open + #archnavbarmenu #archnavbarlist {
@@ -66,16 +68,32 @@
6668
align-items: flex-start;
6769
padding-bottom: 20px !important;
6870
width: 100%;
71+
height: calc(100vh - 60px);
6972
position: absolute;
7073
left: 0;
7174
top: 60px;
7275
background-color: #333;
7376
}
7477

78+
#archnavbarlist li {
79+
text-align: left;
80+
width: 100%;
81+
padding-top: 0 !important;
82+
}
83+
84+
#archnavbarlist a {
85+
width: 100%;
86+
display: inline-block;
87+
font-size: 18px;
88+
line-height: 45px !important;
89+
}
90+
7591
#archnavbar {
7692
display: flex;
7793
align-items: center;
78-
position: relative;
94+
position: fixed;
95+
top: 0;
96+
width: 100%;
7997
}
8098

8199
#hamburger {
@@ -86,6 +104,10 @@
86104
display: none !important;
87105
position: relative;
88106
}
107+
108+
body {
109+
padding-top: 65px;
110+
}
89111
}
90112

91113
/* END ARCH GLOBAL NAVBAR */

0 commit comments

Comments
 (0)