This repository has been archived by the owner on Jan 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvote.html
157 lines (134 loc) · 6.8 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Meta tags -->
<meta charset="utf-8">
<meta content="initial-scale=1, shrink-to-fit=no, width=device-width" name="viewport">
<title>Poll.Pizza | Vote</title>
<!-- CSS -->
<link href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,500,500i,700,700i" rel="stylesheet">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="css/material.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<!-- Icons -->
<link rel="icon" href="favicon.ico">
<link rel="icon" sizes="192x192" href="pizza_192x192.png">
<link rel="icon" sizes="128x128" href="pizza_128x128.png">
<link rel="apple-touch-icon" href="pizza_180x180.png">
<!-- Android Web App Meta -->
<meta name="mobile-web-app-capable" content="yes">
<meta name="theme-color" content="#f7cf6d">
<!-- Apple Web App Meta -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="#f7cf6d">
<meta name="apple-mobile-web-app-title" content="Poll.Pizza">
<link rel="apple-touch-startup-image" href="pizza_load.png">
</head>
<body class="pt-4">
<div class="navbar navbar-dark fixed-top bg-primary toolbar-waterfall" id="navbar">
<button aria-controls="navdrawer" aria-expanded="false" aria-label="Toggle Navdrawer" class="navbar-toggler" data-target="#navdrawer" data-toggle="navdrawer">
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand ml-auto" href="index.html" target="_self"><i class="material-icons text-secondary"></i> Poll.Pizza</a>
</div>
<div class="navdrawer" id="navdrawer" tabindex="-1" aria-hidden="true" style="display: none;">
<div class="navdrawer-content">
<div class="d-flex flex-column min-height">
<div class="navdrawer-header">
<a class="navbar-brand px-0" href="index.html" target="_self"><i class="material-icons text-secondary"></i> Poll.Pizza</a>
</div>
<nav class="navdrawer-nav">
<a class="nav-item nav-link" href="index.html" target="_self">
<i class="material-icons mr-md"></i> <strong>Home</strong>
</a>
<a class="nav-item nav-link" href="create.html" target="_self">
<i class="material-icons mr-md"></i> <strong>Create A Poll</strong>
</a>
<div class="navdrawer-divider"></div>
<a class="nav-item nav-link collapsed" data-toggle="collapse" href="#nav_example">
<i class="material-icons mr-md"></i> <strong>Example Poll</strong>
</a>
<div class="collapse pb-sm " id="nav_example">
<a class="nav-item nav-link pl-lg text-black-secondary" href="vote.html?poll=pizza" target="_self"><span class="font-weight-normal">Pizza Vote</span></a>
<a class="nav-item nav-link pl-lg text-black-secondary" href="result.html?poll=pizza" target="_self"><span class="font-weight-normal">Pizza Results</span></a>
</div>
</nav>
<div class="mt-auto">
<div class="navdrawer-divider mt-no"></div>
<div class="navdrawer-nav">
<a class="nav-item nav-link text-muted">
<i class="material-icons mr-md text-muted"></i> s3490602
</a>
</div>
</div>
</div>
</div>
</div>
<div class="container pt-5" id="app" ng-app="votePizza" ng-controller="pizzaCtrl">
<h3 class="mb-3" ng-bind="title"></h3>
<div class="card mb-3">
<div class="card-header bg-light text-muted font-weight-bold" ng-bind="question"></div>
<div class="card-body mt-3">
<div class="{{alertClass}}" ng-cloak><span ng-bind="result"></span> <span ng-bind="errors"></span></div>
<form id="voteForm">
<fieldset>
<!-- Voting Options -->
<div class="custom-controls-stacked mt-4 mb-3">
<label id="option_1" class="custom-control custom-radio">
<input ng-model="vote" name="vote" type="radio" class="custom-control-input" value="1">
<span class="custom-control-indicator"></span>
<span class="custom-control-description" ng-bind="option_1"></span>
</label>
<label id="option_2" class="custom-control custom-radio">
<input ng-model="vote" name="vote" type="radio" class="custom-control-input" value="2">
<span class="custom-control-indicator"></span>
<span class="custom-control-description" ng-bind="option_2"></span>
</label>
<label id="option_3" class="custom-control custom-radio {{option_3Class}}">
<input ng-model="vote" name="vote" type="radio" class="custom-control-input" value="3">
<span class="custom-control-indicator"></span>
<span class="custom-control-description" ng-bind="option_3"></span>
</label>
<label id="option_4" class="custom-control custom-radio {{option_4Class}}">
<input ng-model="vote" name="vote" type="radio" class="custom-control-input" value="4">
<span class="custom-control-indicator"></span>
<span class="custom-control-description" ng-bind="option_4"></span>
</label>
</div>
<!-- Input: Voter -->
<div class="form-group">
<div class="floating-label textfield-box">
<label for="voter">Your Name</label>
<input id="voter" ng-model="voter" type="text" placeholder="Anonymous" class="form-control">
</div>
</div>
<!-- Submit Button -->
<div class="form-group">
<button id="submit" ng-click="insertData()" class="btn btn-success float-right">Vote</button>
</div>
</fieldset>
</form>
</div>
</div>
<div id="goResult"></div>
<hr />
<p class="text-center"><small class="text-muted" ng-cloak>
Poll {{poll_id}} created by {{creator}} on {{poll_timestamp}} <br />
Share URL: <a href="https://poll.pizza/vote.html?poll={{url}}" target="_blank">https://poll.pizza/vote.html?poll={{url}}</a>
</small></p>
</div><!-- /.container -->
<div class="container mt-4">
<footer class="footer">
<hr />
<p>© Poll.Pizza 2017</p>
</footer>
</div><!-- /.container -->
<!-- JavaScript -->
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.6/angular.min.js"></script>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/material.min.js"></script>
<script src="app/pizza-vote.js"></script>
</body>
</html>