77 < script src ="https://cdn.tailwindcss.com "> </ script >
88 < link rel ="stylesheet " href ="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css ">
99 < style >
10- /* Confetti, float, glow, toast, panel styles remain same */
10+ /* Confetti, float, glow, notification panel styles */
1111 @keyframes confetti {0% { transform : translateY (-100vh ) rotate (0deg ); opacity : 1 ; }100% { transform : translateY (100vh ) rotate (720deg ); opacity : 0 ; }}
1212 .confetti-piece {position : absolute; width : 10px ; height : 10px ; background : var (--color ); animation : confetti 6s linear infinite;}
1313 @keyframes float {0% , 100% { transform : translateY (0 ); } 50% { transform : translateY (-10px ); } }
1414 .float { animation : float 3s ease-in-out infinite; }
1515 @keyframes glow {0% , 100% { box-shadow : 0 0 10px rgba (56 , 189 , 248 , 0.6 ); } 50% { box-shadow : 0 0 40px rgba (56 , 189 , 248 , 1 ); } }
1616 .glow { animation : glow 1.5s ease-in-out 5 ; }
17- . toast { position : fixed; bottom : 20 px ; right : 20 px ; background : # 38bdf8 ; color : white; padding : 12 px 20 px ; border-radius : 8 px ; font-weight : 600 ; box-shadow : 0 4 px 10 px rgba ( 0 , 0 , 0 , 0.2 ); opacity : 0 ; transform : translateY ( 20 px ); transition : all 0.5 s ease; z-index : 100 ;}
18- . toast . show { opacity : 1 ; transform : translateY ( 0 );}
17+
18+ /* Notification Panel */
1919 .notification-panel {position : fixed; top : -100% ; left : 0 ; right : 0 ; height : 40% ; background : white; box-shadow : 0 4px 10px rgba (0 , 0 , 0 , 0.2 ); border-bottom-left-radius : 1rem ; border-bottom-right-radius : 1rem ; transition : top 0.5s ease; overflow-y : auto; z-index : 50 ;}
2020 .notification-panel .active {top : 0 ;}
21+
22+ /* Centered persistent email notification */
23+ # emailNotification {
24+ position : fixed;
25+ top : 50% ;
26+ left : 50% ;
27+ transform : translate (-50% , -50% );
28+ background : # 22c55e ; /* Tailwind green-500 */
29+ color : white;
30+ padding : 20px 30px ;
31+ border-radius : 12px ;
32+ font-size : 18px ;
33+ font-weight : 600 ;
34+ box-shadow : 0 8px 20px rgba (0 , 0 , 0 , 0.3 );
35+ display : flex;
36+ align-items : center;
37+ gap : 10px ;
38+ z-index : 200 ;
39+ }
40+ # emailNotification i {
41+ font-size : 24px ;
42+ }
2143 </ style >
2244</ head >
2345< body class ="h-screen bg-gradient-to-br from-sky-200 via-sky-100 to-gray-100 flex items-center justify-center overflow-hidden relative ">
@@ -65,7 +87,11 @@ <h2 class="text-xl font-bold text-sky-600 mb-4">User Information</h2>
6587 </ div >
6688 </ div >
6789
68- < div id ="toast " class ="toast "> 🎉 Notifications celebrated!</ div >
90+ <!-- Centered Persistent Email Notification -->
91+ < div id ="emailNotification ">
92+ < i class ="fas fa-check-circle "> </ i >
93+ 🎉 Email sent to your inbox! Kindly check your spam folder if not found in inbox.
94+ </ div >
6995
7096 < script >
7197 const confettiContainer = document . getElementById ( 'confetti-container' ) ;
@@ -88,9 +114,6 @@ <h2 class="text-xl font-bold text-sky-600 mb-4">User Information</h2>
88114 const card = document . getElementById ( 'dashboardCard' ) ;
89115 card . classList . add ( 'glow' ) ;
90116 setTimeout ( ( ) => card . classList . remove ( 'glow' ) , 4000 ) ;
91- const toast = document . getElementById ( 'toast' ) ;
92- toast . classList . add ( 'show' ) ;
93- setTimeout ( ( ) => toast . classList . remove ( 'show' ) , 3000 ) ;
94117 }
95118
96119 const panel = document . getElementById ( 'notificationPanel' ) ;
@@ -101,6 +124,11 @@ <h2 class="text-xl font-bold text-sky-600 mb-4">User Information</h2>
101124 document . getElementById ( 'closeNotifications' ) . addEventListener ( 'click' , ( ) => {
102125 panel . classList . remove ( 'active' ) ;
103126 } ) ;
127+
128+ // Show confetti on page load
129+ window . addEventListener ( 'load' , ( ) => {
130+ bombardment ( ) ;
131+ } ) ;
104132 </ script >
105133
106134</ body >
0 commit comments