-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
132 lines (118 loc) · 3.97 KB
/
index.html
File metadata and controls
132 lines (118 loc) · 3.97 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>NanoSol - Solana Micropayments</title>
<link rel="stylesheet" href="style.css">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap" rel="stylesheet">
</head>
<body>
<div class="container">
<header class="header">
<div class="logo">
<h1>⚡ NanoSol</h1>
<p>Instant Solana Micropayments</p>
</div>
<button id="connectWallet" class="connect-btn">Connect Wallet</button>
</header>
<div id="walletInfo" class="wallet-info hidden">
<div class="balance-card">
<h3>Your Balance</h3>
<div class="balance">
<span id="solBalance">0</span> SOL
</div>
<div class="address">
<span id="walletAddress"></span>
<button id="copyAddress" class="copy-btn">📋</button>
</div>
</div>
</div>
<main class="main-content">
<div class="payment-section">
<h2>Send Payment</h2>
<div class="form-group">
<label for="recipientAddress">Recipient Address</label>
<input
type="text"
id="recipientAddress"
placeholder="Enter Solana wallet address"
class="input-field"
>
</div>
<div class="form-group">
<label for="amount">Amount</label>
<div class="amount-input">
<input
type="number"
id="amount"
placeholder="0.001"
step="0.000000001"
min="0"
class="input-field"
>
<select id="tokenType" class="token-select">
<option value="SOL">SOL</option>
<option value="USDC">USDC</option>
</select>
</div>
</div>
<div class="form-group">
<label for="memo">Memo (Optional)</label>
<input
type="text"
id="memo"
placeholder="Payment description"
class="input-field"
maxlength="32"
>
</div>
<button id="sendPayment" class="send-btn" disabled>
Send Payment
</button>
<div class="fee-info">
<small>Network fee: ~0.000005 SOL</small>
</div>
</div>
<div class="receive-section">
<h2>Receive Payment</h2>
<div class="qr-container">
<canvas id="qrCode" class="qr-code"></canvas>
<div class="qr-info">
<p>Scan to send payment to your wallet</p>
<button id="generateQR" class="generate-qr-btn">
Generate QR Code
</button>
</div>
</div>
<div class="quick-amounts">
<h3>Quick Request Amounts</h3>
<div class="amount-buttons">
<button class="amount-btn" data-amount="0.001">0.001 SOL</button>
<button class="amount-btn" data-amount="0.01">0.01 SOL</button>
<button class="amount-btn" data-amount="0.1">0.1 SOL</button>
<button class="amount-btn" data-amount="1">1 SOL</button>
</div>
</div>
</div>
</main>
<div class="transaction-history">
<h2>Recent Transactions</h2>
<div id="transactionList" class="transaction-list">
<p class="no-transactions">No transactions yet</p>
</div>
</div>
<div id="notification" class="notification hidden">
<span id="notificationText"></span>
<button id="closeNotification">×</button>
</div>
<div id="loadingOverlay" class="loading-overlay hidden">
<div class="loading-spinner"></div>
<p>Processing transaction...</p>
</div>
</div>
<script src="https://unpkg.com/@solana/web3.js@latest/lib/index.iife.min.js"></script>
<script src="https://unpkg.com/qrcode@1.5.3/build/qrcode.min.js"></script>
<script src="script.js"></script>
</body>
</html>