-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
54 lines (51 loc) · 2.36 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
<!DOCTYPE html>
<html ng-app="app">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/4.6.1/css/bootstrap.min.css">
<link rel="stylesheet" href="style.css">
<link rel="shortcut icon" href="favicon.png">
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0">
<title>Sorteador Amigo Secreto</title>
</head>
<body ng-controller="MainController">
<div class="container">
<h1>Sorteador Amigo Secreto</h1>
<h5>Adicione os participantes:</h5>
<div class="form">
<div class="form">
<input ng-keydown="enter($event)" type="text" ng-model="nome" class="form-control" placeholder="Nome">
<input ng-keydown="enter($event)" type="email" ng-model="email" class="form-control ml-2" placeholder="E-mail">
<button ng-click="adicionarParticipante()" class="btn btn-success ml-3">Adicionar</button>
<button ng-click="limparParticipantes()" class="btn btn-light ml-2">Limpar</button>
</div>
</div>
<table class="table table-bordered">
<thead class="thead-light">
<th>Nome</th>
<th>E-mail</th>
</thead>
<tbody>
<tr ng-repeat="(key, participante) in participantes">
<td>
<span ng-bind="participante.nome"></span>
<a href="" ng-click="removerParticipante(key)">×</a>
</td>
<td ng-bind="participante.email"></td>
</tr>
</tbody>
</table>
<div class="form mb-4">
<div class="form">
<input type="text" ng-model="sorteio" class="form-control" placeholder="Nome do sorteio (ex: Natal 25/12)">
<button ng-disabled="disabled" ng-click="realizarSorteio()" class="btn btn-primary ml-3" ng-bind="status"></button>
</div>
</div>
<div class="copy">
Desenvolvido por <a href="https://eugabrielsilva.tk" target="_blank">Gabriel Silva</a>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.8.3/angular.min.js"></script>
<script src="script.js"></script>
</body>
</html>