@@ -276,6 +276,52 @@ <h1 class="hero-title">
276276 </ div >
277277 </ div >
278278
279+ < section class ="stats-dashboard-section ">
280+ < div class ="container ">
281+
282+ < div class ="section-header ">
283+ < h2 class ="section-heading ">
284+ 📊 Project Statistics Dashboard
285+ </ h2 >
286+ </ div >
287+
288+ < div class ="stats-dashboard ">
289+
290+ < div class ="stats-card " data-filter ="all ">
291+ < h3 id ="statsTotal "> 0</ h3 >
292+ < p > Total Projects</ p >
293+ </ div >
294+
295+ < div class ="stats-card " data-filter ="games ">
296+ < h3 id ="statsGames "> 0</ h3 >
297+ < p > Games</ p >
298+ </ div >
299+
300+ < div class ="stats-card " data-filter ="math ">
301+ < h3 id ="statsMath "> 0</ h3 >
302+ < p > Math</ p >
303+ </ div >
304+
305+ < div class ="stats-card " data-filter ="utilities ">
306+ < h3 id ="statsUtilities "> 0</ h3 >
307+ < p > Utilities</ p >
308+ </ div >
309+
310+ < div class ="stats-card " data-filter ="favorites ">
311+ < h3 id ="statsFavorites "> 0</ h3 >
312+ < p > Favorites</ p >
313+ </ div >
314+
315+ < div class ="stats-card ">
316+ < h3 id ="statsViewed "> 0</ h3 >
317+ < p > Recently Viewed</ p >
318+ </ div >
319+
320+ </ div >
321+
322+ </ div >
323+ </ section >
324+
279325 <!-- Timeline Section -->
280326 < section class ="hero-timeline-section " id ="timelineSection ">
281327 < div class ="timeline-background " aria-hidden ="true "> </ div >
@@ -388,8 +434,49 @@ <h3 class="timeline-title">Share</h3>
388434 </ div >
389435 </ section >
390436
437+ <!-- Bookmarked Projects Section -->
438+ < section class ="projects-section " id ="bookmarkedProjectsSection ">
439+ < div class ="container ">
440+ < div class ="section-header ">
441+ < h2 class ="section-heading ">
442+ ⭐ Bookmarked Projects
443+ < span id ="bookmarkCountBadge "> </ span >
444+ </ h2 >
445+ </ div >
446+
447+ < div class ="projects-grid " id ="bookmarkedProjectsGrid "> </ div >
448+
449+ < div id ="noBookmarksMessage " class ="empty-state ">
450+ < p > No bookmarked projects yet.</ p >
451+ < p class ="empty-state-hint ">
452+ Click the ⭐ icon on any project to bookmark it.
453+ </ p >
454+ </ div >
455+ </ div >
456+ </ section >
457+
391458 <!-- Recently Viewed Section -->
392- < section class ="projects-section " id ="recentlyViewedSection ">
459+ < div class ="section-header ">
460+
461+ < h2 class ="section-heading ">
462+ 🕒 Recently Opened Projects
463+ < span id ="historyCount "> </ span >
464+ </ h2 >
465+
466+ < div >
467+
468+ < input
469+ id ="historySearch "
470+ type ="text "
471+ placeholder ="Search history... ">
472+
473+ < button id ="clearHistoryBtn ">
474+ Clear History
475+ </ button >
476+
477+ </ div >
478+
479+ </ div >
393480 < div class ="container ">
394481 < div class ="section-header ">
395482 < h2 class ="section-heading ">
@@ -674,6 +761,15 @@ <h3>Stay Updated</h3>
674761 const projectsGrid = document . getElementById ( "projectsGrid" ) ;
675762 if ( ! projectsGrid ) return ;
676763
764+ const bookmarkedGrid =
765+ document . getElementById ( "bookmarkedProjectsGrid" ) ;
766+
767+ const bookmarkBadge =
768+ document . getElementById ( "bookmarkCountBadge" ) ;
769+
770+ const noBookmarks =
771+ document . getElementById ( "noBookmarksMessage" ) ;
772+
677773 // ALL projects from your js/projects/ folder
678774 const projectsData = [
679775 // GAMES (20+)
@@ -1050,6 +1146,46 @@ <h3>Stay Updated</h3>
10501146 localStorage . setItem ( "favorites" , JSON . stringify ( favorites ) ) ;
10511147 }
10521148
1149+ function renderBookmarkedProjects ( ) {
1150+
1151+ if ( ! bookmarkedGrid ) return ;
1152+
1153+ bookmarkedGrid . innerHTML = "" ;
1154+
1155+ const favs =
1156+ JSON . parse ( localStorage . getItem ( "favorites" ) || "[]" ) ;
1157+
1158+ bookmarkBadge . textContent =
1159+ "(" + favs . length + ")" ;
1160+
1161+ if ( favs . length === 0 ) {
1162+
1163+ noBookmarks . style . display = "block" ;
1164+
1165+ return ;
1166+ }
1167+
1168+ noBookmarks . style . display = "none" ;
1169+
1170+ favs . forEach ( projectId => {
1171+
1172+ const card =
1173+ document . querySelector (
1174+ `.project-card[data-project="${ projectId } "]`
1175+ ) ;
1176+
1177+ if ( card ) {
1178+
1179+ bookmarkedGrid . appendChild (
1180+ card . cloneNode ( true )
1181+ ) ;
1182+
1183+ }
1184+
1185+ } ) ;
1186+
1187+ }
1188+
10531189 projectsData . forEach ( ( proj ) => {
10541190 const card = document . createElement ( "div" ) ;
10551191 card . className = "project-card" ;
@@ -1077,6 +1213,27 @@ <h3>${proj.title}</h3>
10771213
10781214 // Update counts
10791215 const total = projectsData . length ;
1216+ function animateCounter ( id , value ) {
1217+
1218+ let start = 0 ;
1219+
1220+ const element = document . getElementById ( id ) ;
1221+
1222+ const timer = setInterval ( ( ) => {
1223+
1224+ start ++ ;
1225+
1226+ element . textContent = start ;
1227+
1228+ if ( start >= value ) {
1229+
1230+ clearInterval ( timer ) ;
1231+
1232+ }
1233+
1234+ } , 25 ) ;
1235+
1236+ }
10801237 const games = projectsData . filter ( ( p ) => p . category === "games" ) . length ;
10811238 const math = projectsData . filter ( ( p ) => p . category === "math" ) . length ;
10821239 const utils = projectsData . filter (
@@ -1094,10 +1251,31 @@ <h3>${proj.title}</h3>
10941251 if ( heroMath ) heroMath . textContent = math ;
10951252 if ( heroUtils ) heroUtils . textContent = utils ;
10961253 if ( projectBadge ) projectBadge . textContent = total + " projects" ;
1254+ animateCounter ( "statsTotal" , total ) ;
1255+
1256+ animateCounter ( "statsGames" , games ) ;
1257+
1258+ animateCounter ( "statsMath" , math ) ;
1259+
1260+ animateCounter ( "statsUtilities" , utils ) ;
1261+
1262+ animateCounter (
1263+ "statsFavorites" ,
1264+ favorites . length
1265+ ) ;
1266+
1267+ const viewed =
1268+ JSON . parse ( localStorage . getItem ( "recentlyViewed" ) || "[]" ) ;
1269+
1270+ animateCounter (
1271+ "statsViewed" ,
1272+ viewed . length
1273+ ) ;
10971274
10981275 console . log (
10991276 `✅ Loaded ${ total } projects: ${ games } games, ${ math } math, ${ utils } utilities`
11001277 ) ;
1278+ renderBookmarkedProjects ( ) ;
11011279
11021280 // Wire up buttons
11031281 setTimeout ( ( ) => {
@@ -1137,6 +1315,7 @@ <h3>${proj.title}</h3>
11371315 }
11381316
11391317 localStorage . setItem ( "favorites" , JSON . stringify ( favs ) ) ;
1318+ renderBookmarkedProjects ( ) ;
11401319
11411320 // If we're on favorites tab, refresh the view
11421321 const activeCategory = document
0 commit comments