-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
158 lines (134 loc) · 3.04 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<title>To Do Decentralized Application</title>
<script src="main.js"></script>
<script src="https://cdn.ethers.io/lib/ethers-5.7.1.umd.min.js"
type="application/javascript"></script>
<title>Voting DAPP</title>
<style>
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: 50px auto 0;
}
button:hover {
background-color: #3e8e41;
}
/* Paragraph styles */
p {
text-align: center;
font-size: 20px;
margin-top: 50px;
}
form {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin-top: 50px;
}
input[type=text], select {
width: 30%;
padding: 12px 20px;
margin: 8px 0;
box-sizing: border-box;
border: 2px solid #ccc;
border-radius: 4px;
}
input[type=number], select {
width: 30%;
padding: 12px 20px;
margin: 8px 0;
box-sizing: border-box;
border: 2px solid #ccc;
border-radius: 4px;
}
input[type=submit] {
background-color: #4CAF50;
color: white;
padding: 12px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
}
input[type=submit]:hover {
background-color: #45a049;
}
.container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin-top: 50px;
}
span {
display: block;
margin-bottom: 10px;
}
/* Style the navigation bar */
.navbar {
overflow: hidden;
background-color: #333;
font-family: Arial;
}
/* Style the links inside the navigation bar */
.navbar a {
float: left;
display: block;
color: white;
text-align: center;
padding: 14px 20px;
text-decoration: none;
}
/* Change the color of links on hover */
.navbar a:hover {
background-color: #ddd;
color: black;
}
#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">Welcome to the Decentralized Voting Application</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="Add Index of the Voter ... ">
<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>