-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
210 lines (205 loc) · 9.73 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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<!--
Copyright 2015, Google, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- jQuery -->
<script src="https://code.jquery.com/jquery-2.1.3.min.js"></script>
<!-- bootstrap -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-social/4.9.0/bootstrap-social.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
<!-- Firebase -->
<script src="https://cdn.firebase.com/js/client/2.2.4/firebase.js"></script>
<!-- Handlebarsjs -->
<script src="//cdn.jsdelivr.net/handlebarsjs/3.0.2/handlebars.min.js"></script>
<!-- application css/js -->
<link rel="stylesheet" href="css/main.css">
<script src="js/app.js"></script>
</head>
<body>
<a href="https://github.com/hostirosti/speed-crowd-voting-code-challenge">
<img class="github-fork-me-badge"
src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67"
alt="Fork me on GitHub"
data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png">
</a>
<div class="jumbotron">
<div class="container-flow container-narrow">
<div class="row title">
<div class="col-md-12">
<h2>Speed Crowd Voting Challenge</h2>
</div>
</div>
<div class="row">
<div class="col-md-7">
<!-- BEGIN - voting panel -->
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Question on the menu ;)</h3>
</div>
<div class="panel-body">
<div class="question-container img-rounded panel panel-default">
<div id="active-question-container">
<script id="active-question-element-template" type="text/x-handlebars-template">
<div class="active-question" id="active-question" key="{{questionKey}}">
#{{questionNumber}} - {{question}}
<div class="question-statistics">rating average: {{questionVotesAverage}} | #votes: {{voteCount}}
</div>
</div>
</script>
</div>
<div class="bg-info img-rounded voting-buttons-info" id="voting-buttons-info" style="display: none;">
Please rate (higher == better):
</div>
<div class="voting-buttons" id="voting-buttons" style="display: none;">
<label class="radio-inline">
<input type="radio" name="votingOption" id="voting1" value="1"> 1
</label>
<label class="radio-inline">
<input type="radio" name="votingOption" id="voting2" value="2"> 2
</label>
<label class="radio-inline">
<input type="radio" name="votingOption" id="voting3" value="3"> 3
</label>
<label class="radio-inline">
<input type="radio" name="votingOption" id="voting4" value="4"> 4
</label>
<label class="radio-inline">
<input type="radio" name="votingOption" id="voting5" value="5"> 5
</label>
</div>
</div>
<div id="time-left-container" style="display: none;">
<script id="time-left-template" type="text/x-handlebars-template">
{{#if isTimeLeft }}
<h3 id="time-left">Time left to vote: {{timeLeft}} sec</h3>
{{else}}
<h3 id="time-left">Voting for this question has closed!</h3>
{{/if}}
</script>
</div>
</div>
</div>
<!-- END - voting panel -->
<!-- BEGIN - question administration panel -->
<div class="panel panel-default" id="question-admin-panel">
<div class="panel-heading">
<h3 class="panel-title">No question active? Fire your question! :)</h3>
</div>
<div class="panel-body">
<form id="question-submit-form">
<div class="form-group">
<input type="text" class="form-control" id="question" maxlength="140" placeholder="Please enter a question for voting (max. 140 chars)">
</div>
<div class="bg-danger submit-error img-rounded" id="question-submit-error" style="display: none;">Did you forget to type a question before submitting?</div>
<button id="question-submit" type="button" class="btn btn-default">
Submit your question for voting
</button>
</form>
</div>
</div>
<!-- END - question administration panel -->
</div>
<div class="col-md-5">
<!-- BEGIN - how to participate panel -->
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">How to participate</h3>
</div>
<div class="panel-body">
<ol>
<li class="hidden-xs"> Scan the following QR Code to join the Speed Crowd Voting
<img id="join-url-qrcode" src="">
</li>
<li id="login-container" class="login-container">
Login in with one of the following options
<a id="login-button-google" class="btn btn-block btn-sm btn-social btn-google" href="javascript:void(0);">
<i class="fa fa-google"></i> <span> Sign in with Google </span>
</a>
<a id="login-button-github" class="btn btn-block btn-sm btn-social btn-github" href="javascript:void(0);">
<i class="fa fa-github"></i> <span> Sign in with GitHub </span>
</a>
<a id="login-button-twitter" class="btn btn-block btn-sm btn-social btn-twitter" href="javascript:void(0);">
<i class="fa fa-twitter"></i> <span> Sign in with Twitter </span>
</a>
</li>
<li>Put your vote by selecting one of the radio button when a question becomes available for voting.
</li>
</ol>
</div>
</div>
<!-- END - how to participate panel -->
</div>
</div>
<div class="row">
<div class="col-md-7">
<!-- BEGIN - #TBT(turn back time) history panel -->
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">#TBT - Nostalgia</h3>
</div>
<div class="panel-body">
<ul class="tbt-question-history" id="tbt-question-history">
<script id="question-history-element-template" type="text/x-handlebars-template">
<li>
<div class="question-container img-rounded panel panel-default">
<div class="tbt-question">#{{questionNumber}} - {{question}}</div>
<div class="tbt-question-statistics">rating average: {{questionVotesAverage}} |
#votes: {{voteCount}}
</div>
<div>
</li>
</script>
</ul>
</div>
</div>
<!-- END - #TBT(turn back time) history panel -->
</div>
<div class="col-md-5">
<!-- BEGIN - voters news feed panel -->
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Voters News Flash</h3>
</div>
<div class="panel-body">
<script id="voters-count-element-template" type="text/x-handlebars-template">
<div id="online-voters-count">Online voters: <span id="voters-online">{{votersCount}}</span></div>
</script>
<div>
<ul class="voters-feed" id="voters-feed">
<script id="voters-feed-element-template" type="text/x-handlebars-template">
<li>
<div class="btn-block btn-social btn-sm btn-{{provider}} voter-feed-entry">
<i class="fa fa-{{provider}}"></i>
<span class="voter-profile-pic">
<img src="{{pictureUrl}}">
</span>
{{displayName}} is now {{status}}
</div>
</li>
</script>
</ul>
</div>
</div>
</div>
<!-- END - voters news feed panel -->
</div>
</div>
</div>
</div>
</body>
</html>