70 lines (55 sloc) 1.79 KB
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>Backbone.js Todos</title>
<link rel="stylesheet" href="todos.css"/>
<div id="todoapp">
<input id="new-todo" type="text" placeholder="What needs to be done?">
<section id="main">
<input id="toggle-all" type="checkbox">
<label for="toggle-all">Mark all as complete</label>
<ul id="todo-list"></ul>
<a id="clear-completed">Clear completed</a>
<div id="todo-count"></div>
<div id="instructions">
Double-click to edit a todo.
<div id="credits">
Created by
<br />
<a href="">J&eacute;r&ocirc;me Gravel-Niquet</a>.
<br />Rewritten by: <a href="">TodoMVC</a>.
<script src="../../test/vendor/json2.js"></script>
<script src="../../test/vendor/jquery.js"></script>
<script src="../../test/vendor/underscore.js"></script>
<script src="../../backbone.js"></script>
<script src="../backbone.localStorage.js"></script>
<script src="todos.js"></script>
<!-- Templates -->
<script type="text/template" id="item-template">
<div class="view">
<input class="toggle" type="checkbox" <%= done ? 'checked="checked"' : '' %> />
<label><%- title %></label>
<a class="destroy"></a>
<input class="edit" type="text" value="<%- title %>" />
<script type="text/template" id="stats-template">
<% if (done) { %>
<a id="clear-completed">Clear <%= done %> completed <%= done == 1 ? 'item' : 'items' %></a>
<% } %>
<div class="todo-count"><b><%= remaining %></b> <%= remaining == 1 ? 'item' : 'items' %> left</div>