File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ## Problem to solve
2+
3+ I'd like the github cat icon to be visible in header, and link to the github
4+ repo.
5+
6+ ## Idea
7+
8+ I'd suggest at right of the light/dark mode on desktop. Do your best in burger
9+ menu on mobile.
Original file line number Diff line number Diff line change @@ -141,6 +141,36 @@ body.light-theme .theme-toggle {
141141 color : # 6366f1 ;
142142}
143143
144+ /* GitHub link */
145+ nav .github-link {
146+ display : flex;
147+ align-items : center;
148+ justify-content : center;
149+ padding : 0.375rem 0.5rem ;
150+ border : 1px solid var (--border );
151+ border-radius : 6px ;
152+ color : var (--text-secondary );
153+ transition : all 0.15s ease;
154+ }
155+
156+ nav .github-link : hover {
157+ border-color : var (--accent );
158+ background : rgba (99 , 102 , 241 , 0.1 );
159+ color : var (--text-primary );
160+ }
161+
162+ .github-icon {
163+ width : 18px ;
164+ height : 18px ;
165+ }
166+
167+ /* Nav icons container (theme toggle + github) */
168+ .nav-icons {
169+ display : flex;
170+ align-items : center;
171+ gap : 0.5rem ;
172+ }
173+
144174/* Nav groups for two-level menu */
145175.nav-group {
146176 display : flex;
@@ -1820,6 +1850,32 @@ body.light-theme .js-badge {
18201850 border-radius : 0 ;
18211851 }
18221852
1853+ /* Nav icons on mobile - centered row */
1854+ header nav .nav-icons {
1855+ display : flex;
1856+ justify-content : center;
1857+ gap : 1.5rem ;
1858+ padding : 1rem 0 ;
1859+ border-top : 1px solid var (--border );
1860+ margin-top : 0.5rem ;
1861+ }
1862+
1863+ header nav .nav-icons .theme-toggle ,
1864+ header nav .nav-icons .github-link {
1865+ border : none;
1866+ background : none;
1867+ padding : 0.5rem ;
1868+ }
1869+
1870+ header nav .nav-icons .theme-toggle {
1871+ font-size : 1.5rem ;
1872+ }
1873+
1874+ header nav .nav-icons .github-icon {
1875+ width : 24px ;
1876+ height : 24px ;
1877+ }
1878+
18231879 /* Two-level nav on mobile */
18241880 header nav .nav-group {
18251881 flex-direction : column;
Original file line number Diff line number Diff line change @@ -120,9 +120,16 @@ const url = (path: string) => `${base}${path}`;
120120 <a href ={ url (' /blog' )} class:list ={ [{ active: activeNav === ' blog' }]} >Blog</a >
121121 <a href ={ url (' /about' )} class:list ={ [{ active: activeNav === ' about' }]} >About</a >
122122 <a href ={ url (' /security' )} class:list ={ [{ active: activeNav === ' security' }]} >Security</a >
123- <button class =" theme-toggle" id =" theme-toggle" aria-label =" Toggle theme" title =" Toggle light/dark mode" >
124- <span class =" theme-icon" >☾ </span >
125- </button >
123+ <div class =" nav-icons" >
124+ <button class =" theme-toggle" id =" theme-toggle" aria-label =" Toggle theme" title =" Toggle light/dark mode" >
125+ <span class =" theme-icon" >☾ </span >
126+ </button >
127+ <a href =" https://github.com/enspirit/elo" target =" _blank" rel =" noopener noreferrer" class =" github-link" aria-label =" View on GitHub" title =" View on GitHub" >
128+ <svg viewBox =" 0 0 24 24" fill =" currentColor" class =" github-icon" >
129+ <path d =" M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z" />
130+ </svg >
131+ </a >
132+ </div >
126133 </nav >
127134 </header >
128135
You can’t perform that action at this time.
0 commit comments