File tree Expand file tree Collapse file tree 2 files changed +19
-6
lines changed Expand file tree Collapse file tree 2 files changed +19
-6
lines changed Original file line number Diff line number Diff line change 33
33
.menu-button {
34
34
display : block ;
35
35
}
36
+ nav .show-on-mobile.nav-links > a {
37
+ padding-left : 0 ;
38
+ padding-right : 0 ;
39
+ }
40
+ .menu-button :hover {
41
+ cursor : pointer ;
42
+ }
43
+
36
44
.page-header {
37
45
justify-content : space-between ;
38
46
.header-center {
48
56
border-top : 1px solid #ccc ;
49
57
position : absolute ;
50
58
display : flex ;
59
+ width : 100% ;
51
60
flex-wrap : wrap ;
52
61
top : 76px ;
53
62
left : 0 ;
54
63
a {
55
64
text-align : center ;
56
- min-width : 28 % ;
65
+ min-width : 33 % ;
57
66
}
58
67
}
59
68
}
60
69
nav .hide-on-mobile {
61
- display : none !important ;
62
- height : 0 ;
70
+ max-height : 0 ;
71
+ opacity : 0 ;
72
+ overflow : hidden ;
73
+ transition : opacity 0.5s ;
63
74
}
64
75
nav .show-on-mobile {
65
- display : flex !important ;
76
+ opacity : 1 ;
77
+ max-height : 348px ;
78
+ transition : opacity 0.5s ease ;
66
79
}
67
80
}
Original file line number Diff line number Diff line change @@ -8,8 +8,8 @@ document.addEventListener("DOMContentLoaded", function () {
8
8
}
9
9
10
10
menuButton . addEventListener ( "click" , function ( ) {
11
- var displayStyle = getComputedStyle ( menu ) . display ;
12
- if ( displayStyle !== "none" ) {
11
+ let menuClass = menu . classList ;
12
+ if ( menuClass . contains ( "show-on-mobile" ) ) {
13
13
hideMenu ( ) ;
14
14
} else {
15
15
menu . classList . add ( "show-on-mobile" ) ;
You can’t perform that action at this time.
0 commit comments