-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
133 lines (117 loc) · 3.25 KB
/
Copy pathindex.html
File metadata and controls
133 lines (117 loc) · 3.25 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Decentralized Voting Application</title>
<!-- Include necessary scripts -->
<script src="https://cdn.ethers.io/lib/ethers-5.7.1.umd.min.js" type="application/javascript"></script>
<script src="main.js"></script>
<!-- Add some styling for a cleaner look -->
<style>
body {
font-family: 'Arial', sans-serif;
margin: 0;
padding: 0;
background-color: #f5f5f5;
}
.navbar {
overflow: hidden;
background-color: #333;
font-family: Arial;
}
.navbar a {
float: left;
display: block;
color: white;
text-align: center;
padding: 14px 20px;
text-decoration: none;
}
.navbar a:hover {
background-color: #ddd;
color: black;
}
.container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin: 50px auto;
}
button {
background-color: #4CAF50;
color: white;
padding: 12px 24px;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 16px;
font-weight: bold;
display: block;
margin: 20px auto 0;
}
button:hover {
background-color: #45a049;
}
form {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin-top: 20px;
}
input[type=number] {
width: 30%;
padding: 12px 20px;
margin: 8px 0;
box-sizing: border-box;
border: 2px solid #ccc;
border-radius: 4px;
}
p {
text-align: center;
font-size: 20px;
margin-top: 20px;
}
#myTable {
border-collapse: collapse;
width: 100%;
max-width: 600px;
margin: 0 auto;
}
#myTable th,
#myTable td {
border: 1px solid black;
padding: 8px;
text-align: center;
}
#myTable th {
background-color: #f2f2f2;
font-weight: bold;
}
</style>
</head>
<body>
<div class="navbar">
<a href="/index.html">Vote</a>
<a href="/ListVoters.html">List Voters</a>
</div>
<div class="container">
<h1>Welcome to the Decentralized Voting Application</h1>
</div>
<div>
<button onclick="connectMetamask()">Connect Metamask</button>
<p id="metamasknotification"></p>
</div>
<div class="container">
<span>Vote here</span>
<input type="number" id="vote" placeholder="Enter Voter Index...">
<button onclick="addVote()">Add Vote</button>
<p id="cand"></p>
<button onclick="voteStatus()">Check Voting Status</button>
<p id="status"></p>
<p id="time"></p>
</div>
</body>
</html>