-
Notifications
You must be signed in to change notification settings - Fork 1
/
header.html
512 lines (448 loc) · 15.8 KB
/
header.html
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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Header with Product Dropdown</title>
<style>
/* Existing styles */
body {
margin: 0;
font-family: Arial, sans-serif;
background-color: #f4f4f4;
box-sizing: border-box;
}
.header-wrapper {
background-color: #0a0a0a;
color: white;
width: 100%;
padding: 15px 20px;
box-sizing: border-box;
display: flex;
justify-content: space-between;
align-items: center;
}
.header-buttons-container {
display: flex;
align-items: center;
position: relative; /* Added for dropdown positioning */
}
.right-buttons-container {
display: flex;
align-items: center;
gap: 10px;
}
/* Mini page styles */
.mini-page {
position: absolute;
top: 100%;
right: 0;
background-color: #1a1a1a;
border-radius: 12px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
min-width: 300px;
margin-top: 10px;
z-index: 1000;
padding: 16px;
display: none;
}
.wallet-mini-page {
right: 0;
}
.network-mini-page {
right: 80px; /* Adjust based on your layout */
}
.mini-page-content {
display: flex;
flex-direction: column;
gap: 12px;
}
/* Network button styles */
.network-button {
display: flex;
align-items: center;
padding: 12px;
background-color: #2a2a2a;
border: none;
border-radius: 8px;
color: white;
cursor: pointer;
width: 100%;
transition: all 0.2s ease;
}
.network-button:hover {
background-color: #333333;
}
.network-button img {
width: 24px;
height: 24px;
margin-right: 12px;
}
/* Wallet mini page styles */
.wallet-balance {
background-color: #2a2a2a;
border-radius: 8px;
padding: 16px;
margin-bottom: 16px;
}
.balance-item {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 8px;
}
.balance-item:last-child {
margin-bottom: 0;
}
.balance-item img {
width: 20px;
height: 20px;
}
.wallet-action-button {
display: flex;
align-items: center;
padding: 12px;
background-color: #2a2a2a;
border: none;
border-radius: 8px;
color: white;
cursor: pointer;
width: 100%;
transition: all 0.2s ease;
margin-bottom: 8px;
font-size: 16px;
}
.wallet-action-button:hover {
background-color: #333333;
}
.wallet-action-button svg {
margin-right: 8px;
}
.disconnect-button {
background-color: #ff4d4d;
}
.disconnect-button:hover {
background-color: #ff3333;
}
.mini-page-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16px;
}
.mini-page-title {
font-size: 18px;
font-weight: 500;
margin: 0;
}
.close-button {
background: none;
border: none;
color: white;
cursor: pointer;
padding: 4px;
}
.close-button:hover {
opacity: 0.8;
}
/* Copy address modal */
.copy-modal {
position: fixed;
bottom: 20px;
right: 20px;
background-color: #333;
color: white;
padding: 12px 24px;
border-radius: 8px;
display: none;
animation: fadeInOut 2s ease;
}
@keyframes fadeInOut {
0% { opacity: 0; transform: translateY(20px); }
20% { opacity: 1; transform: translateY(0); }
80% { opacity: 1; transform: translateY(0); }
100% { opacity: 0; transform: translateY(20px); }
}
/* Header buttons */
.home-button, .product-button {
display: flex;
align-items: center;
font-size: 18px;
color: white;
text-decoration: none;
padding: 12px 20px;
background-color: transparent;
border-radius: 5px;
transition: all 0.3s ease;
margin-right: 20px;
}
.network-button, .connect-button {
display: flex;
align-items: center;
font-size: 18px;
color: white;
text-decoration: none;
padding: 12px 20px;
background-color: transparent;
border-radius: 5px;
transition: all 0.3s ease;
cursor: pointer;
}
.right-buttons-container {
display: flex;
align-items: center;
gap: 10px;
position: relative;
}
.home-button, .product-button {
display: flex;
align-items: center;
font-size: 18px;
color: white;
text-decoration: none;
padding: 12px 20px;
background-color: transparent;
border-radius: 5px;
transition: all 0.3s ease;
margin-right: 20px;
cursor: pointer; /* Added for better UX */
}
.network-button, .connect-button {
display: flex;
align-items: center;
font-size: 18px;
color: white;
text-decoration: none;
padding: 12px 20px;
background-color: transparent;
border-radius: 5px;
transition: all 0.3s ease;
}
/* New dropdown styles */
.dropdown {
position: relative;
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
top: 100%;
left: 0;
background-color: #1a1a1a;
min-width: 200px;
box-shadow: 0 8px 16px rgba(0,0,0,0.2);
border-radius: 8px;
margin-top: 5px;
z-index: 1000;
}
.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content {
display: block;
}
.dropdown-content a {
color: white;
padding: 12px 16px;
text-decoration: none;
display: block;
transition: all 0.2s ease;
font-size: 16px;
}
.dropdown-content a:hover {
background-color: rgba(176, 176, 176, 0.1);
}
.dropdown-content a:first-child {
border-radius: 8px 8px 0 0;
}
.dropdown-content a:last-child {
border-radius: 0 0 8px 8px;
}
/* Existing hover styles */
.home-button.selected {
color: #1db954;
}
.home-button:hover, .product-button:hover, .network-button:hover, .connect-button:hover {
background-color: rgba(176, 176, 176, 0.2);
color: #b0b0b0;
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
}
/* Icon styles */
.home-button svg, .product-button svg, .network-button svg {
width: 24px;
height: 24px;
margin-right: 8px;
}
.wallet-icon {
fill: white;
width: 24px;
height: 24px;
margin-left: 8px;
}
.chevron-icon {
margin-left: 8px;
width: 16px;
height: 16px;
}
@media (max-width: 768px) {
.home-button, .product-button, .network-button, .connect-button {
font-size: 16px;
padding: 10px;
}
.header-buttons-container a:last-child {
margin-right: 0;
}
}
</style>
</head>
<body>
<div class="header-wrapper">
<div class="header-buttons-container">
<a href="#" class="home-button selected">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-house size-4">
<path d="M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"></path>
<path d="M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path>
</svg>
Home
</a>
<div class="dropdown">
<a href="#" class="product-button">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-list-collapse size-4">
<path d="m3 10 l2.5-2.5L3 5"></path>
<path d="m3 19 l2.5-2.5L3 14"></path>
<path d="M10 6h11"></path>
<path d="M10 12h11"></path>
<path d="M10 18h11"></path>
</svg>
Product
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down relative top-px ml-1 size-3 transition duration-200 group-data-[state=open]:rotate-180" aria-hidden="true">
<path d="m6 9 l6 6 l6-6"></path>
</svg>
</a>
<div class="dropdown-content">
<a href="index.html">Launchpad</a>
<a href="predictionmarket.html">Prediction Market</a>
<a href="disperse.html">MultiSender</a>
</div>
</div>
</div>
<div class="right-buttons-container">
<button class="network-button" id="networkBtn">
Network
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="chevron-icon">
<path d="m6 9 l6 6 l6-6"></path>
</svg>
</button>
<button class="connect-button" id="connectWalletBtn">
Connect
<svg class="wallet-icon" version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 969.486 969.486">
<g>
<path d="M806.582,235.309L766.137,87.125l-137.434,37.51L571.451,9.072L114.798,235.309H0v725.105h907.137V764.973h62.35v-337.53 h-62.352V235.309H806.582z M718.441,170.63l17.654,64.68h-52.561h-75.887h-126.19l111.159-30.339l66.848-18.245L718.441,170.63z M839.135,892.414H68V522.062v-129.13v-10.233v-69.787v-9.602h35.181h27.538h101.592h409.025h75.889h37.43h35.242h35.244h13.994 v51.272v72.86h-15.357h-35.244h-87.85H547.508h-55.217v27.356v75.888v8.758v35.244v35.244v155.039h346.846v127.441H839.135z M901.486,696.973h-28.352h-34H560.291V591.375v-35.244v-35.244v-23.889v-1.555h3.139h90.086h129.129h56.492h34h4.445h23.904 V696.973z M540.707,100.191l21.15,42.688l-238.955,65.218L540.707,100.191z"/>
<polygon points="614.146,564.57 614.146,576.676 614.146,631.152 680.73,631.152 680.73,564.57 658.498,564.57"/>
</g>
</svg>
</button>
<!-- Network Mini Page -->
<div class="mini-page network-mini-page" id="networkMiniPage">
<div class="mini-page-header">
<h3 class="mini-page-title">Select Network</h3>
<button class="close-button" id="closeNetworkMini">
<svg width="20" height="20" viewBox="0 0 20 20">
<path d="M15 5L5 15M5 5L15 15" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
</svg>
</button>
</div>
<div class="mini-page-content">
<button class="network-button">
<img src="https://soneium-minato.blockscout.com/assets/configs/network_logo_dark.svg" alt="Minato Logo" />
Minato
</button>
<button class="network-button">
<img src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='28' fill='none'><path fill='%2325292E' fill-rule='evenodd' d='M14 28a14 14 0 1 0 0-28 14 14 0 0 0 0 28Z' clip-rule='evenodd'/><path fill='url(%23a)' fill-opacity='.3' fill-rule='evenodd' d='M14 28a14 14 0 1 0 0-28 14 14 0 0 0 0 28Z' clip-rule='evenodd'/><path fill='url(%23b)' d='M8.19 14.77 L14 18.21l5.8-3.44-5.8 8.19-5.81-8.19Z'/><path fill='%23fff' d='m14 16.93-5.81-3.44L14 4.34l5.81 9.15L14 16.93Z'/><defs><linearGradient id='a' x1='0' x2='14' y1='0' y2='28' gradientUnits='userSpaceOnUse'><stop stop-color='%23fff'/><stop offset='1' stop-color='%23fff' stop-opacity='0'/></linearGradient><linearGradient id='b' x1='14' x2='14' y1='14.77' y2='22.96' gradientUnits='userSpaceOnUse'><stop stop-color='%23fff'/><stop offset='1' stop-color='%23fff' stop-opacity='.9'/></linearGradient></defs></svg>" alt="Sepolia Logo" />
Sepolia
</button>
</div>
</div>
<!-- Wallet Mini Page -->
<div class="mini-page wallet-mini-page" id="walletMiniPage">
<div class="mini-page-header">
<h3 class="mini-page-title">Wallet</h3>
<button class="close-button" id="closeWalletMini">
<svg width="20" height="20" viewBox="0 0 20 20">
<path d="M15 5L5 15M5 5L15 15" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
</svg>
</button>
</div>
<div class="mini-page-content">
<div class="wallet-balance">
<p class="mini-page-title" style="margin-bottom: 12px;">Your Balance</p>
<div class="balance-item">
<img src="https://token-icons.s3.amazonaws.com/eth.png" alt="ETH Logo" />
<span id="balanceAmount">0.00</span>
</div>
<div class="balance-item">
<img src="https://tether.to/images/logoMarkGreen.svg" alt="USDT Logo" />
<span id="tokenBalanceAmount">0.00</span>
</div>
</div>
<button class="wallet-action-button" onclick="copyAddress()">
<svg width="20" height="20" viewBox="0 0 20 20">
<path d="M3.04236 12.3027H4.18396V13.3008C4.18396 14.8525 5.03845 15.7002 6.59705 15.7002H13.6244C15.183 15.7002 16.0375 14.8525 16.0375 13.3008V6.24609C16.0375 4.69434 15.183 3.84668 13.6244 3.84668H12.4828V2.8418C12.4828 1.29688 11.6283 0.442383 10.0697 0.442383H3.04236C1.48376 0.442383 0.629272 1.29004 0.629272 2.8418V9.90332C0.629272 11.4551 1.48376 12.3027 3.04236 12.3027Z" fill="currentColor"/>
</svg>
Copy Address
</button>
<button class="wallet-action-button" onclick="viewInExplorer()">
View in Explorer ↗
</button>
<button class="wallet-action-button disconnect-button" onclick="disconnectWallet()">
Disconnect Wallet
</button>
</div>
</div>
<!-- Copy address modal -->
<div class="copy-modal" id="copyAddressModal">
Wallet address copied to clipboard!
</div>
</div>
</div>
<script>
// Network mini page
const networkBtn = document.getElementById('networkBtn');
const networkMiniPage = document.getElementById('networkMiniPage');
const closeNetworkMini = document.getElementById('closeNetworkMini');
networkBtn.addEventListener('click', () => {
networkMiniPage.style.display = networkMiniPage.style.display === 'none' ? 'block' : 'none';
walletMiniPage.style.display = 'none'; // Close wallet mini page if open
});
closeNetworkMini.addEventListener('click', () => {
networkMiniPage.style.display = 'none';
});
// Wallet mini page
const connectWalletBtn = document.getElementById('connectWalletBtn');
const walletMiniPage = document.getElementById('walletMiniPage');
const closeWalletMini = document.getElementById('closeWalletMini');
connectWalletBtn.addEventListener('click', () => {
walletMiniPage.style.display = walletMiniPage.style.display === 'none' ? 'block' : 'none';
networkMiniPage.style.display = 'none'; // Close network mini page if open
});
closeWalletMini.addEventListener('click', () => {
walletMiniPage.style.display = 'none';
});
// Copy address function
function copyAddress() {
const modal = document.getElementById('copyAddressModal');
modal.style.display = 'block';
setTimeout(() => {
modal.style.display = 'none';
}, 2000);
}
// Close mini pages when clicking outside
document.addEventListener('click', (e) => {
if (!e.target.closest('.network-button') && !e.target.closest('.network-mini-page')) {
networkMiniPage.style.display = 'none';
}
if (!e.target.closest('.connect-button') && !e.target.closest('.wallet-mini-page')) {
walletMiniPage.style.display = 'none';
}
});
</script>
</body>
</html>