-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
73 lines (72 loc) · 2.08 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
<!DOCTYPE html>
<html lang='en'>
<head>
<title>Backbone Todo Demo with Coffeescript</title>
<link href="todos.css" media="all" rel="stylesheet" type="text/css"/>
<script src="lib/json2.js"></script>
<script src="lib/jquery-1.7.2.js"></script>
<script src="lib/underscore.js"></script>
<script src="lib/backbone.js"></script>
<script src="lib/backbone-localstorage.js"></script>
<script src="todos.js"></script>
</head>
<body>
<div id='todoapp'>
<header>
<h1>
Todos
</h1>
<input id='new-todo' type='text' placeholder='What needs to be done?'>
</header>
<section id='main' style='display: none'>
<input id='toggle-all' type='checkbox'>
<label for='toggle-all'>
Mark all as complete
</label>
<ul id='todo-list'>
</ul>
</section>
<footer style='display: none'>
<a id="clear-completed">
Clear completed
</a>
<div id="todo-count">
</div>
</footer>
</div>
<div id='instructions'>
Double Click to edit a todo.
</div>
<!-- Templates -->
<script type='text/template' id='item_template'>
<div class="todo <%= done ? 'done' : '' %>">
<div class="display">
<input class="check" type="checkbox" <%= done ? 'checked="checked"' : '' %> />
<div class="todo-content">
</div>
<span class="todo-destroy">
</span>
</div>
<div class="edit">
<input class="todo-input" type="text" value="" />
</div>
</div>
</script>
<script type='text/template' id='stats_template'>
<% if (total) { %>
<span class="todo-count">
<span class="number"><%= remaining %></span>
<span class="word"><%= remaining == 1 ? 'item' : 'items' %></span> left.
</span>
<% } %>
<% if (done) { %>
<span class="todo-clear">
<a href="#">
Clear <span class="number-done"><%= done %></span>
completed <span class="word-done"><%= done == 1 ? 'item' : 'items' %></span>
</a>
</span>
<% } %>
</script>
</body>
</html>