-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
114 lines (91 loc) · 3.33 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
<!doctype html>
<html ng-app="app_sorteio">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/odometer-theme-car.css" />
<style>
.odometer {
font-size: 40px;
}
</style>
<script src="js/angular.min.js"></script>
<script src="js/underscore.min.js"></script>
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/odometer.min.js"></script>
<script src="js/core.js" type="text/javascript"></script>
<link rel="stylesheet" href="css/style.css">
<title>Sorteio</title>
</head>
<body>
<div class="container" ng-controller="mainController as sorteio">
<!-- Modal -->
<div class="modal fade" id="modal_config" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Configurações</h5>
</div>
<div class="modal-body">
<div class="row">
<div class="col">
<div class="form-group row">
<div class="col">
<label class="col-form-label">Número inicial</label>
<input class="form-control" type="number" min="1" ng-model="sorteio.inicio">
</div>
<div class="col">
<label class="col-form-label">Número final</label>
<input class="form-control" type="number" min="1" ng-model="sorteio.fim">
</div>
<div class="col">
<label class="col-form-label">Quantidade</label>
<input class="form-control" type="number" min="1" ng-model="sorteio.quantidade">
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-danger" ng-click="sorteio.reiniciar()">Reiniciar Sorteio</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">Fechar</button>
</div>
</div>
</div>
</div>
<!-- Titulo -->
<div class="row">
<a href="">
<img src="img/config2.png" data-toggle="modal" data-target="#modal_config">
</a>
<button ng-disabled="sorteio.inicio > sorteio.fim || sorteio.porcentagem == 100" class="btn btn-success"
style="margin-right: 5px;" ng-click="sorteio.sortear()">Sortear</button>
</div>
<!-- Número sorteado -->
<div class="row" ng-show="sorteio.sorteados.length > 0">
<div class="col text-center">
<label ng-show="sorteio.numero_sorteado > 0">Número sorteado</label><br>
<span class="odometer" style="font-size:150px; margin-bottom: 30px;" ng-show="sorteio.numero_sorteado > 0"></span>
</div>
</div>
<!-- Lista sorteada -->
<div class="row" ng-show="sorteio.sorteados.length > 0 && !sorteio.roleta">
<div class="col border border-success rounded p-4">
<div class="form-group">
<label>{{sorteio.mensagem}} | Lista sorteada ({{sorteio.sorteados.length}})</label>
<div class="row">
<div class="d-inline-block" ng-repeat="sorteado in sorteio.sorteados | orderBy : '[]': true">
<h2><span class="badge badge-pill badge-success mr-3">{{sorteado}}</span></h2>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>