File tree 2 files changed +73
-1
lines changed
2 files changed +73
-1
lines changed Original file line number Diff line number Diff line change @@ -154,3 +154,66 @@ img {
154
154
.gallery img {
155
155
width : 100% ;
156
156
}
157
+
158
+ @media (max-width : 1000px ) {
159
+ .menu {
160
+ order : -1 ;
161
+ perspective : 800px ;
162
+ }
163
+
164
+ [aria-controls = "menu-list" ] {
165
+ display : block;
166
+ margin-bottom : 10px ;
167
+ }
168
+
169
+ .menu ul {
170
+ max-height : 0 ;
171
+ transform : rotateX (90deg );
172
+ transition : all 0.5s ;
173
+ overflow : hidden;
174
+ }
175
+
176
+ [aria-expanded = "true" ] ~ ul {
177
+ display : grid;
178
+ max-height : 500px ;
179
+ transform : rotateX (0 );
180
+ }
181
+
182
+ [aria-expanded = "false" ] .close {
183
+ display : none;
184
+ }
185
+
186
+ [aria-expanded = "false" ] .open {
187
+ display : inline-block;
188
+ }
189
+
190
+ [aria-expanded = "true" ] .close {
191
+ display : inline-block;
192
+ }
193
+
194
+ [aria-expanded = "true" ] .open {
195
+ display : none;
196
+ }
197
+ }
198
+
199
+ @media (max-width : 700px ) {
200
+ .top {
201
+ grid-template-areas :
202
+ "hero hero"
203
+ "cta1 cta2"
204
+ }
205
+
206
+ /* About */
207
+ .about {
208
+ grid-template-columns : 1fr ;
209
+ }
210
+ }
211
+
212
+ @media (max-width : 500px ) {
213
+ .top {
214
+ grid-template-areas :
215
+ "hero"
216
+ "cta1"
217
+ "cta2"
218
+ }
219
+ }
Original file line number Diff line number Diff line change @@ -102,8 +102,17 @@ <h2>Instant Grams</h2>
102
102
</ div >
103
103
104
104
< script >
105
+ const navButton = document . querySelector ( 'button[aria-expanded]' ) ;
106
+ function toggleNav ( { target } ) {
107
+ // console.log(target);
108
+ const expanded = target . getAttribute ( 'aria-expanded' ) === 'true' || false ;
109
+ // console.log(expanded);
110
+ navButton . setAttribute ( 'aria-expanded' , ! expanded ) ;
111
+ }
112
+
113
+ navButton . addEventListener ( 'click' , toggleNav ) ;
105
114
</ script >
106
-
115
+
107
116
</ body >
108
117
109
118
</ html >
You can’t perform that action at this time.
0 commit comments