5555 header {
5656 padding : 40px 0 0 ;
5757 display : flex;
58- justify-content : flex-end ;
58+ justify-content : space-between ;
5959 align-items : center;
6060 }
6161
62+ .theme-toggle {
63+ font-size : 1.5rem ;
64+ background : none;
65+ border : none;
66+ color : var (--fg1 );
67+ cursor : pointer;
68+ padding : 0.5rem ;
69+ transition : color 0.3s ease;
70+ }
71+
72+ .theme-toggle : hover {
73+ color : var (--fg );
74+ }
75+
6276 nav {
6377 font-family : var (--font-serif );
6478 display : flex;
451465< body >
452466 < div class ="container ">
453467 < header >
468+ < button class ="theme-toggle " id ="theme-toggle " aria-label ="Toggle theme ">
469+ < i class ="fa-solid fa-moon "> </ i >
470+ </ button >
454471 < nav >
455472 < a href ="blog.html "> Blog</ a >
456473 < a href ="#join-us "> About</ a >
@@ -503,7 +520,7 @@ <h3><i class="fa-brands fa-github"></i> GitHub</h3>
503520 </a>
504521 </div> -->
505522 < div class ="community-card ">
506- < a href ="https://join.slack.com/t/system -intelligence/shared_invite/zt-3hpkgr2aa-NnuPxUbyHr45S89DFi_N1A " target ="_blank " rel ="noopener ">
523+ < a href ="https://join.slack.com/t/sys -intelligence/shared_invite/zt-3hpkgr2aa-NnuPxUbyHr45S89DFi_N1A " target ="_blank " rel ="noopener ">
507524 < h3 > < i class ="fa-brands fa-slack "> </ i > Slack</ h3 >
508525 < p > Join our community discussions and collaborations</ p >
509526 </ a >
@@ -523,12 +540,129 @@ <h3><i class="fa-brands fa-x-twitter"></i> X</h3>
523540 < div > System Intelligence Community © 2025</ div >
524541 < div class ="footer-links ">
525542 < a href ="mailto:systemintelligence0@gmail.com " aria-label ="Email "> < i class ="fa-solid fa-envelope "> </ i > </ a >
526- < a href ="https://github.com/systemintelligence " target ="_blank " rel ="noopener " aria-label ="GitHub "> < i class ="fa-brands fa-github "> </ i > </ a >
527- < a href ="https://join.slack.com/t/system -intelligence/shared_invite/zt-3hpkgr2aa-NnuPxUbyHr45S89DFi_N1A " target ="_blank " rel ="noopener " aria-label ="Slack "> < i class ="fa-brands fa-slack "> </ i > </ a >
543+ < a href ="https://github.com/sys-intelligence " target ="_blank " rel ="noopener " aria-label ="GitHub "> < i class ="fa-brands fa-github "> </ i > </ a >
544+ < a href ="https://join.slack.com/t/sys -intelligence/shared_invite/zt-3hpkgr2aa-NnuPxUbyHr45S89DFi_N1A " target ="_blank " rel ="noopener " aria-label ="Slack "> < i class ="fa-brands fa-slack "> </ i > </ a >
528545 < a href ="https://x.com/SysIntelligenc " target ="_blank " rel ="noopener " aria-label ="X "> < i class ="fa-brands fa-x-twitter "> </ i > </ a >
529546 </ div >
530547 </ div >
531548 </ footer >
532549 </ div >
550+ < script >
551+ const themeToggle = document . getElementById ( 'theme-toggle' ) ;
552+ const root = document . documentElement ;
553+ const icon = themeToggle . querySelector ( 'i' ) ;
554+
555+ // Check for saved theme preference or default to dark
556+ const currentTheme = localStorage . getItem ( 'theme' ) || 'dark' ;
557+ if ( currentTheme === 'light' ) {
558+ setLightMode ( ) ;
559+ }
560+
561+ themeToggle . addEventListener ( 'click' , ( ) => {
562+ if ( root . style . getPropertyValue ( '--bg' ) === '#1a1a1a' || ! root . style . getPropertyValue ( '--bg' ) ) {
563+ setLightMode ( ) ;
564+ localStorage . setItem ( 'theme' , 'light' ) ;
565+ } else {
566+ setDarkMode ( ) ;
567+ localStorage . setItem ( 'theme' , 'dark' ) ;
568+ }
569+ } ) ;
570+
571+ function setLightMode ( ) {
572+ root . style . setProperty ( '--bg' , '#ffffff' ) ;
573+ root . style . setProperty ( '--fg' , '#282828' ) ;
574+ root . style . setProperty ( '--fg1' , '#3c3836' ) ;
575+ root . style . setProperty ( '--fg2' , '#504945' ) ;
576+ root . style . setProperty ( '--fg3' , '#6b6866' ) ;
577+ root . style . setProperty ( '--fg4' , '#676767' ) ;
578+ root . style . setProperty ( '--hover-bg' , 'rgba(128, 128, 128, 0.12)' ) ;
579+
580+ // Update specific elements
581+ document . querySelector ( '.hero-title' ) . style . background = '#ffffff' ;
582+ document . querySelector ( '.hero-title' ) . style . color = '#282828' ;
583+ document . querySelector ( '.hero-title' ) . style . borderColor = '#ffffff' ;
584+
585+ document . querySelectorAll ( '.community-card' ) . forEach ( card => {
586+ card . style . background = 'linear-gradient(135deg, #ffffff 0%, #fafafa 100%)' ;
587+ card . style . borderColor = '#e8e8e8' ;
588+ } ) ;
589+
590+ document . querySelectorAll ( '.community-card h3' ) . forEach ( h3 => {
591+ h3 . style . color = '#282828' ;
592+ } ) ;
593+
594+ document . querySelectorAll ( '.community-card h3 i' ) . forEach ( i => {
595+ i . style . color = '#3c3836' ;
596+ } ) ;
597+
598+ document . querySelectorAll ( '.community-card p' ) . forEach ( p => {
599+ p . style . color = '#6b6866' ;
600+ } ) ;
601+
602+ document . querySelector ( 'footer' ) . style . borderTopColor = '#e5e5e5' ;
603+
604+ document . querySelectorAll ( '.footer-links a' ) . forEach ( link => {
605+ link . style . color = '#676767' ;
606+ } ) ;
607+
608+ document . querySelectorAll ( '.blog-post h3 a' ) . forEach ( link => {
609+ link . style . color = '#282828' ;
610+ } ) ;
611+
612+ document . querySelectorAll ( '.blog-meta' ) . forEach ( meta => {
613+ meta . style . color = '#737373' ;
614+ } ) ;
615+
616+ icon . className = 'fa-solid fa-sun' ;
617+ }
618+
619+ function setDarkMode ( ) {
620+ root . style . setProperty ( '--bg' , '#1a1a1a' ) ;
621+ root . style . setProperty ( '--fg' , '#e8e8e8' ) ;
622+ root . style . setProperty ( '--fg1' , '#d4d4d4' ) ;
623+ root . style . setProperty ( '--fg2' , '#b8b8b8' ) ;
624+ root . style . setProperty ( '--fg3' , '#9b9b9b' ) ;
625+ root . style . setProperty ( '--fg4' , '#888888' ) ;
626+ root . style . setProperty ( '--hover-bg' , 'rgba(255, 255, 255, 0.08)' ) ;
627+
628+ // Update specific elements
629+ document . querySelector ( '.hero-title' ) . style . background = '#1a1a1a' ;
630+ document . querySelector ( '.hero-title' ) . style . color = '#e8e8e8' ;
631+ document . querySelector ( '.hero-title' ) . style . borderColor = '#1a1a1a' ;
632+
633+ document . querySelectorAll ( '.community-card' ) . forEach ( card => {
634+ card . style . background = 'linear-gradient(135deg, #232323 0%, #1e1e1e 100%)' ;
635+ card . style . borderColor = '#333333' ;
636+ } ) ;
637+
638+ document . querySelectorAll ( '.community-card h3' ) . forEach ( h3 => {
639+ h3 . style . color = '#e8e8e8' ;
640+ } ) ;
641+
642+ document . querySelectorAll ( '.community-card h3 i' ) . forEach ( i => {
643+ i . style . color = '#d4d4d4' ;
644+ } ) ;
645+
646+ document . querySelectorAll ( '.community-card p' ) . forEach ( p => {
647+ p . style . color = '#9b9b9b' ;
648+ } ) ;
649+
650+ document . querySelector ( 'footer' ) . style . borderTopColor = '#333333' ;
651+
652+ document . querySelectorAll ( '.footer-links a' ) . forEach ( link => {
653+ link . style . color = '#888888' ;
654+ } ) ;
655+
656+ document . querySelectorAll ( '.blog-post h3 a' ) . forEach ( link => {
657+ link . style . color = '#e8e8e8' ;
658+ } ) ;
659+
660+ document . querySelectorAll ( '.blog-meta' ) . forEach ( meta => {
661+ meta . style . color = '#9b9b9b' ;
662+ } ) ;
663+
664+ icon . className = 'fa-solid fa-moon' ;
665+ }
666+ </ script >
533667</ body >
534668</ html >
0 commit comments