-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
137 lines (118 loc) · 5.6 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
<!-- index.html -->
<!doctype html>
<!-- ASSIGN OUR ANGULAR MODULE -->
<html lang="en" ng-app="myTodo">
<head>
<!-- META -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <!-- Optimizess mobile viewport -->
<title>Node/Angular Todo App</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<!-- load bootstrap -->
<style>
html {
overflow-y: scroll;
}
#todo-list {
margin-bottom: 30px;
}
#todo-form{
margin-bottom: 50px;
}
#todo-adder{
display: flex;
justify-content: center;
}
.btn-outline-success{
color: #FFCC66;
border-color:#FFCC66;
}
.btn-outline-success:hover {
background-color: #FFCC66;
border-color: #FFCC66;
}
.todo-bar{
background: #3F7FBF;
border-color: #2968A7;
}
</style>
<!-- load css file -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<!-- load jquery -->
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.8/angular.min.js"></script>
<!-- load angular -->
</head>
<!-- SET THE CONTROLLER AND GET ALL TODOS -->
<body ng-controller="mainController">
<nav class="navbar navbar-expand-lg navbar-dark" style="background-color: #3F7FBF">
<a class="navbar-brand" href="#">TodoList</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="#">Home
<span class="sr-only">(current)</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Account</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true"
aria-expanded="false">
Category
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="#">Study</a>
<a class="dropdown-item" href="#">Work</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#">Fun</a>
</div>
</li>
</ul>
<form class="form-inline my-2 my-lg-0">
<input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
</form>
</div>
</nav>
<div class="container">
<div class="jombotron text-center">
<h1>TDL a convenient todo list app</h1>
<p style="padding-top: 2em;">Just simply add all the items you want to your todo list down here, then later check them to delete them</p>
<br><h2>number of todos are: <span class="label label-info">{{ todos.length }}</span></h2>
</div>
<div id = "todo-list" class="row">
<div class="col-sm-4 col-sm-offset-4 text-center">
<div class="checkbox" ng-repeat="todo in todos">
<label>
<input type="checkbox" ng-click="deleteTodo(todo._id)">{{ todo.text }}
</label>
</div>
</div>
</div>
<!-- here we create the form(template) for the user to add todos to her list -->
<div id="todo-adder" class="row">
<div class="col-sm-8 col-sm-offset-2 text-center">
<form>
<div class="form-group">
<input type="text" class="form-control input-lg text-center" placeholder="I want to procastinate alll day!"
ng-model="formData.text">
</div>
<button type="submit" class="btn btn-primary btn-lg todo-bar" ng-click="createTodo()">Add Todo</button>
</form>
</div>
</div>
</div>
<script src="core.js"></script>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"
crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"
crossorigin="anonymous"></script>
</body>
</html>