File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -354,4 +354,5 @@ document.addEventListener("click", (e) => {
354354
355355 book . classList . toggle ( "tap-effect" ) ;
356356 if ( overlay ) overlay . classList . toggle ( "tap-overlay" ) ;
357- } ) ;
357+ } ) ;
358+
Original file line number Diff line number Diff line change 3030 < i class ="fa-solid fa-search search-icon "> </ i >
3131 </ div >
3232 < nav class ="nav-links ">
33+ < div class ="tooltip ">
3334 < a href ="index.html " class ="active "> Discovery</ a >
35+ < span class ="tooltip-text "> < i class ="fa-solid fa-wand-magic-sparkles "> </ i > </ span >
36+ </ div >
37+ < div class ="tooltip ">
3438 < a href ="library.html "> My Library</ a >
39+ < span class ="tooltip-text "> < i class ="fa-solid fa-book "> </ i > </ span >
40+ </ div >
41+ < div class ="tooltip ">
3542 < a href ="auth.html "> Sign In</ a >
43+ < span class ="tooltip-text "> < i class ="fa-solid fa-key "> </ i > </ span >
44+ </ div >
3645 </ nav >
3746 < button id ="themeToggle " class ="btn-icon " title ="Toggle Theme ">
3847 < i class ="fa-solid fa-moon "> </ i >
Original file line number Diff line number Diff line change @@ -621,3 +621,50 @@ main {
621621 font-size : 0.7rem ;
622622 }
623623}
624+
625+ /* tooltip */
626+ .tooltip {
627+ position : relative;
628+ display : inline-block;
629+ }
630+
631+ .tooltip-text {
632+ position : absolute;
633+ left : 50% ;
634+ bottom : calc (100% + 8px );
635+ transform : translateX (-50% ) scale (0.95 ) translateY (6px );
636+ padding : 10px 14px ;
637+ background : # fffaf3 ;
638+ color : # 2b2b2b ;
639+ font-size : 13px ;
640+ font-weight : 500 ;
641+ white-space : nowrap;
642+ border-radius : 10px ;
643+ box-shadow : 0 8px 20px rgba (0 , 0 , 0 , 0.15 );
644+ border : 1px solid rgba (0 , 0 , 0 , 0.08 );
645+ opacity : 0 ;
646+ visibility : hidden;
647+ pointer-events : none;
648+ transition : all 0.25s ease;
649+ z-index : 9999 ;
650+ }
651+
652+ .tooltip-text ::after {
653+ content : "" ;
654+ position : absolute;
655+ top : 100% ;
656+ left : 50% ;
657+ transform : translateX (-50% ) rotate (45deg );
658+ width : 12px ;
659+ height : 12px ;
660+ background : # fffaf3 ;
661+ border-left : 1px solid rgba (0 , 0 , 0 , 0.08 );
662+ border-bottom : 1px solid rgba (0 , 0 , 0 , 0.08 );
663+ }
664+
665+ .tooltip : hover .tooltip-text {
666+ opacity : 1 ;
667+ visibility : visible;
668+ transform : translateX (-40% ) scale (1 ) translateY (0 );
669+ }
670+
You can’t perform that action at this time.
0 commit comments