File tree Expand file tree Collapse file tree 2 files changed +46
-5
lines changed Expand file tree Collapse file tree 2 files changed +46
-5
lines changed Original file line number Diff line number Diff line change 11< nav >
2- < a href ="/ "> Home</ a >
3- < a href ="/about "> About</ a >
4- < a href ="/projects "> Projects</ a >
5- < a href ="/resume "> Resume</ a >
6- < a href ="/contact "> Contact</ a >
2+ < button class ="nav-toggle " onclick ="toggleNav() "> ☰</ button >
3+ < ul id ="nav-menu ">
4+ < li > < a href ="{{ .Site.BaseURL }} "> < span class ="emoji "> 🏠</ span > Home</ a > </ li >
5+ < li > < a href ="{{ .Site.BaseURL }}projects "> < span class ="emoji "> 🛠️</ span > Projects</ a > </ li >
6+ < li > < a href ="{{ .Site.BaseURL }}opensource "> < span class ="emoji "> 🌍</ span > Community</ a > </ li >
7+ < li > < a href ="{{ .Site.BaseURL }}contact "> < span class ="emoji "> 📧</ span > Connect</ a > </ li >
8+ </ ul >
79</ nav >
10+
11+ < script >
12+ function toggleNav ( ) {
13+ const menu = document . getElementById ( 'nav-menu' ) ;
14+ menu . classList . toggle ( 'active' ) ;
15+ }
16+ </ script >
Original file line number Diff line number Diff line change @@ -117,6 +117,19 @@ nav {
117117 margin-bottom : 3rem ;
118118 padding-bottom : 1rem ;
119119 border-bottom : 1px solid var (--sage-green );
120+ position : relative;
121+ }
122+
123+ .nav-toggle {
124+ display : none;
125+ background : none;
126+ border : none;
127+ font-size : 1.5rem ;
128+ color : var (--steel-blue );
129+ cursor : pointer;
130+ position : absolute;
131+ right : 0 ;
132+ top : -0.5rem ;
120133}
121134
122135nav ul {
@@ -139,6 +152,25 @@ nav a:hover {
139152 color : var (--rust-terracotta );
140153}
141154
155+ /* Mobile Navigation */
156+ @media (max-width : 600px ) {
157+ .nav-toggle {
158+ display : block;
159+ }
160+
161+ nav ul {
162+ display : none;
163+ flex-direction : column;
164+ gap : 1rem ;
165+ margin-top : 2rem ;
166+ text-align : center;
167+ }
168+
169+ nav ul .active {
170+ display : flex;
171+ }
172+ }
173+
142174/* Project Cards */
143175.project-card {
144176 border : 2px solid var (--steel-blue );
You can’t perform that action at this time.
0 commit comments