-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvote.html
111 lines (97 loc) · 2.49 KB
/
vote.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
<!DOCTYPE html>
<html>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Raleway">
<style>
body, html {font-family: "Raleway", sans-serif; height: 100%}
.radio-toolbar label {
display: inline-block;
padding: 3% 3%;
font-family: sans-serif, Arial;
font-size: 16px;
border: 2px solid #444;
border-radius: 4px;
width: 93%;
}
.radio-toolbar input[type="radio"] {
opacity: 0;
position: fixed;
width: 0;
font-family: "Raleway", sans-serif;
}
.radio-toolbar input[type="radio"]:checked + label {
background-color:#bfb;
}
.radio-toolbar label:hover {
background-color: lightblue;
cursor: pointer;
box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24),0 17px 50px 0 rgba(0,0,0,0.19);
}
.radio-toolbar {
width: 100%;
}
.radio
{
width: 100%;
}
#parent {
display: flex;
height: 90%;
padding: 0;
border: 0;
}
#narrow {
flex: 1;
padding: 1%;
/* Just so it's visible */
}
#wide {
width: 48%;
padding: 1%;
/* Just so it's visible */
}
input[type="submit"] {
background-color: #4CAF50; /* Green */
border: none;
color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
cursor: pointer;
font-family: "Raleway", sans-serif;
}
input[type="submit"]:hover {
box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24),0 17px 50px 0 rgba(0,0,0,0.19);
}
#submit {
visibility: hidden;
float: right;
border-right: 5%;
}
#sumbit1 {
float: left;
}
</style>
<body>
<center><p><span style='font-size: 300%'>Vote for your candidate</span></p><br></center>
<form action="" method="POST">
<div id="parent" class="radio-toolbar">
<div id="wide">
{% for ele in candidates1 %}
<input type="radio" id="{{ele}}" name="candidate" value="{{ele}}">
<label onClick = "(function() {document.getElementById('submit').style.visibility = 'visible';})()" for="{{ele}}">{{ele}}</label><br><br>
{% endfor %}
</div>
<div id="narrow">
{% for ele in candidates2 %}
<input type="radio" id="{{ele}}" name="candidate" value="{{ele}}">
<label onClick = "(function() {document.getElementById('submit').style.visibility = 'visible';})()" for="{{ele}}">{{ele}}</label><br><br>
{% endfor %}
</div>
</div>
<input id = "submit" type="submit" value="Submit">
</form>
</body>
</html>