-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
554 lines (515 loc) · 25 KB
/
index.html
File metadata and controls
554 lines (515 loc) · 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
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
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>TezVote - Make your tez heard</title>
<!-- Bootstrap core CSS -->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom fonts for this template -->
<link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Work+Sans:300,400,500,,700,800,900)" rel="stylesheet">
<!-- Plugin CSS -->
<link href="vendor/magnific-popup/magnific-popup.css" rel="stylesheet" type="text/css">
<!-- Custom styles for this template -->
<link href="css/freelancer.css" rel="stylesheet">
</head>
<body id="page-top">
<!-- Navigation -->
<nav class="navbar navbar-expand-lg bg-secondary fixed-top text-uppercase" id="mainNav">
<div class="container">
<a class="navbar-brand js-scroll-trigger" href="#page-top">
<img style="width:167px;height:52px;" src="img/logo/logo.png">
</a>
<button class="navbar-toggler navbar-toggler-right text-uppercase bg-primary text-white rounded" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
<i class="fas fa-bars"></i>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav m-auto">
<li class="nav-item mx-0 mx-lg-2">
<a class="nav-link js-scroll-trigger" href="#proposals">Proposals</a>
</li>
<li class="nav-item mx-0 mx-lg-2">
<a class="nav-link js-scroll-trigger" href="#survey">Survey</a>
</li>
<li class="nav-item mx-0 mx-lg-2">
<a class="nav-link js-scroll-trigger" href="#vote">Vote</a>
</li>
<li class="nav-item mx-0 mx-lg-2">
<a class="nav-link js-scroll-trigger" href="#about">About</a>
</li>
<li class="nav-item mx-0 mx-lg-2">
<a class="nav-link js-scroll-trigger" href="#contact">Contact</a>
</li>
</ul>
<div class="social-icons">
<a target="_blank" href="https://twitter.com/TezTechLabs"><i class="fab fa-twitter ml-auto"></i></a>
<a target="_blank" href="https://github.com/TezTech"><i class="fab fa-github ml-auto"></i></a>
</div>
</div>
</div>
</nav>
<!-- Header -->
<header id="proposals" class="masthead bg-primary text-white text-center">
<div class="container">
<div class="row">
<div class="col-xs-12 col-xs-12 col-md-7">
<div class="row">
<div class="col-12 col-xs-12 col-md-12 col-lg-12 pb-5">
<h1 class="font-weight-bolder float-left">PROPOSALS</h1>
</div>
<div class="col-12 col-xs-12 col-md-12 col-lg-12 pb-5">
<p style="text-align: justify;">
Nomadic Labs have published their intentions to propose two competing
protocol amendments. Both proposals make small changes, with the overall
goal to test the on-chain governance mechanism of Tezos. You can
read more about the <a style="text-decoration:none" href="https://blog.nomadic-labs.com/athens-our-proposals-for-the-first-voted-amendment.html" target="_blank"><strong>proposals here</strong></a> and take part in the
<a style="text-decoration:none" href="https://www.kialo.com/tezos-protocol-amendment-1-25295/25295.0/25295.0" target="_blank"><strong>online discussion on Kialo.</strong></a>
</p>
</div>
</div>
<div class="row pb-5">
<div class="col-12 col-xs-12 col-md-12 col-lg-5">
<div class="row">
<div class="col-3 col-xs-12 col-lg-3 header-img">
<img src="img/global/gas.png">
</div>
<div class="col-9 col-xs-9 col-md-9 col-lg-9 text-left">
<h4>Proposal One<br /><small>Athens B</small></h4>
<span>Increase gas limits</span>
</div>
</div>
</div>
<div class="col-xs-2 col-md-2 col-lg-2 side-border">
<div class="line"></div>
</div>
<hr class="col-offset-1 col-10 horizontal-border"></hr>
<div class="col-12 col-xs-12 col-md-12 col-lg-5">
<div class="row">
<div class="col-3 col-xs-12 col-lg-3 header-img">
<img src="img/global/gas_cookie.png">
</div>
<div class="col-9 col-xs-9 col-md-9 col-lg-9 text-left">
<h4>Proposal Two<br /><small>Athens A</small></h4>
<span>Increase gas limits</span>
<br>
<span>AND reduce roll size</span>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-5 col-lg-4">
<a href="#survey" class="float-left btn btn-block tzbutton rbutton js-scroll-trigger">VIEW RESULTS</a>
</div>
</div>
</div>
<div class="col-xs-12 col-md-5 col-lg-5" >
<img class="lg-img" src="img/base/IllustrationsBase.png">
</div>
</div>
</div>
</header>
<!-- Current Surver Results -->
<section class="text-center" id="survey">
<div class="container">
<h5 class="text-uppercase">Current</h5>
<h2 class="text-uppercase">Survey Results</h2>
<h5 class="font-weight-normal mb-5 entire-network"><span id="filtered">Entire Network</span> - <span id="stakingBalance">Loading...</span></h5>
<div class="row mb-5">
<div class="col-md-5 offset-md-2">
<div class="form-group controls mb-0">
<input class="" id="baker" type="search" placeholder="tz1" data-validation-required-message="Please enter your bakers address" aria-invalid="false">
<p class="help-block text-danger"></p>
</div>
</div>
<div class="col-md-3">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<button id="filterButton" type="button" class="btn btn-block tzbutton pbutton">FILTER</button>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<button id="clearButton" type="button" class="btn btn-block tzbutton pbutton">CLEAR</button>
</div>
</div>
</div>
</div>
<div class="col-md-12">
<p class="text-center baker-address">Enter a baker address above to see statistics for individual bakers</p>
</div>
</div>
<div class="row mb-5">
<div class="col-6 col-xs-6 col-md-3 mb-4 survey-block">
<div class="survey-img">
<img src="img/global/user_circle.png">
</div>
<h4>Participation</h4>
<span class="statresult" id="participation">-</span>
</div>
<div class="col-6 col-xs-6 col-md-3 mb-4 survey-block">
<div class="survey-img">
<img src="img/global/gas_circle.png">
</div>
<h4>Proposal 1</h4>
<span class="statresult" id="proposal1">-</span>
</div>
<div class="col-6 col-xs-6 col-md-3 mb-4 survey-block">
<div class="survey-img">
<img src="img/global/gas_cookie_circle.png">
</div>
<h4>Proposal 2</h4>
<span class="statresult" id="proposal2">-</span>
</div>
<div class="col-6 col-xs-6 col-md-3 mb-4 survey-block">
<div class="survey-img">
<img src="img/global/question_circle.png">
</div>
<h4>Neither/Unsure</h4>
<span class="statresult" id="proposal0">-</span>
</div>
</div>
</div>
</section>
<!-- vote -->
<section id="vote">
<div class="container">
<div class="row row-eq-height">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-6">
<div class="row">
<div class="col-lg-12">
<h5 class="text-uppercase">Register your</h5>
<h2 class="text-uppercase pb-5">Preferences</h2>
<p class="pb-5" style="text-align: justify;">
Participate today, and indicate your voting preference ahead of the upcoming proposals. All you need to do is
send a simple transaction from your wallet to our smart contract. The only costs are the network and storage fees,
which amount to approximately 0.07ꜩ.
</p>
</div>
<div class="col-lg-12 start-by">
<h4>Start by choosing your voting preference</h4>
</div>
</div>
<div class="col-lg-12 pt-3 please-note">
<div class="row alert alert-danger" role="alert">
<div class="col-2 col-lg-2">
<img src="img/global/warning.png">
</div>
<div class="col-10 col-lg-10 text">
<strong>Please note</strong> - this vote has no direct effect on the on-chain voting process.
It is ultimately up to your delegation service if they wish to factor these
result into their decision making.
</div>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-6 votes-panel">
<div class="d-none d-md-flex btn-group btn-group-lg btn-block flat-buttons" role="group" aria-label="Preferences">
<button id="bProp1" type="button" class="active btn tzbutton gbutton voteBtn text-uppercase" onclick="vote(1);iconChange(this);return false;">Proposal 1</button>
<button id="bProp2" type="button" class="btn tzbutton gbutton voteBtn text-uppercase" onclick="vote(2);iconChange(this);return false;">Proposal 2</button>
<button id="bUnsure" type="button" class="btn tzbutton gbutton voteBtn text-uppercase" onclick="vote(0);iconChange(this);return false;">Neither/Unsure</button>
</div>
<!-- Dropdown for mobile -->
<div class="btn-group dropdown d-md-none" id="tezTb" style="width: 100%">
<button id="bProp1" type="button" style="width: 100%" class="btn tzbutton gbutton voteBtn text-uppercase dropdown-toggle toggle-table-align" data-toggle="dropdown" onclick="vote(1);iconChange(this);return false;">Proposal 1</button>
<ul class="dropdown-menu" style="width: 100%">
<li><button id="bProp1" type="button" class="active dropdown-item btn tzbutton gbutton voteBtn text-uppercase toggle-table-align" onclick="vote(1);iconChange(this);return false;">Proposal 1</button></li>
<li><button id="bProp2" type="button" class="dropdown-item btn tzbutton gbutton voteBtn text-uppercase toggle-table-align" onclick="vote(2);iconChange(this);return false;">Proposal 2</button></li>
<li><button id="bUnsure" type="button" class="dropdown-item btn tzbutton gbutton voteBtn text-uppercase toggle-table-align" onclick="vote(0);iconChange(this);return false;">Neither/Unsure</button></li>
</ul>
</div>
<div id="votetable" class="table-container">
<div class="col-lg-12 text-center gas">
<img id="propIcon" src="img/global/gas_circle.png">
</div>
<div>
<table class="table table-striped table-borderless">
<tbody>
<tr>
<td>
<div class="table-text">
<span class="float-left">
<strong>To:</strong>
</span>
<span class="float-right">
KT1Tuvu3JCXJWgoL8NLYfy38dMK7jxcdrFkZ
</span>
</div>
</td>
</tr>
<tr>
<td>
<div>
<span class="float-left">
<strong>Amount:</strong>
</span>
<span class="float-right">
0.00000<span id="pref">1</span> ꜩ
</span>
</div>
</td>
</tr>
<tr>
<td>
<div>
<span class="float-left">
<strong>Fee:</strong>
</span>
<span class="float-right">
21000μꜩ (0.021ꜩ)
</span>
</div>
</td>
</tr>
<tr>
<td>
<div>
<span class="float-left">
<strong>Gas limit:</strong>
</span>
<span class="float-right">
200000
</span>
</div>
</td>
</tr>
<tr>
<td>
<div>
<span class="float-left">
<strong>Storage limit:</strong>
</span>
<span class="float-right">
50
</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="col-12 please-note2">
<div class="row alert alert-danger" role="alert">
<div class="col-2 col-lg-2">
<img src="img/global/warning.png">
</div>
<div class="col-10 col-lg-10 text">
<strong>Please note</strong> - this vote has no direct effect on the on-chain voting process.
It is ultimately up to your delegation service if they wish to factor these
result into their decision making.
</div>
</div>
</div>
</div>
</section>
<!-- Portfolio Grid Section -->
<section class="portfolio" id="about">
<div class="container">
<h5 class="text-center text-uppercase mb-0">TEZVOTE</h5>
<h2 class="text-center text-uppercase text-secondary mb-0">About Us</h2>
<p class="text-justify padding-about main">TezVote is a free tool developed by <a style="text-decoration:none" href="https://teztech.io/" target="_blank"><strong>TezTech Labs</strong></a>. We aim to provide user friendly tools to help delegation
services and delegators when it comes to the protocol amendment process and on-chain voting. We believe
a transparent, on-chain and secure method to survey stakeholder sentiment is vital to help delegators and delegates through this process.
</p>
<div class="row">
<div class="col-lg-6 justif ml-auto">
<h4 class="text-center text-secondary mb-0">Why we should use this?</h4>
<p class="text-justify padding-about">Currently, delegation services have control of a lot of voting power, but some lack the tools to accurately gauge the voting sentiment
of their users. We hope TezVote will provide an accurate, auditable and on-chain process to assist with this process.
</p>
</div>
<div class="col-lg-6 justif mr-auto">
<h4 class="text-center text-secondary mb-0">How does voting work?</h4>
<p class="text-justify padding-about">We have deployed a <a style="text-decoration:none" href="https://tzscan.io/KT1Tuvu3JCXJWgoL8NLYfy38dMK7jxcdrFkZ" target="_blank"><strong>very simple smart contract</strong></a> which when called, stores the senders address and a corresponding vote.
This is important because it is on-chain, and can't be set by anyone but the owner of the private key.
</p>
</div>
<div class="col-lg-6 justif ml-auto">
<h4 class="text-center text-secondary mb-0">Where do the results come from?</h4>
<p class="text-justify padding-about">We pull all results from the blockchain, and store them in a secondary database to improve usability, whilst remaining auditable.
We use the latest snapshot taken on the network to measure the weight (tez) of each stakeholder and corresponding on-chain vote.
</p>
</div>
<div class="col-lg-6 justif mr-auto">
<h4 class="text-center text-secondary mb-0">Help me understand the proposals!</h4>
<p class="text-justify padding-about">The best place to read and discuss the pros and cons of the current proposals is on <a style="text-decoration:none" href="https://www.kialo.com/tezos-protocol-amendment-1-25295/25295.0/25295.0" target="_blank"><strong>Kialo</strong></a> - you can also ask on <a style="text-decoration:none" href="https://www.reddit.com/r/tezos" target="_blank"><strong>Reddit</strong></a>,
follow the <a style="text-decoration:none" href="https://blog.nomadic-labs.com/meanwhile-at-nomadic-labs-1.html" target="_blank"><strong>Nomadic Labs blog</strong></a> or join the <a style="text-decoration:none" href="https://riot.im/app/#/room/#tezos:matrix.org" target="_blank"><strong>Riot chat room</strong></a>.
</p>
</div>
</div>
</div>
</section>
<!-- Contact Section -->
<section id="contact" class="contact-us">
<div class="container">
<div class="row">
<div class="col-sm-12 col-lg-6">
<h5 class="text-uppercase">Contact us</h5>
<h2 class="text-uppercase indent-contact">Teztech</h2>
<p class="indent-contact">Feel free to reach us on Twitter, or send an email to <a style="text-decoration:none" href="mailto:hello@teztech.io"><strong>hello@teztech.io!</strong></a> </p>
<a target="_blank" href="https://twitter.com/TezTechLabs" class="float-left btn tzbutton twitter sbutton">
<div class="row p-0">
<div class="col-2 col-lg-2 p-0">
<i class="fab fa-twitter"></i>
</div>
<div class="col-10 col-lg-10 text-left text-social-span">
<span>Follow Us</span> <br>
<span>Twitter</span>
</div>
</div>
</a>
<a target="_blank" href="https://github.com/TezTech" class="float-left btn tzbutton github sbutton ml-3">
<div class="row p-0">
<div class="col-2 col-lg-2 p-0">
<i class="fab fa-github"></i>
</div>
<div class="col-10 col-lg-10 text-left text-social-span">
<span>Check-out</span> <br>
<span>Github</span>
</div>
</div>
</a>
</div>
<div class="col-sm-12 col-lg-6 contact-img">
<img class="lg-img" src="img/contactus/illustrationFooter.png">
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer class="footer">
<div class="container">
<div class="row">
<div class="col-6 col-xs-6 col-md-6 col-lg-6">
<a class="navbar-brand js-scroll-trigger" href="#page-top">
<img style="width:167px;height:52px;" src="img/logo/logo.png">
</a>
</div>
<div class="col-6 col-xs-6 col-md-6 col-lg-6 text-right social-icons">
<a target="_blank" href="https://twitter.com/TezTechLabs"><i class="fab fa-twitter"></i></a>
<a target="_blank" href="https://github.com/TezTech"><i class="fab fa-github"></i></a>
</div>
</div>
</div>
</footer>
<div class="copyright text-center text-white">
<div class="container">
<small>Copyright © TezVote 2019</small>
</div>
</div>
<!-- Scroll to Top Button (Only visible on small and extra-small screen sizes) -->
<div class="scroll-to-top d-lg-none position-fixed ">
<a class="js-scroll-trigger d-block text-center text-white rounded" href="#page-top">
<i class="fa fa-chevron-up"></i>
</a>
</div>
<!-- Bootstrap core JavaScript -->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Plugin JavaScript -->
<script src="vendor/jquery-easing/jquery.easing.min.js"></script>
<script src="vendor/magnific-popup/jquery.magnific-popup.min.js"></script>
<!-- Contact Form JavaScript -->
<script src="js/jqBootstrapValidation.js"></script>
<script src="js/contact_me.js"></script>
<!-- Custom scripts for this template -->
<script src="js/freelancer.min.js"></script>
<script>
function formatMoney(n, c, d, t) {
var c = isNaN(c = Math.abs(c)) ? 2 : c,
d = d === undefined ? "." : d,
t = t === undefined ? "," : t,
s = n < 0 ? "-" : "",
i = String(parseInt(n = Math.abs(Number(n) || 0).toFixed(c))),
j = (j = i.length) > 3 ? j % 3 : 0;
return s + (j ? i.substr(0, j) + t : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + t) + (c ? d + Math.abs(n - i).toFixed(c).slice(2) : "");
}
function displayPercent(a, b){
if (b == 0) return "-";
return (Math.round((a/b)*10000)/100).toFixed(2) + "%";
}
function displayTez(a){
return formatMoney((a/1000000).toFixed(0), 0) + "ꜩ";
}
function displayRolls(a){
return formatMoney(a, 0);
}
function viewStats(d){
if(typeof d == 'undefined') d =''
$.getJSON("https://api.tezvote.com/?delegate="+d, function( data ) {
if (d){
$('#filtered').html("Selected Baker");
$("#stakingBalance").html(displayRolls(data.staking_rolls) + " rolls ("+displayPercent(data.staking_balance,data.network_balance)+" of network)");
} else {
$('#filtered').html("Entire Network");
$("#stakingBalance").html(displayRolls(data.staking_rolls) + " rolls");
}
$("#participation").html(displayPercent(data.total, data.staking_balance));
$("#proposal1").html(displayPercent(data[1], data.total));
$("#proposal2").html(displayPercent(data[2], data.total));
$("#proposal0").html(displayPercent(data[0], data.total));
});
}
$('document').ready(function(){
viewStats();
$('#filterButton').click(function(){
var b = $('#baker').val().trim();
if (!validBakerAddress(b)) return alert("Please enter a valid baker");
viewStats(b);
});
$('#clearButton').click(function(){
$('#baker').val('');
viewStats();
});
$(window).resize(function() {
var windowsize = $(window).width();
if (windowsize > 992) {
$('#navbarResponsive').removeClass('show');
}
});
function checkWidth() {
var windowsize = $(window).width();
console.log(windowsize);
// if (windowsize > 440) {
// }
}
});
function validBakerAddress(){
return true;
}
function vote(n){
$('#votetable').slideDown();
$('#pref').html(n);
$('.voteBtn').removeClass('active');
$('.vb'+n).addClass('active');
$('#transfer-details').show();
}
$(".btn-group > .btn").click(function(){
$(".btn-group > .btn").removeClass("active");
$(this).addClass("active");
});
function iconChange(element){
if (element.id === 'bProp1'){
document.getElementById("propIcon").src = "img/global/gas_circle.png"
}
else if (element.id === 'bProp2'){
document.getElementById("propIcon").src = "img/global/gas_cookie_circle.png"
}
else if (element.id === 'bUnsure'){
document.getElementById("propIcon").src = "img/global/question_circle.png"
}
}
$('#tezTb li').on('click', function() {
$('.dropdown-toggle').html($(this).find('button').html());
});
</script>
</body>
</html>