-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
52 lines (50 loc) · 1.75 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>To-Do App</title>
<link rel="stylesheet" type="text/css" href="./css/base.css">
<script src="./js/jquery-2.2.1.js"></script>
<script src="./js/underscore.js"></script>
<script src="./js/moment.min.js"></script>
</head>
<body>
<div class="round-corners">
<div class="user-information">To-do list for Arnold</div>
<hr>
<div class="counter">
</div>
<hr>
<ul class="todo-list"></ul>
<p class="add-button">Double click to add</p>
</div>
<script type="text/template" id="to-do-item-template">
<li class='todo-item' data-todo='<%print(id);%>'>
<button class='remove-button'>Remove</button>
<input type="checkbox" <% if(completed) {print('checked="checked"');}
else{print('')}%>/>
<p class='todo-description' style="text-decoration:<% if(completed){print('line-through');}%> "
><%= description %></p>
<hr>
<p class='time-added'>Added <% print(moment(addedOn).fromNow()); %></p>
<% if(completed) {
print("<p class='time-completed'>Completed " + moment(completedOn).fromNow());
}%>
<hr>
</li>
</script>
<script type="text/template" id="counter-template">
<div class="to-be-done"><strong><%print(toBeDone)%></strong><%if(toBeDone!=1){print(" items to be done")}
else {print(" item to be done")} %>
</div>
<div class="done"><strong><%print(done)%></strong><%if(done!=1){print(" items completed")}
else {print(" item completed")} %>
</div>
</script>
<script src="js/todo.js"></script>
<script src="js/todos.js"></script>
<script src="js/collection-view.js"></script>
<script src="js/events.js"></script>
<script src="js/start.js"></script>
</body>
</html>