-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
103 lines (94 loc) · 3.57 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Fund Me</title>
<link rel="icon" href="ethereum.png" type="image/x-icon" />
<link
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/tailwind.min.css"
rel="stylesheet"
/>
</head>
<body class="bg-gray-100">
<header class="bg-green-700 text-white py-4">
<div class="container mx-auto px-4 flex justify-center items-center">
<h1 class="text-3xl font-bold">Fund Me</h1>
</div>
</header>
<main class="container mx-auto px-4 py-8 flex flex-col items-center">
<div class="w-full max-w-md bg-white shadow-md rounded-md p-6">
<button
id="connectButton"
class="w-full bg-green-500 text-white py-3 px-6 rounded-md mb-4 transition-transform transform hover:scale-105 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500"
>
Connect Wallet
</button>
<div class="flex flex-col space-y-2 items-center">
<label for="ethAmount" class="text-sm font-medium text-gray-700"
>ETH Amount:</label
>
<input
id="ethAmount"
placeholder="0.1"
type="number"
min="0"
step="0.01"
class="w-full rounded-md border border-gray-300 px-3 py-2 focus:outline-none focus:ring-1 focus:ring-green-500"
/>
</div>
<div class="flex justify-between mt-4">
<button
id="fundButton"
class="w-1/2 bg-green-500 text-white py-3 px-6 rounded-md mr-2 transition-transform transform hover:scale-105 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500"
>
Fund Contract
</button>
<p id="fundStatus" class="px-1"></p>
<button
id="withdrawButton"
class="w-1/2 bg-green-500 text-white py-3 px-6 rounded-md ml-2 transition-transform transform hover:scale-105 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500"
>
Withdraw
</button>
<p id="withdrawStatus" class="px-1"></p>
</div>
<button
id="balanceButton"
class="w-full bg-green-500 text-white py-3 px-6 rounded-md mt-4 transition-transform transform hover:scale-105 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500"
>
Get Balance
</button>
<p id="balanceDisplay" class=""></p>
</div>
<table id="transactionTable" class="w-full mt-4 divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th
class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"
>
Type
</th>
<th
class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"
>
Amount (ETH)
</th>
<th
class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"
>
Transaction Hash
</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200"></tbody>
</table>
</main>
<footer class="pt-40">
<div class="container mx-auto px-4 flex justify-center items-center">
<p>© Saksham Tyagi</p>
</div>
</footer>
<script type="module" src="script.js"></script>
</body>
</html>