forked from facebookarchive/Todo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·109 lines (91 loc) · 3.33 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Parse JavaScript Todo App</title>
<link href="css/todos.css" media="all" rel="stylesheet" type="text/css"/>
<script src="http://code.jquery.com/jquery-2.0.3.min.js"></script>
<script src="js/underscore.js"></script>
<script src="http://www.parsecdn.com/js/parse-1.2.13.min.js"></script>
<script src="js/todos.js"></script>
</head>
<body>
<!-- Todo App Interface -->
<div id="todoapp">
<div class="title">
<h1>Parse Todos</h1>
</div>
<div class="content">
</div>
</div>
<div id="credits">
Powered by <a href="https://www.parse.com">Parse</a> using the <a href="https://www.parse.com/docs/js_guide">JavaScript SDK</a>.<br /><br />
Learn how we built it in the <a href='https://parse.com/tutorials/todo-app-with-javascript'>tutorial</a>.
</div>
<!-- Templates -->
<script type="text/template" id="login-template">
<header id="header"></header>
<div class="login">
<form class="login-form">
<h2>Log In</h2>
<div class="error" style="display:none"></div>
<input type="text" id="login-username" placeholder="Username" />
<input type="password" id="login-password" placeholder="Password" />
<button>Log In</button>
</form>
<form class="signup-form">
<h2>Sign Up</h2>
<div class="error" style="display:none"></div>
<input type="text" id="signup-username" placeholder="Username" />
<input type="password" id="signup-password" placeholder="Create a Password" />
<button>Sign Up</button>
</form>
</div>
</script>
<script type="text/template" id="manage-todos-template">
<div id="user-info">
Signed in as <%= Parse.User.current().escape("username") %> (<a href="#" class="log-out">Log out</a>)
</div>
<div class="section">
<header id="header">
<input id="new-todo" placeholder="What needs to be done?" type="text" />
</header>
<div id="main">
<input id="toggle-all" type="checkbox">
<label for="toggle-all">Mark all as complete</label>
<ul id="todo-list">
<img src='images/spinner.gif' class='spinner' />
</ul>
</div>
<div id="todo-stats"></div>
</div>
</script>
<script type="text/template" id="item-template">
<li class="<%= done ? 'completed' : '' %>">
<div class="view">
<input class="toggle" type="checkbox" <%= done ? 'checked="checked"' : '' %>>
<label class="todo-content"><%= _.escape(content) %></label>
<button class="todo-destroy"></button>
</div>
<input class="edit" value="<%= _.escape(content) %>">
</li>
</script>
<script type="text/template" id="stats-template">
<footer id="footer">
<span id="todo-count"><strong><%= remaining %></strong> <%= remaining == 1 ? 'item' : 'items' %> left</span>
<ul id="filters">
<li>
<a href="javascript:void(0)" id="all" class="selected">All</a>
</li>
<li>
<a href="javascript:void(0)" id="active">Active</a>
</li>
<li>
<a href="javascript:void(0)" id="completed">Completed</a>
</li>
</ul>
<button id="clear-completed">Clear completed (<%= done %>)</button>
</footer>
</script>
</body>
</html>