File tree Expand file tree Collapse file tree 2 files changed +54
-17
lines changed
Expand file tree Collapse file tree 2 files changed +54
-17
lines changed Original file line number Diff line number Diff line change @@ -382,36 +382,57 @@ footer {
382382.navbar-wrapper .scrolled .navbar {
383383 height : 65px ;
384384}
385+ /* MOBILE MENU */
386+ .hamburger {
387+ display : none;
388+ }
385389
390+ /* Mobile view */
386391@media (max-width : 768px ) {
387392
388393 .navbar {
389- flex-wrap : wrap;
390- height : auto;
391- padding : 8px 12px ;
394+ height : 58px ;
395+ padding : 0 14px ;
392396 }
393397
394- .brand {
395- order : 1 ; /* 👈 ALWAYS first row */
396- flex : 0 0 100% ;
397- justify-content : flex-start;
398- margin-bottom : 6px ;
398+ .nav-links {
399+ position : absolute;
400+ top : 58px ;
401+ left : 0 ;
402+ right : 0 ;
403+ background : linear-gradient (135deg , # 0f172a, # 0dcaf0 );
404+ flex-direction : column;
405+ gap : 0 ;
406+ display : none;
407+ border-bottom : 1px solid rgba (255 , 255 , 255 , 0.1 );
399408 }
400409
401- .nav-links {
402- order : 2 ; /* 👈 ALWAYS second row */
403- flex : 0 0 100% ;
404- justify-content : center;
405- gap : 14px ;
410+ .nav-links li {
411+ text-align : center;
412+ border-bottom : 1px solid rgba (255 , 255 , 255 , 0.1 );
406413 }
407414
408415 .nav-links a {
409- font-size : 13px ;
410- padding : 6px 10px ;
416+ display : block;
417+ padding : 14px ;
418+ font-size : 15px ;
419+ }
420+
421+ .hamburger {
422+ display : flex;
423+ flex-direction : column;
424+ gap : 4px ;
425+ cursor : pointer;
411426 }
412427
413- .nav-links a ::before {
428+ .hamburger span {
429+ width : 22px ;
414430 height : 2px ;
431+ background : # ffffff ;
432+ border-radius : 2px ;
415433 }
416- }
417434
435+ .nav-links .open {
436+ display : flex;
437+ }
438+ }
Original file line number Diff line number Diff line change 3333 < li > < a href ="#about "> About</ a > </ li >
3434 </ ul >
3535 </ div >
36+ < div class ="hamburger " id ="hamburger ">
37+ < span > </ span >
38+ < span > </ span >
39+ < span > </ span >
40+ </ div >
41+
3642 </ nav >
3743
3844 <!-- HERO -->
@@ -177,6 +183,16 @@ <h2>Disclaimer</h2>
177183 } ) ;
178184 } ) ;
179185 </ script >
186+
187+ < script >
188+ const hamburger = document . getElementById ( 'hamburger' ) ;
189+ const navLinks = document . querySelector ( '.nav-links' ) ;
190+
191+ hamburger . addEventListener ( 'click' , ( ) => {
192+ navLinks . classList . toggle ( 'open' ) ;
193+ } ) ;
194+ </ script >
195+
180196</ body >
181197
182198</ html >
You can’t perform that action at this time.
0 commit comments