77< link rel ="stylesheet " href ="assets/style.css " />
88< style >
99 : root { --hf-orange : # ff8a65 ; --hf-purple : # 9b59b6 ; --hf-dark : # 0e1b33 ; --hf-light : # fff ; }
10+ /* When light theme is active, make the --hf-light variable dark so text becomes black */
11+ [data-theme = "light" ] { --hf-light : # 000 ; }
12+ /* Top navigation minimal styles (copied from index.html) */
13+ .logo-blob { display : inline-block; width : 2em ; height : 2em ; margin-right : 0.5em ; background : linear-gradient (135deg , var (--hf-orange ), var (--hf-purple )); border-radius : 50% ; box-shadow : 0 0 15px rgba (255 , 138 , 101 , 0.3 ); }
14+ .brand { display : flex; align-items : center; color : var (--hf-light ); text-decoration : none; }
15+ .brand-text { font-weight : 700 ; color : var (--hf-light ); }
16+ .topnav { background : linear-gradient (135deg , # 0e1b33, var (--hf-purple )); color : var (--hf-light ); padding : 1rem 2rem ; position : sticky; top : 0 ; z-index : 1000 ; box-shadow : 0 2px 20px rgba (0 , 0 , 0 , 0.2 ); }
17+ .topnav-inner { display : flex; justify-content : space-between; align-items : center; max-width : 1200px ; margin : 0 auto; }
18+ .nav-links { display : flex; gap : 1.25rem ; }
19+ .nav-links a { color : var (--hf-light ); text-decoration : none; padding : 0.35rem 0.6rem ; transition : color .2s ; }
20+ .nav-links a : hover { color : var (--hf-orange ); }
21+ .nav-actions { display : flex; gap : 0.75rem ; align-items : center; }
22+ .nav-btn { background : none; border : none; color : # 9fb1c7 ; font-size : 1.05rem ; cursor : pointer; }
23+ .nav-cta { background : linear-gradient (135deg , var (--hf-orange ), var (--hf-purple )); padding : 0.5rem .9rem ; border-radius : 999px ; color : var (--hf-light ); text-decoration : none; font-weight : 600 ; }
1024 body { margin : 0 ; font-family : system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, sans-serif; background : radial-gradient (circle at 30% 30% , rgba (155 , 89 , 182 , .15 ), transparent), linear-gradient (135deg , # 182c4f, # 3d2f67 60% , # 532d72 ); color : var (--hf-light ); min-height : 100vh ; }
1125 header { text-align : center; padding : 2.75rem 1rem 1.25rem ; }
1226 h1 { margin : 0 ; font-size : 3rem ; letter-spacing : .07em ; font-weight : 700 ; text-shadow : 0 4px 18px rgba (0 , 0 , 0 , .45 ); }
1327 .subtitle { margin-top : .75rem ; font-size : .9rem ; letter-spacing : .15em ; opacity : .85 ; }
1428 .search-panel { margin : 2.5rem auto 1.25rem ; max-width : 780px ; background : rgba (255 , 255 , 255 , 0.05 ); border : 1px solid rgba (255 , 255 , 255 , 0.12 ); padding : 1.75rem 1.5rem 2rem ; border-radius : 26px ; position : relative; backdrop-filter : blur (10px ); box-shadow : 0 10px 40px -10px rgba (0 , 0 , 0 , .35 ); }
15- .search-panel : before { content : "" ; position : absolute; inset : 0 ; border-radius : inherit; padding : 1px ; background : linear-gradient (135deg , rgba (255 , 138 , 101 , .45 ), rgba (155 , 89 , 182 , .45 )); -webkit-mask : linear-gradient (# 000 0 0 ) content-box, linear-gradient (# 000 0 0 ); -webkit-mask-composite : xor; mask-composite : exclude; pointer-events : none; }
29+ .search-panel : before { content : "" ; position : absolute; inset : 0 ; border-radius : inherit; padding : 1px ; background : linear-gradient (135deg , rgba (255 , 138 , 101 , .45 ), rgba (155 , 89 , 182 , .45 )); -webkit-mask : linear-gradient (# 000 0 0 ) content-box, linear-gradient (# 000 0 0 ); -webkit-mask-composite : xor; mask : linear-gradient ( # 000 0 0 ) content-box , linear-gradient ( # 000 0 0 ); mask -composite: exclude; pointer-events : none; }
1630 .language-search-form { display : flex; width : 100% ; border : 1px solid rgba (255 , 255 , 255 , 0.25 ); border-radius : 10px ; overflow : hidden; background : rgba (0 , 0 , 0 , 0.35 ); }
1731 .language-search-form input { flex : 1 ; background : transparent; border : none; padding : .9rem 1rem ; color : var (--hf-light ); font-size : 1rem ; letter-spacing : .03em ; }
1832 .language-search-form input : focus { outline : none; box-shadow : inset 0 0 0 2px var (--hf-purple ); }
5771</ style >
5872</ head >
5973< body >
74+ < header class ="topnav " role ="banner ">
75+ < div class ="topnav-inner ">
76+ < a class ="brand " href ="index.html " title ="Home ">
77+ < span class ="logo-blob " aria-hidden ="true "> </ span >
78+ < span class ="brand-text "> Hacktoberfest 2025</ span >
79+ </ a >
80+
81+ < nav class ="nav-links " aria-label ="Main navigation ">
82+ < a href ="index.html#what-is-hacktoberfest "> Overview</ a >
83+ < a href ="projects.html "> Projects</ a >
84+ < a href ="index.html#how-to-participate "> How To</ a >
85+ < a href ="index.html#resources "> Resources</ a >
86+ </ nav >
87+
88+ < div class ="nav-actions ">
89+ < button id ="nav-search-btn " class ="nav-btn " title ="Search (/) ">
90+ 🔎
91+ </ button >
92+ < button id ="theme-toggle " class ="nav-btn " title ="Toggle theme ">
93+ 🌙
94+ </ button >
95+ < a class ="nav-cta " href ="https://github.com/avinash201199/Hacktoberfest2025 " target ="_blank " rel ="noopener "> GitHub</ a >
96+ < button id ="hamburger " class ="nav-btn " aria-label ="Toggle sidebar "> ☰</ button >
97+ </ div >
98+ </ div >
99+ </ header >
100+
60101 < header >
61102 < h1 > SEARCH YOUR< br /> LANGUAGE</ h1 >
62103 < p class ="subtitle "> Live Hacktoberfest repositories grouped by programming language</ p >
@@ -192,5 +233,40 @@ <h3><a href="${r.html_url}" target="_blank" rel="noopener noreferrer">${r.full_n
192233 resultsContent . appendChild ( grid ) ;
193234 }
194235</ script >
236+ < script >
237+ // Theme toggle: mirror main page behavior and persist selection
238+ ( function ( ) {
239+ const themeToggle = document . getElementById ( 'theme-toggle' ) ;
240+ if ( ! themeToggle ) return ;
241+ const html = document . documentElement ;
242+ const savedTheme = localStorage . getItem ( 'theme' ) || 'dark' ;
243+ html . setAttribute ( 'data-theme' , savedTheme ) ;
244+ themeToggle . textContent = savedTheme === 'dark' ? '🌙' : '☀️' ;
245+
246+ themeToggle . addEventListener ( 'click' , ( ) => {
247+ const current = html . getAttribute ( 'data-theme' ) ;
248+ const next = current === 'dark' ? 'light' : 'dark' ;
249+ html . setAttribute ( 'data-theme' , next ) ;
250+ localStorage . setItem ( 'theme' , next ) ;
251+ themeToggle . textContent = next === 'dark' ? '🌙' : '☀️' ;
252+ } ) ;
253+ } ) ( ) ;
254+ </ script >
255+ < script >
256+ // Ensure navbar links from this page navigate to index.html with the correct fragment
257+ document . querySelectorAll ( '.nav-links a' ) . forEach ( a => {
258+ a . addEventListener ( 'click' , ( e ) => {
259+ const href = a . getAttribute ( 'href' ) ;
260+ // If it's already a full index.html#... link, let it proceed
261+ if ( href && href . startsWith ( 'index.html#' ) ) return ;
262+ // If it's just a fragment like #resources or points to index fragment, build proper URL
263+ if ( href && href . startsWith ( '#' ) ) {
264+ e . preventDefault ( ) ;
265+ window . location . href = 'index.html' + href ;
266+ }
267+ // If it's a plain 'index.html', leave as-is
268+ } ) ;
269+ } ) ;
270+ </ script >
195271</ body >
196272</ html >
0 commit comments