File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3434 />
3535 </ head >
3636 < body class ="sidebar-active ">
37- < button aria-label ="Switch theme " class ="theme-toggle fixed-theme-toggle " type ="button ">
37+ < button aria-label ="Switch theme " class ="theme-toggle fixed-theme-toggle " id =" fixed-theme-toggle " type ="button ">
3838 < i class ="fas fa-moon " aria-hidden ="true "> </ i >
3939 </ button >
4040 <!-- Scroll Progress Bar -->
Original file line number Diff line number Diff line change @@ -728,6 +728,17 @@ document.addEventListener("DOMContentLoaded", function () {
728728
729729 document . body . classList . toggle ( "sidebar-active" , showSidebar ) ;
730730 console . log ( 'Sidebar active:' , showSidebar , 'scrollY:' , window . scrollY ) ;
731+
732+ // Hide fixed-theme-toggle if sidebar is active
733+
734+ const fixedThemeToggle = document . getElementById ( "fixed-theme-toggle" ) ;
735+ if ( showSidebar ) {
736+ fixedThemeToggle . style . display = "none" ;
737+ }
738+ else {
739+ fixedThemeToggle . style . display = "block" ;
740+ }
741+
731742 } ;
732743
733744 window . addEventListener ( 'scroll' , checkAndToggleSidebar ) ;
@@ -1293,7 +1304,7 @@ document.addEventListener("DOMContentLoaded", function () {
12931304 } , 50 ) ;
12941305 }
12951306 lastFocusedElement = null ;
1296- } )
1307+ }
12971308
12981309 if ( modalClose ) modalClose . addEventListener ( "click" , closeProjectSafe ) ;
12991310 if ( modal ) {
@@ -1851,5 +1862,4 @@ projectCards.forEach(card => {
18511862 // Initial card filtering state update
18521863 updateProjectVisibility ( currentCategory , currentSearchQuery ) ;
18531864 window . updateRecentlyViewed ( ) ;
1854- }
18551865} ) ;
You can’t perform that action at this time.
0 commit comments