-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpayment.html
More file actions
1059 lines (1024 loc) · 41.4 KB
/
payment.html
File metadata and controls
1059 lines (1024 loc) · 41.4 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
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
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta content="width=device-width, initial-scale=1.0, maximum-scale=5.0, viewport-fit=cover" name="viewport"/>
<title>Payment - TruthWeb</title>
<!-- TailwindCSS CDN -->
<script src="https://cdn.tailwindcss.com"></script>
<!-- Font Awesome CDN (v6.5.1) -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" rel="stylesheet"/>
<!-- Google Fonts: Poppins -->
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap" rel="stylesheet"/>
<!-- Fillout Embed Script -->
<script src="https://server.fillout.com/embed/v1/"></script>
<style>
:root {
--primary-color: #000000;
--secondary-color: #FFFFFF;
--highlight-color: #CCCCCC;
--text-color: #FFFFFF;
--button-bg-color: #000000;
--button-text-color: #FFFFFF;
--button-hover-bg-color: #FFFFFF;
--button-hover-text-color: #000000;
--background-color: #FFFFFF;
--success-color: #28a745;
--warning-color: #ffc107;
--escrow-color: #007bff;
}
html { scroll-behavior: smooth; }
body {
background: var(--background-color);
color: var(--primary-color);
font-family: 'Poppins', sans-serif;
margin: 0;
padding: 0;
overflow-x: hidden;
line-height: 1.6;
padding-bottom: 60px; /* Space for footer menu */
}
/* Header (X-Style with Hide/Show) */
.sticky-header {
position: fixed;
top: 0;
width: 100%;
z-index: 1000;
background: var(--primary-color);
color: var(--text-color);
transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 1rem;
height: 64px;
animation: slideInHeader 0.5s ease-out forwards;
}
.sticky-header.hidden {
transform: translateY(-100%);
}
.sticky-header.scrolled {
background: var(--secondary-color);
color: var(--primary-color);
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
transform: scale(0.98);
}
@keyframes slideInHeader {
from { transform: translateY(-100%); opacity: 0; }
to { transform: translateY(0); opacity: 1; }
}
.sticky-header .logo-text {
font-size: 1.5rem;
font-weight: 700;
transition: font-size 0.3s ease;
}
.sticky-header.scrolled .logo-text { font-size: 1.25rem; }
.burger-btn {
cursor: pointer;
flex-direction: column;
justify-content: center;
width: 30px;
height: 30px;
margin-left: 0.5rem;
transition: transform 0.3s ease;
}
.burger-btn:hover { transform: scale(1.1); }
.burger-btn span {
width: 100%;
height: 3px;
background: var(--text-color);
margin: 2px 0;
transition: all 0.3s ease;
transform-origin: center;
}
.burger-btn.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.burger-btn.open span:nth-child(2) { opacity: 0; transform: scale(0); }
.burger-btn.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
.mobile-menu {
position: fixed;
top: 64px;
left: -100%;
width: 80%;
max-width: 300px;
height: calc(100vh - 64px);
background: var(--primary-color);
color: var(--text-color);
transition: left 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
z-index: 999;
padding: 1rem;
animation: fadeInMenu 0.4s ease-out forwards;
}
.mobile-menu.open { left: 0; }
@keyframes fadeInMenu {
from { opacity: 0; }
to { opacity: 1; }
}
.mobile-menu ul { list-style: none; padding: 0; }
.mobile-menu .nav-item a {
display: block;
padding: 0.75rem;
color: var(--text-color);
font-size: 1.1rem;
transition: all 0.3s ease;
}
.mobile-menu .nav-item a:hover {
color: var(--highlight-color);
transform: translateX(10px) scale(1.05);
}
.desktop-nav { display: flex; }
.desktop-nav .nav-item a {
color: var(--text-color);
padding: 0.5rem 1rem;
transition: all 0.3s ease;
}
.desktop-nav .nav-item a:hover {
color: var(--highlight-color);
transform: scale(1.1);
}
.desktop-nav .nav-item a.active {
font-weight: 700;
border-bottom: 2px solid var(--highlight-color);
}
.search-container {
position: relative;
flex-grow: 1;
max-width: 400px;
margin: 0 1rem;
transition: all 0.3s ease;
}
.search-input {
width: 100%;
padding: 0.5rem 2.5rem 0.5rem 1rem;
border: 1px solid var(--highlight-color);
border-radius: 9999px;
background: var(--secondary-color);
color: var(--primary-color);
font-size: 1rem;
outline: none;
transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.search-input:focus {
border-color: var(--primary-color);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
transform: scale(1.02) translateY(-2px);
}
.search-icon {
position: absolute;
right: 10px;
top: 50%;
transform: translateY(-50%);
color: var(--primary-color);
font-size: 1.2rem;
transition: transform 0.3s ease;
}
.search-input:focus + .search-icon { transform: translateY(-50%) scale(1.1); }
.search-results {
position: absolute;
top: 100%;
left: 0;
width: 100%;
max-height: 300px;
overflow-y: auto;
background: var(--secondary-color);
border: 1px solid var(--highlight-color);
border-radius: 10px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
z-index: 60;
display: none;
animation: dropIn 0.3s ease-out forwards;
}
.search-results.active { display: block; }
@keyframes dropIn {
from { opacity: 0; transform: translateY(-10px); }
to { opacity: 1; transform: translateY(0); }
}
.search-result-item {
padding: 0.75rem;
color: var(--primary-color);
border-bottom: 1px solid var(--highlight-color);
cursor: pointer;
transition: background 0.3s ease, transform 0.2s ease;
}
.search-result-item:hover {
background: var(--highlight-color);
transform: scale(1.02);
}
.icon {
color: var(--text-color);
font-size: 1.25rem;
transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
margin-left: 0.75rem;
}
.icon:hover {
transform: scale(1.15) rotate(5deg);
}
.cart-btn::after {
content: attr(data-count);
position: absolute;
top: -5px;
right: -5px;
background: red;
color: white;
border-radius: 50%;
padding: 2px 6px;
font-size: 12px;
}
main { margin-top: 64px; }
.hero {
min-height: 60vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background: var(--primary-color);
color: var(--text-color);
text-align: center;
padding: 1rem;
position: relative;
overflow: hidden;
animation: fadeInHero 1s ease-out forwards;
border: 2px solid var(--highlight-color);
}
@keyframes fadeInHero {
from { opacity: 0; transform: scale(0.95); }
to { opacity: 1; transform: scale(1); }
}
.hero::after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent);
animation: pulseGlow 3s infinite alternate;
}
@keyframes pulseGlow {
0% { opacity: 0.5; }
100% { opacity: 0.8; }
}
.glow-text {
font-size: 3rem;
font-weight: 700;
text-shadow: 0 0 10px var(--highlight-color);
animation: glow 2s infinite alternate;
}
@keyframes glow {
0% { text-shadow: 0 0 10px var(--highlight-color); }
100% { text-shadow: 0 0 20px var(--highlight-color); }
}
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
background: var(--button-bg-color);
color: var(--button-text-color);
padding: 0.5rem 1.5rem;
border: 1px solid var(--highlight-color);
border-radius: 9999px;
font-size: 0.9rem;
font-weight: 600;
text-decoration: none;
text-transform: uppercase;
letter-spacing: 0.05em;
transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
position: relative;
z-index: 1;
min-width: 100px;
margin-top: 1rem;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
.btn:hover {
background: var(--button-hover-bg-color);
color: var(--button-hover-text-color);
transform: scale(1.05) translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.btn:active {
transform: scale(0.98);
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}
.btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.escrow-btn {
background: var(--escrow-color);
color: var(--secondary-color);
}
.escrow-btn:hover {
background: #0056b3;
color: var(--secondary-color);
}
section { padding: 2rem 1rem; }
/* Footer Menu (Fixed, Mobile-Only) */
.footer-menu {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 60px;
background: var(--primary-color);
color: var(--text-color);
display: flex;
justify-content: space-around;
align-items: center;
z-index: 1000;
box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
transition: transform 0.3s ease;
animation: slideInFooter 0.5s ease-out forwards;
}
.footer-menu.hidden {
transform: translateY(100%);
}
@keyframes slideInFooter {
from { transform: translateY(100%); opacity: 0; }
to { transform: translateY(0); opacity: 1; }
}
.footer-menu a {
color: var(--text-color);
font-size: 1.5rem;
transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.footer-menu a:hover {
transform: scale(1.2);
}
/* Footer Navigation (Traditional Footer, All Devices) */
footer {
background: var(--primary-color);
color: var(--text-color);
text-align: center;
padding: 2rem 1rem;
position: relative;
z-index: 10;
}
footer .social-icons a, footer .footer-links a {
color: var(--text-color);
transition: color 0.3s ease, transform 0.3s ease;
}
footer .social-icons a:hover, footer .footer-links a:hover {
color: var(--highlight-color);
transform: scale(1.1);
}
footer .social-icons {
margin-bottom: 1rem;
}
footer .social-icons a {
font-size: 1.25rem;
margin: 0 0.5rem;
}
footer .footer-links a {
margin: 0 0.5rem;
text-decoration: none;
}
/* Responsive Design */
@media (max-width: 640px) {
.burger-btn { display: flex; }
.desktop-nav { display: none; }
.search-container { max-width: 120px; margin: 0 0.5rem; }
.sticky-header { padding: 0 0.5rem; }
.logo-text { font-size: 1.25rem; }
.icon { font-size: 1.1rem; margin-left: 0.5rem; }
.glow-text { font-size: 1.75rem; }
.btn { padding: 0.4rem 1rem; font-size: 0.85rem; min-width: 80px; }
footer { padding-bottom: 80px; }
footer .social-icons a, footer .footer-links a { font-size: 0.9rem; }
}
@media (min-width: 641px) and (max-width: 1024px) {
.burger-btn { display: none; }
.desktop-nav { display: flex; }
.search-container { max-width: 300px; }
.glow-text { font-size: 2.5rem; }
.btn { padding: 0.5rem 1.2rem; }
.footer-menu { display: none; }
footer .social-icons a, footer .footer-links a { font-size: 1rem; }
}
@media (min-width: 1025px) {
.burger-btn { display: none; }
.desktop-nav { display: flex; }
.search-container { max-width: 400px; }
.glow-text { font-size: 3rem; }
.footer-menu { display: none; }
footer .social-icons a, footer .footer-links a { font-size: 1rem; }
}
/* Additional Styles for Payment Page */
.checkout-container {
max-width: 900px;
margin: 0 auto;
background: var(--secondary-color);
border-radius: 10px;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
padding: 2rem;
}
.section { margin-bottom: 2rem; }
.instructions {
font-size: 1.1rem;
margin-bottom: 1.5rem;
color: #555;
}
.wallet-input, .txn-input {
width: 100%;
padding: 0.75rem;
border: 1px solid var(--highlight-color);
border-radius: 5px;
background: #f9f9f9;
color: var(--primary-color);
font-size: 1rem;
margin-bottom: 0.75rem;
font-family: 'Courier New', monospace;
}
.copy-button {
background: var(--button-bg-color);
color: var(--button-text-color);
padding: 0.5rem 1rem;
border: 1px solid var(--highlight-color);
border-radius: 5px;
cursor: pointer;
transition: all 0.3s ease;
}
.copy-button:hover {
background: var(--button-hover-bg-color);
color: var(--button-hover-text-color);
}
.qr-option {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
margin: 1.5rem 0;
}
.qr-image {
max-width: 300px;
width: 100%;
height: auto;
border: 2px solid var(--highlight-color);
border-radius: 10px;
transition: transform 0.3s ease;
}
.qr-image:hover {
transform: scale(1.05);
}
.fraud-notice {
background: var(--warning-color);
color: #333;
padding: 1rem;
border-radius: 5px;
margin-bottom: 1.5rem;
display: flex;
align-items: center;
gap: 0.75rem;
}
.status-bar {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem;
background: #f1f1f1;
border-radius: 5px;
margin-bottom: 1.5rem;
}
.status-item {
display: flex;
align-items: center;
gap: 0.5rem;
font-size: 0.9rem;
}
.status-item i.fa-check-circle { color: var(--success-color); }
.status-item i.fa-clock { color: #888; }
.escrow-steps {
display: flex;
flex-direction: column;
gap: 1rem;
margin-top: 1.5rem;
}
.escrow-step {
background: #f9f9f9;
padding: 1rem;
border-radius: 5px;
display: flex;
align-items: center;
gap: 1rem;
transition: background 0.3s ease;
}
.escrow-step.completed { background: #e6ffe6; }
.escrow-step i { font-size: 1.5rem; }
/* Popup Styles */
.popup {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: var(--secondary-color);
color: var(--primary-color);
padding: 2rem;
border-radius: 10px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
z-index: 2000;
text-align: center;
max-width: 90%;
width: 400px;
opacity: 0;
visibility: hidden;
transition: opacity 0.3s ease;
}
.popup.active {
opacity: 1;
visibility: visible;
}
.popup h3 {
font-size: 1.5rem;
font-weight: 700;
margin-bottom: 1rem;
}
.popup p {
font-size: 1rem;
margin-bottom: 1.5rem;
}
.overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
z-index: 1999;
opacity: 0;
visibility: hidden;
transition: opacity 0.3s ease;
}
.overlay.active {
opacity: 1;
visibility: visible;
}
@media (max-width: 640px) {
.status-bar, .escrow-steps { flex-direction: column; gap: 0.5rem; }
.qr-image { max-width: 200px; }
}
</style>
</head>
<body>
<!-- Header with X-Style Hide/Show -->
<header class="sticky-header">
<div class="flex items-center">
<a href="index.html" class="text-inherit flex items-center">
<span class="logo-text ml-2">TruthWeb</span>
</a>
</div>
<div class="search-container">
<input type="text" class="search-input" placeholder="Search TruthWeb..." aria-label="Search">
<i class="fas fa-search search-icon"></i>
<div class="search-results"></div>
</div>
<div class="flex items-center">
<nav class="desktop-nav hidden md:flex items-center">
<ul class="flex space-x-4">
<li class="nav-item"><a href="index.html">Home</a></li>
<li class="nav-item"><a href="marketplace.html">Marketplace</a></li>
<li class="nav-item"><a href="profile.html">Profile</a></li>
<li class="nav-item"><a href="wallet.html">Wallet</a></li>
<li class="nav-item"><a href="payment.html" class="active">Payment</a></li>
<li class="nav-item"><a href="ledger-testnet.html">Ledger Testnet</a></li>
<li class="nav-item"><a href="community.html">Community</a></li>
<li class="nav-item"><a href="developers.html">Developers</a></li>
<li class="nav-item"><a href="about.html">About</a></li>
</ul>
</nav>
<a href="marketplace.html" class="icon cart-btn" data-count="0"><i class="fas fa-shopping-cart"></i></a>
<a href="profile.html" class="icon"><i class="fas fa-user"></i></a>
<a href="wallet.html" class="icon"><i class="fas fa-wallet"></i></a>
<div class="burger-btn">
<span></span>
<span></span>
<span></span>
</div>
</div>
</header>
<!-- Mobile Menu -->
<nav class="mobile-menu">
<ul>
<li class="nav-item"><a href="index.html">Home</a></li>
<li class="nav-item"><a href="marketplace.html">Marketplace</a></li>
<li class="nav-item"><a href="profile.html">Profile</a></li>
<li class="nav-item"><a href="wallet.html">Wallet</a></li>
<li class="nav-item"><a href="payment.html" class="active">Payment</a></li>
<li class="nav-item"><a href="ledger-testnet.html">Ledger Testnet</a></li>
<li class="nav-item"><a href="community.html">Community</a></li>
<li class="nav-item"><a href="developers.html">Developers</a></li>
<li class="nav-item"><a href="about.html">About</a></li>
</ul>
</nav>
<!-- Main Content -->
<main>
<section class="hero">
<h1 class="glow-text">Payment Checkout</h1>
<p class="text-xl mt-4 md:text-2xl">Pay with Pi Network</p>
<p class="text-sm mt-2 opacity-75">[This is a simulation, not official]</p>
<p class="text-lg mt-4 text-center">Complete your payment below, then provide your delivery details.</p>
<div id="product-details" class="mt-4 text-lg"></div>
</section>
<section id="payment" class="py-16 px-4">
<div class="checkout-container">
<!-- Payment Status -->
<div class="status-bar">
<div class="status-item"><i class="fas fa-check-circle"></i> Order Placed</div>
<div class="status-item" id="payment-status"><i class="fas fa-clock"></i> Payment Pending</div>
<div class="status-item" id="address-status"><i class="fas fa-clock"></i> Address Pending</div>
<div class="status-item" id="verification-status"><i class="fas fa-clock"></i> Verification</div>
</div>
<!-- Fraud Detection Notice -->
<div class="fraud-notice">
<i class="fas fa-shield-alt"></i>
<p>Our AI-powered fraud detection is monitoring this transaction. Use escrow for added security.</p>
</div>
<!-- Payment Options -->
<div class="section">
<h3 class="text-xl font-semibold mb-4">Choose Payment Method</h3>
<div class="flex flex-col sm:flex-row gap-4">
<button onclick="showDirectPayment()" class="btn">Direct Payment</button>
<button onclick="showEscrowPayment()" class="btn escrow-btn">Escrow Payment</button>
</div>
<!-- Direct Payment -->
<div id="direct-payment" class="mt-4">
<p class="instructions" id="direct-payment-instructions">Scan the QR code or copy the wallet address to send your Pi payment directly to the vendor. After payment, complete the delivery form below.</p>
<div class="qr-option">
<img src="https://i.ibb.co/B273Nzjj/Untitled-design-57-1.png" alt="QR Code for Payment" class="qr-image">
<p class="text-sm mt-2 opacity-75">Supports Pi Network Mainnet</p>
</div>
<div>
<p class="font-semibold mb-2">Vendor Wallet Address:</p>
<input type="text"
value="GDXC7DFLZFEDT65JA6I7DHHGG7OENSM7HZAKTSFFHAL3A3LFRREVNJWN"
id="walletAddress"
readonly
class="wallet-input"
aria-label="Wallet Address">
<button onclick="copyWallet()" class="copy-button">Copy Address</button>
</div>
</div>
<!-- Escrow Payment -->
<div id="escrow-payment" class="hidden mt-4">
<p class="instructions" id="escrow-payment-instructions">Send your payment to TruthWeb’s escrow wallet. After payment, complete the delivery form below.</p>
<div class="qr-option">
<img src="https://i.ibb.co/B273Nzjj/Untitled-design-57-1.png" alt="Escrow QR Code" class="qr-image">
<p class="text-sm mt-2 opacity-75">TruthWeb Escrow Wallet</p>
</div>
<div>
<p class="font-semibold mb-2">Escrow Wallet Address:</p>
<input type="text"
value="ESCROW7TRUTHWEB1234567890PIHOLDING"
id="escrowAddress"
readonly
class="wallet-input"
aria-label="Escrow Address">
<button onclick="copyEscrow()" class="copy-button">Copy Address</button>
</div>
<div class="escrow-steps">
<div class="escrow-step" id="escrow-step-1">
<i class="fas fa-coins"></i>
<div>
<p><strong>Step 1: Send to Escrow</strong></p>
<p id="escrow-step-1-text">Enter transaction ID after sending <span id="escrow-amount"></span> Pi in the form below.</p>
</div>
</div>
<div class="escrow-step" id="escrow-step-2">
<i class="fas fa-truck"></i>
<div>
<p><strong>Step 2: Vendor Delivers</strong></p>
<p id="escrow-step-2-text">Waiting for vendor to ship your item...</p>
</div>
</div>
<div class="escrow-step" id="escrow-step-3">
<i class="fas fa-check"></i>
<div>
<p><strong>Step 3: Confirm Receipt</strong></p>
<p id="escrow-step-3-text">Confirm item received to release funds.</p>
</div>
<button onclick="releaseEscrow()" class="btn escrow-btn ml-auto" disabled>Release</button>
</div>
</div>
</div>
</div>
<!-- Fillout Form for Delivery Details -->
<div class="section">
<h3 class="text-xl font-semibold mb-4">Delivery Details</h3>
<p class="instructions">After completing your payment, please provide your delivery details and transaction ID below.</p>
<div style="width:100%;height:500px;" data-fillout-id="6xSHkkzhbyus" data-fillout-embed-type="standard" data-fillout-inherit-parameters data-fillout-dynamic-resize></div>
<script src="https://server.fillout.com/embed/v1/"></script>
</div>
</div>
</section>
</main>
<!-- Popup Overlays -->
<div class="overlay" id="popup-overlay"></div>
<div class="popup" id="order-popup">
<h3 id="popup-title">Your Order is Complete</h3>
<p id="popup-message">Your payment and delivery details have been submitted. Thank you for your purchase!</p>
<button class="btn" onclick="closePopup('order-popup')">Close</button>
</div>
<!-- Footer Menu (Fixed, Mobile-Only) -->
<nav class="footer-menu" role="navigation" aria-label="Mobile Footer Navigation">
<a href="index.html"><i class="fas fa-home"></i></a>
<a href="marketplace.html"><i class="fas fa-shopping-cart"></i></a>
<a href="profile.html"><i class="fas fa-user"></i></a>
<a href="wallet.html"><i class="fas fa-wallet"></i></a>
<a href="community.html"><i class="fas fa-users"></i></a>
</nav>
<!-- Footer Navigation -->
<footer role="contentinfo">
<div class="social-icons mb-4">
<a href="https://www.facebook.com/reimaginetruthofficial/" target="_blank" aria-label="Facebook"><i class="fab fa-facebook-f"></i></a>
<a href="https://x.com/reimagine_truth" target="_blank" aria-label="Twitter"><i class="fab fa-twitter"></i></a>
<a href="https://t.me/TruthWebOfficial" target="_blank" aria-label="Telegram"><i class="fab fa-telegram"></i></a>
<a href="https://www.youtube.com/@ReimagineTruth" target="_blank" aria-label="YouTube"><i class="fab fa-youtube"></i></a>
<a href="https://github.com/username/TruthWeb" target="_blank" aria-label="GitHub"><i class="fab fa-github"></i></a>
</div>
<p class="text-sm mb-2">© 2025 TruthWeb. All rights reserved.</p>
<div class="footer-links text-sm">
<a href="about.html">About</a> |
<a href="terms.html">Terms</a> |
<a href="privacy.html">Privacy</a> |
<a href="contact.html">Contact</a>
</div>
</footer>
<!-- Scripts -->
<script>
const ESCROW_FEE_RATE = 0.05; // 5% escrow fee
// Device Detection and Dynamic Adjustments
function adjustLayout() {
const width = window.innerWidth;
const isMobile = width <= 640;
const isTablet = width > 640 && width <= 1024;
const isDesktop = width > 1024;
const burgerBtn = document.querySelector('.burger-btn');
const desktopNav = document.querySelector('.desktop-nav');
const searchContainer = document.querySelector('.search-container');
if (isMobile) {
burgerBtn.style.display = 'flex';
desktopNav.style.display = 'none';
searchContainer.style.maxWidth = '120px';
} else if (isTablet) {
burgerBtn.style.display = 'none';
desktopNav.style.display = 'flex';
searchContainer.style.maxWidth = '300px';
} else if (isDesktop) {
burgerBtn.style.display = 'none';
desktopNav.style.display = 'flex';
searchContainer.style.maxWidth = '400px';
}
}
window.addEventListener('load', adjustLayout);
window.addEventListener('resize', adjustLayout);
// Header and Footer Scroll Hide/Show Effect
let lastScroll = 0;
window.addEventListener('scroll', () => {
const header = document.querySelector('.sticky-header');
const footerMenu = document.querySelector('.footer-menu');
const currentScroll = window.scrollY;
if (currentScroll > lastScroll && currentScroll > 50) {
header.classList.add('hidden');
footerMenu.classList.add('hidden');
} else if (currentScroll < lastScroll) {
header.classList.remove('hidden');
footerMenu.classList.remove('hidden');
header.classList.toggle('scrolled', currentScroll > 50);
}
lastScroll = currentScroll;
});
// Burger Menu Toggle
const burgerBtn = document.querySelector('.burger-btn');
const mobileMenu = document.querySelector('.mobile-menu');
burgerBtn.addEventListener('click', () => {
burgerBtn.classList.toggle('open');
mobileMenu.classList.toggle('open');
});
// Close Menu on Link Click
document.querySelectorAll('.mobile-menu a').forEach(link => {
link.addEventListener('click', () => {
burgerBtn.classList.remove('open');
mobileMenu.classList.remove('open');
});
});
// Search Functionality
const searchInput = document.querySelector('.search-input');
const searchResults = document.querySelector('.search-results');
const searchableContent = [];
document.querySelectorAll('h1, h2, h3, p, a').forEach(element => {
const text = element.textContent.trim();
if (text) {
searchableContent.push({
text: text.toLowerCase(),
element,
href: element.tagName === 'A' ? element.getAttribute('href') : null
});
}
});
searchInput.addEventListener('input', (e) => {
const query = e.target.value.toLowerCase().trim();
searchResults.innerHTML = '';
searchResults.classList.remove('active');
if (query.length > 0) {
const results = searchableContent.filter(item => item.text.includes(query));
if (results.length > 0) {
results.forEach(result => {
const div = document.createElement('div');
div.classList.add('search-result-item');
div.textContent = result.text.slice(0, 50) + (result.text.length > 50 ? '...' : '');
div.addEventListener('click', () => {
if (result.href) window.location.href = result.href;
else result.element.scrollIntoView({ behavior: 'smooth' });
searchResults.classList.remove('active');
searchInput.value = '';
});
searchResults.appendChild(div);
});
searchResults.classList.add('active');
} else {
const noResult = document.createElement('div');
noResult.classList.add('search-result-item');
noResult.textContent = 'No results found';
searchResults.appendChild(noResult);
searchResults.classList.add('active');
}
}
});
document.addEventListener('click', (e) => {
if (!searchInput.contains(e.target) && !searchResults.contains(e.target)) {
searchResults.classList.remove('active');
}
});
// Copy Wallet Address
async function copyWallet() {
const copyText = document.getElementById("walletAddress");
const button = event.target;
try {
await navigator.clipboard.writeText(copyText.value);
button.textContent = 'Copied!';
button.style.background = '#28a745';
setTimeout(() => {
button.textContent = 'Copy Address';
button.style.background = 'var(--button-bg-color)';
}, 2000);
} catch (err) {
console.error('Failed to copy: ', err);
alert('Failed to copy wallet address. Please copy it manually.');
}
}
async function copyEscrow() {
const copyText = document.getElementById("escrowAddress");
const button = event.target;
try {
await navigator.clipboard.writeText(copyText.value);
button.textContent = 'Copied!';
button.style.background = '#28a745';
setTimeout(() => {
button.textContent = 'Copy Address';
button.style.background = 'var(--button-bg-color)';
}, 2000);
} catch (err) {
console.error('Failed to copy: ', err);
alert('Failed to copy escrow address. Please copy it manually.');
}
}
// Update Cart Count
function updateCartCount() {
const cart = JSON.parse(localStorage.getItem('cart') || '[]');
const cartBtn = document.querySelector('.cart-btn');
cartBtn.setAttribute('data-count', cart.length);
}
// Display Product or Cart Details with Escrow Fee
document.addEventListener('DOMContentLoaded', () => {
const urlParams = new URLSearchParams(window.location.search);
const product = urlParams.get('product');
const price = urlParams.get('price');
const isCart = urlParams.get('cart') === 'true';
const totalFromCart = urlParams.get('total');
const productDetails = document.getElementById('product-details');
const directInstructions = document.getElementById('direct-payment-instructions');
const escrowInstructions = document.getElementById('escrow-payment-instructions');
let total;
if (isCart) {
const cart = JSON.parse(localStorage.getItem('cart')) || [];
if (cart.length > 0) {
const subtotal = cart.reduce((sum, item) => sum + item.price * (item.quantity || 1), 0);
const escrowFee = subtotal * ESCROW_FEE_RATE;
total = totalFromCart ? parseFloat(totalFromCart) : subtotal + escrowFee;
productDetails.innerHTML = `
Your cart (${cart.length} items):<br>
${cart.map(item => `${item.name} - ${item.price} Pi (Qty: ${item.quantity || 1}${item.variety ? ', Variety: ' + item.variety : ''})`).join('<br>')}<br>
<p>Subtotal: <strong>${subtotal.toFixed(2)} Pi</strong></p>
<p>Platform Escrow Fee (5%): <strong>${escrowFee.toFixed(2)} Pi</strong></p>
<p class="text-xl font-bold">Total: <strong>${total.toFixed(2)} Pi</strong></p>
`;
directInstructions.textContent = `Scan the QR code or copy the wallet address to send ${total.toFixed(2)} Pi directly to the vendor. After payment, complete the delivery form below.`;
escrowInstructions.textContent = `Send ${total.toFixed(2)} Pi to TruthWeb’s escrow wallet. After payment, complete the delivery form below.`;
document.getElementById('escrow-amount').textContent = total.toFixed(2);
} else {
productDetails.innerHTML = 'Your cart is empty.';
directInstructions.textContent = 'No payment required.';
escrowInstructions.textContent = 'No payment required.';
}
} else if (product && price) {
const priceNum = parseFloat(price);
const escrowFee = priceNum * ESCROW_FEE_RATE;
total = priceNum + escrowFee;
productDetails.innerHTML = `
You are purchasing: <strong>${decodeURIComponent(product)}</strong><br>
<p>Price: <strong>${priceNum.toFixed(2)} Pi</strong></p>
<p>Platform Escrow Fee (5%): <strong>${escrowFee.toFixed(2)} Pi</strong></p>
<p class="text-xl font-bold">Total: <strong>${total.toFixed(2)} Pi</strong></p>
`;
directInstructions.textContent = `Scan the QR code or copy the wallet address to send ${total.toFixed(2)} Pi directly to the vendor. After payment, complete the delivery form below.`;
escrowInstructions.textContent = `Send ${total.toFixed(2)} Pi to TruthWeb’s escrow wallet. After payment, complete the delivery form below.`;
document.getElementById('escrow-amount').textContent = total.toFixed(2);
} else {
const cart = JSON.parse(localStorage.getItem('cart')) || [];
if (cart.length > 0) {
const subtotal = cart.reduce((sum, item) => sum + item.price * (item.quantity || 1), 0);
const escrowFee = subtotal * ESCROW_FEE_RATE;
total = subtotal + escrowFee;
productDetails.innerHTML = `
Your cart (${cart.length} items):<br>
${cart.map(item => `${item.name} - ${item.price} Pi (Qty: ${item.quantity || 1}${item.variety ? ', Variety: ' + item.variety : ''})`).join('<br>')}<br>
<p>Subtotal: <strong>${subtotal.toFixed(2)} Pi</strong></p>
<p>Platform Escrow Fee (5%): <strong>${escrowFee.toFixed(2)} Pi</strong></p>
<p class="text-xl font-bold">Total: <strong>${total.toFixed(2)} Pi</strong></p>
`;
directInstructions.textContent = `Scan the QR code or copy the wallet address to send ${total.toFixed(2)} Pi directly to the vendor. After payment, complete the delivery form below.`;
escrowInstructions.textContent = `Send ${total.toFixed(2)} Pi to TruthWeb’s escrow wallet. After payment, complete the delivery form below.`;
document.getElementById('escrow-amount').textContent = total.toFixed(2);
} else {
productDetails.innerHTML = 'No product or cart selected. Please return to the Marketplace.';
directInstructions.textContent = 'No payment required.';
escrowInstructions.textContent = 'No payment required.';
}
}
updateCartCount();
});
// Payment Method Toggle
function showDirectPayment() {
document.getElementById('direct-payment').classList.remove('hidden');
document.getElementById('escrow-payment').classList.add('hidden');
}
function showEscrowPayment() {
document.getElementById('escrow-payment').classList.remove('hidden');
document.getElementById('direct-payment').classList.add('hidden');
}
// Escrow Release (No Direct Payment Submission since it's in the form)
function releaseEscrow() {
const step3 = document.getElementById('escrow-step-3');