-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
58 lines (49 loc) · 2.34 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
<!DOCTYPE html>
<html lang="en" ng-app="app">
<head>
<title>Todo App</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<link href="css/styles.css" rel="stylesheet">
</head>
<body>
<div class="mainContainer" ng-controller="MainController">
<div class="loadingAnimation"></div>
<div class="content" ng-controller="MainController"
ng-style="checkLengthOfTodoList() ? {'background':'#f2f2f2', 'border':'1px solid #ccc'} : {'background': 'transparent', 'border':'none'}">
<div class='form-group'>
<input ng-model="todoBody" type="text" placeholder="Your todo..." title="Write your todo and hit enter."
class="form-control todoInput"
ng-maxlength="25"
submit-enter="addTodo()" autofocus/>
</div>
<ul class='list-group todoList'>
<li ng-repeat='(id, todo) in todos' class='list-group-item'>
{{ todo }}
<button ng-click='removeTodo(id)' ng-show="todoManager"
class='btn btn-default pull-right removeTodoBtn'>❌</button>
</li>
</ul>
<div class='managementButtons' ng-show="checkLengthOfTodoList()">
<button ng-click='todoManager = !todoManager' ng-model="clicked" class='btn btn-default manageTodosButton'>
Manage todos
</button>
<button ng-click='cleanTodos()' class='btn btn-default cleanTodosButton'>Clean</button>
</div>
<button ng-click='exportTodos()' title="Your todos will stay even if the page is reloaded."
ng-show="checkLengthOfTodoList()" class='btn btn-default exportTodosButton'>Save todos
</button>
</div>
</div>
<script src="js/jquery-3.1.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.8/angular.min.js"></script>
<script src="js/angular-animate.min.js"></script>
<script src="js/directives.js"></script>
<script src="js/controllers.js"></script>
<script src="js/scripts.js"></script>
<script>
var app = angular.module('app', ['controllers', 'ngAnimate']);
</script>
</body>
</html>