File tree Expand file tree Collapse file tree 4 files changed +43
-2
lines changed
Expand file tree Collapse file tree 4 files changed +43
-2
lines changed Original file line number Diff line number Diff line change 1010 <!-- Custom Styles -->
1111 < link href ="./static/css/styles.css " rel ="stylesheet " />
1212 </ head >
13+
1314 < body >
1415 < section id ="intro ">
1516 < div id ="intro-info ">
@@ -56,6 +57,16 @@ <h2 class="bio">
5657 >
5758 < i class ="link-icon fa-lg fa-solid fa-envelope "> </ i >
5859 </ a >
60+ < a
61+ aria-label ="Exclusive Content "
62+ class ="link tippyme bounce2 "
63+ target ="_blank "
64+ href ="./static/content/exclusive.jpeg "
65+ tooltip-text ="Exclusive Content 👀 "
66+ tooltip-type ="exclusive "
67+ >
68+ < i class ="link-icon fa-lg fa-solid fa-lock "> </ i >
69+ </ a >
5970 </ div >
6071 </ div >
6172 </ section >
Original file line number Diff line number Diff line change @@ -84,3 +84,23 @@ body {
8484 color : # eee ;
8585 transition : 0.2s ;
8686}
87+
88+ .bounce2 {
89+ animation : bounce2 2s ease infinite;
90+ }
91+
92+ @keyframes bounce2 {
93+ 0% ,
94+ 20% ,
95+ 50% ,
96+ 80% ,
97+ 100% {
98+ transform : translateY (0 );
99+ }
100+ 40% {
101+ transform : translateY (-30px );
102+ }
103+ 60% {
104+ transform : translateY (-15px );
105+ }
106+ }
Original file line number Diff line number Diff line change 1- import tippy from 'tippy.js' ;
1+ import tippy , { Props } from 'tippy.js' ;
2+
3+ const tooltipProfiles : Record < string , Partial < Props > > = {
4+ default : { } ,
5+ exclusive : {
6+ showOnCreate : true ,
7+ placement : 'bottom' ,
8+ } ,
9+ } ;
210
311const init = ( ) => {
412 const elementsThatNeedTooltip = document . querySelectorAll ( '.tippyme' ) ;
513
614 elementsThatNeedTooltip . forEach ( ( element ) => {
715 const content = element . getAttribute ( 'tooltip-text' ) ?? 'I forgot ¯_(ツ)_/¯' ;
8- tippy ( element , { content } ) ;
16+ const type = element . getAttribute ( 'tooltip-type' ) ?? 'default' ;
17+
18+ tippy ( element , { content, ...tooltipProfiles [ type ] } ) ;
919
1020 element . toggleAttribute ( 'tooltip-text' ) ;
1121 element . classList . toggle ( 'tippyme' ) ;
You can’t perform that action at this time.
0 commit comments