File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -937,6 +937,129 @@ main>.hero-section:has(.hero-code-snippets) {
937937 padding : 0 1rem ;
938938}
939939
940+ /* ==========================================================
941+ FIX ISSUE #1703
942+ Homepage Category Navigation
943+ ========================================================== */
944+
945+ .hero-category-nav {
946+
947+ display : flex;
948+
949+ justify-content : center;
950+
951+ align-items : center;
952+
953+ gap : 18px ;
954+
955+ width : fit-content;
956+
957+ margin : 0 auto 42px ;
958+
959+ padding : 12px 24px ;
960+
961+ background : rgba (255 , 255 , 255 , .72 );
962+
963+ backdrop-filter : blur (18px );
964+
965+ border : 1px solid rgba (255 , 255 , 255 , .35 );
966+
967+ border-radius : 18px ;
968+
969+ box-shadow : 0 8px 30px rgba (0 , 0 , 0 , .08 );
970+
971+ }
972+
973+ .hero-nav-btn {
974+
975+ display : flex;
976+
977+ align-items : center;
978+
979+ gap : 8px ;
980+
981+ background : none;
982+
983+ border : none;
984+
985+ cursor : pointer;
986+
987+ padding : 10px 4px ;
988+
989+ position : relative;
990+
991+ color : var (--text-secondary );
992+
993+ font-size : 15px ;
994+
995+ font-weight : 600 ;
996+
997+ transition : .25s ;
998+
999+ }
1000+
1001+ .hero-nav-btn i {
1002+
1003+ font-size : 14px ;
1004+
1005+ }
1006+
1007+ .hero-nav-btn : hover {
1008+
1009+ color : var (--accent );
1010+
1011+ }
1012+
1013+ .hero-nav-btn .active {
1014+
1015+ color : var (--accent );
1016+
1017+ }
1018+
1019+ .hero-nav-btn ::after {
1020+
1021+ content : "" ;
1022+
1023+ position : absolute;
1024+
1025+ left : 0 ;
1026+
1027+ bottom : -8px ;
1028+
1029+ width : 100% ;
1030+
1031+ height : 3px ;
1032+
1033+ background : var (--accent );
1034+
1035+ border-radius : 999px ;
1036+
1037+ transform : scaleX (0 );
1038+
1039+ transition : .25s ;
1040+
1041+ }
1042+
1043+ .hero-nav-btn .active ::after {
1044+
1045+ transform : scaleX (1 );
1046+
1047+ }
1048+
1049+ html [data-theme = "dark" ] .hero-category-nav {
1050+
1051+ background : rgba (28 , 28 , 28 , .65 );
1052+
1053+ border : 1px solid rgba (255 , 255 , 255 , .08 );
1054+
1055+ box-shadow : 0 10px 35px rgba (0 , 0 , 0 , .45 );
1056+
1057+ }
1058+
1059+
1060+
1061+
1062+
9401063/* ── Hero Big Logo & Brand Title ────────────────────────────── */
9411064.hero-logo-header {
9421065 display : flex;
Original file line number Diff line number Diff line change 190190 < div aria-hidden ="true " class ="hero-orb hero-orb-three "> </ div >
191191
192192 < div class ="hero-shell ">
193+ < div class ="hero-category-nav ">
194+
195+ < button class ="hero-nav-btn active " data-category ="all ">
196+ < i class ="fas fa-layer-group "> </ i >
197+ < span > All Projects</ span >
198+ </ button >
199+
200+ < button class ="hero-nav-btn " data-category ="games ">
201+ < i class ="fas fa-gamepad "> </ i >
202+ < span > Games</ span >
203+ </ button >
204+
205+ < button class ="hero-nav-btn " data-category ="math ">
206+ < i class ="fas fa-calculator "> </ i >
207+ < span > Maths</ span >
208+ </ button >
209+
210+ < button class ="hero-nav-btn " data-category ="utilities ">
211+ < i class ="fas fa-wrench "> </ i >
212+ < span > Utilities</ span >
213+ </ button >
214+
215+ < button class ="hero-nav-btn " data-category ="favorites ">
216+ < i class ="far fa-star "> </ i >
217+ < span > Favorites</ span >
218+ </ button >
219+
220+ < button class ="hero-nav-btn " data-category ="playground ">
221+ < i class ="fas fa-code "> </ i >
222+ < span > Playground</ span >
223+ </ button >
224+
225+ </ div >
193226 < div class ="hero-logo-header ">
194227 < div class ="hero-logo-text ">
195228 < span class ="hero-logo-py "> py</ span > < span class ="hero-logo-mini "> .mini</ span > < span
Original file line number Diff line number Diff line change @@ -776,6 +776,57 @@ document.addEventListener("DOMContentLoaded", function () {
776776 }
777777 } ) ;
778778 } ) ;
779+ /* ==========================================================
780+ FIX ISSUE #1703
781+ Wire Hero Category Navigation
782+ ========================================================== */
783+
784+ const heroNavButtons = document . querySelectorAll ( ".hero-nav-btn" ) ;
785+
786+ heroNavButtons . forEach ( function ( button ) {
787+
788+ button . addEventListener ( "click" , function ( ) {
789+
790+ const category = button . dataset . category ;
791+
792+ heroNavButtons . forEach ( function ( btn ) {
793+ btn . classList . remove ( "active" ) ;
794+ } ) ;
795+
796+ button . classList . add ( "active" ) ;
797+
798+ syncSidebarTabs ( category ) ;
799+ syncStickyTabs ( category ) ;
800+
801+ if ( category === "playground" ) {
802+
803+ showPlaygroundSection ( ) ;
804+
805+ if ( playgroundSection ) {
806+ playgroundSection . scrollIntoView ( {
807+ behavior : "smooth" ,
808+ block : "start" ,
809+ } ) ;
810+ }
811+
812+ } else {
813+
814+ showProjectsSection ( ) ;
815+ applyCategoryFilter ( category ) ;
816+
817+ if ( projectsSection ) {
818+ projectsSection . scrollIntoView ( {
819+ behavior : "smooth" ,
820+ block : "start" ,
821+ } ) ;
822+ }
823+
824+ }
825+
826+ } ) ;
827+
828+ } ) ;
829+
779830
780831 /* ── Stats Cards ──────────────────────────────────────────── */
781832 var statsCards = document . querySelectorAll ( ".stats-card" ) ;
You can’t perform that action at this time.
0 commit comments