-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
197 lines (172 loc) · 5.55 KB
/
index.html
File metadata and controls
197 lines (172 loc) · 5.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>WhistleIT</title>
<script src="https://cdn.tailwindcss.com"></script>
<style>
body {
background-color: #0e0e0e;
font-family: 'Poppins', sans-serif;
}
#video-screen video {
object-fit: cover;
}
.fade-out {
animation: fadeOut 1s forwards;
}
@keyframes fadeOut {
to {
opacity: 0;
visibility: hidden;
}
}
/* Glassmorphism */
.glassmorphism {
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(10px);
border-radius: 20px;
border: 2px solid rgba(255, 255, 255, 0.2);
}
/* Code Running Animation - Full Background */
.code-background {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: black;
color: green;
font-family: 'Courier New', monospace;
z-index: 0;
overflow: hidden;
pointer-events: none;
padding: 100px;
}
.code-background span {
display: block;
position: absolute;
width: 100%;
font-size: 20px;
animation: scrolling 1.5s linear infinite;
}
@keyframes scrolling {
from {
top: -100%;
}
to {
top: 100%;
}
}
/* Add slight delay between each line */
.code-background span:nth-child(odd) {
animation-duration: 1.8s;
}
.code-background span:nth-child(even) {
animation-duration: 1.3s;
}
/* Login box movement (shake effect) */
.move-box {
animation: moveBox 2s infinite;
}
@keyframes moveBox {
0% {
transform: translate(0, 0);
}
25% {
transform: translate(5px, 5px);
}
50% {
transform: translate(-5px, -5px);
}
75% {
transform: translate(5px, 5px);
}
100% {
transform: translate(0, 0);
}
}
</style>
</head>
<body class="min-h-screen text-white overflow-hidden">
<!-- 🎥 Splash Video -->
<div id="video-screen" class="fixed inset-0 z-50 bg-black">
<video autoplay muted playsinline class="w-full h-full">
<source src="mask-animation.mp4" type="video/mp4" />
Your browser does not support HTML5 video.
</video>
</div>
<!-- Code Background Animation -->
<div class="code-background">
<span>console.log('Connection Established...');</span>
<span>fetch('https://anon.api');</span>
<span>decryptData(...);</span>
<span>auth.authenticate('user');</span>
<span>secureConnection();</span>
<span>loading... please wait...</span>
<span>Initializing... Encryption...</span>
<span>Welcome, anonymous user.</span>
<span>Done! Connection secured.</span>
</div>
<!-- 🧊 Login Container (hidden initially) -->
<div
id="login-container"
class="hidden flex items-center justify-center min-h-screen bg-gradient-to-br from-[#1a1a1a] via-[#141414] to-[#0c0c0c] p-6"
>
<div class="glassmorphism p-10 w-full max-w-md text-center space-y-6 move-box">
<h1 class="text-4xl font-bold text-white text-gradient">Welcome to WhistleIT</h1>
<p class="text-sm text-gray-300">Connect with your Phantom wallet to continue..</p>
<!-- Buttons -->
<div class="space-y-3">
<button
id="login-btn"
class="w-full bg-gradient-to-r from-purple-600 to-blue-500 hover:bg-gradient-to-r hover:from-purple-700 hover:to-blue-600 transition-all py-3 rounded-lg font-semibold shadow-xl hover:scale-105"
>
Login with Phantom
</button>
<button
id="register-btn"
class="w-full bg-gradient-to-r from-gray-800 to-gray-600 hover:bg-gradient-to-r hover:from-gray-700 hover:to-gray-500 transition-all py-3 rounded-lg font-semibold shadow-xl hover:scale-105"
>
Register with Phantom
</button>
</div>
<p id="wallet-status" class="text-sm text-green-400 hidden mt-4"></p>
</div>
</div>
<!-- 🚀 Phantom + Transition Script -->
<script>
// Fade out splash video after 2 seconds
window.onload = () => {
setTimeout(() => {
const videoScreen = document.getElementById("video-screen");
videoScreen.classList.add("fade-out");
const loginContainer = document.getElementById("login-container");
loginContainer.classList.remove("hidden");
}, 2000); // 2 sec
};
// Phantom login logic
async function connectPhantom(action) {
if (window.solana && window.solana.isPhantom) {
try {
const response = await window.solana.connect();
const pubkey = response.publicKey.toString();
const status = `✅ ${action} successful: ${pubkey}`;
document.getElementById('wallet-status').textContent = status;
document.getElementById('wallet-status').classList.remove('hidden');
// Redirect after short delay
setTimeout(() => {
window.location.href = "Thread.html";
}, 1500); // Delay for user to see success message (optional)
} catch (err) {
alert("Wallet connection cancelled.");
}
} else {
alert("Phantom wallet not found. Install it: https://phantom.app/");
}
}
document.getElementById('login-btn').addEventListener('click', () => connectPhantom("Login"));
document.getElementById('register-btn').addEventListener('click', () => connectPhantom("Register"));
</script>
</body>
</html>