Commit 2b46d3e4 authored by addyosmani's avatar addyosmani

Initial changes to bring application up to spec.

parent b0624d35
/*
html,
body {
margin: 0;
......@@ -205,3 +206,4 @@ body {
#credits a {
color: #888;
}
*/
\ No newline at end of file
......@@ -2,62 +2,62 @@
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Backbone.js</title>
<link rel="stylesheet" href="css/app.css"/>
<link rel="stylesheet" href="../../assets/base.css"/>
</head>
<body>
<div id="todoapp">
<header>
<section id="todoapp">
<header id="header">
<h1>Todos</h1>
<input id="new-todo" type="text" placeholder="What needs to be done?">
<input id="new-todo" placeholder="What needs to be done?" autofocus>
</header>
<section id="main">
<input id="toggle-all" type="checkbox">
<label for="toggle-all">Mark all as complete</label>
<ul id="todo-list">
</ul>
<ul id="todo-list"></ul>
</section>
<footer>
<a id="clear-completed">Clear completed</a>
<div id="todo-count"></div>
</footer>
</div>
<div id="instructions">
Double-click to edit a todo.
</div>
<div id="credits">
Created by
<br />
<a href="http://jgn.me/">J&eacute;r&ocirc;me Gravel-Niquet</a>.
<br />Cleanup, edits: <a href="http://addyosmani.com">Addy Osmani</a>, <a href="http://github.com/boushley">Aaron Boushley</a>.
</div>
</section>
<footer id="info">
<p>Double-click to edit a todo</p>
<p>Created by <a href="http://addyosmani.github.com/todomvc/">Addy Osmani</a></p>
<p>Part of <a href="http://todomvc.com">TodoMVC</a></p>
</footer>
<script src="js/libs/json2.js"></script>
<script src="js/libs/jquery-1.7.1.min.js"></script>
<script src="../../assets/jquery.min.js"></script>
<script src="js/libs/underscore.js"></script>
<script src="js/libs/backbone.js"></script>
<script src="js/libs/backbone-localstorage.js"></script>
<script src="js/app.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>
<button class="destroy"></button>
</div>
<input class="edit" type="text" value="<%= title %>" />
</script>
<script type="text/template" id="stats-template">
<% if (done) { %>
<a id="clear-completed">Clear <%= done %> completed <%= done == 1 ? 'item' : 'items' %></a>
<footer id="footer">
<span id="todo-count"><strong><%= remaining %></strong> <%= remaining == 1 ? 'item' : 'items' %> left</span>
<ul id="filters">
<li>
<a class="selected" href="#/">All</a>
</li>
<li>
<a href="#/active">Active</a>
</li>
<li>
<a href="#/completed">Completed</a>
</li>
</ul>
<% if (done) { %>
<button id="clear-completed">Clear <%= done %> completed <%= done == 1 ? 'item' : 'items' %></button>
<% } %>
<div class="todo-count"><b><%= remaining %></b> <%= remaining == 1 ? 'item' : 'items' %> left</div>
</footer>
</script>
</body>
</html>
</html>
\ No newline at end of file
// An example Backbone application contributed by
// [Jérôme Gravel-Niquet](http://jgn.me/). This demo uses a simple
// [LocalStorage adapter](backbone-localstorage.js)
// to persist Backbone models within your browser.
// Load the application once the DOM is ready, using `jQuery.ready`:
$(function(){
......@@ -92,7 +87,7 @@ $(function(){
events: {
"click .toggle" : "toggleDone",
"dblclick .view" : "edit",
"click a.destroy" : "clear",
"click .destroy" : "clear",
"keypress .edit" : "updateOnEnter",
"blur .edit" : "close"
},
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
# Template • [TodoMVC](http://todomvc.com)
## Getting Started
Read the [App Specification](https://github.com/addyosmani/todomvc/wiki/App-Specification) before touching the template.
## Need help?
Feel free to [contact me](https://github.com/sindresorhus) if you have any questions or need help with the template.
## Credit
Created by [Sindre Sorhus](http://sindresorhus.com)
\ No newline at end of file
......@@ -2,51 +2,69 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Template - TodoMVC</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Template • TodoMVC</title>
<link rel="stylesheet" href="../assets/base.css">
<!-- CSS overrides - remove if you don't need it -->
<link rel="stylesheet" href="css/app.css">
</head>
<body>
<div id="todoapp">
<header>
<h1>Todos</h1>
<input id="new-todo" type="text" placeholder="What needs to be done?">
<section id="todoapp">
<header id="header">
<h1>todos</h1>
<input id="new-todo" placeholder="What needs to be done?" autofocus>
</header>
<!-- this section is hidden by default and you be shown when there are todos and hidden when not -->
<!-- this section should be hidden by default and shown when there are todos -->
<section id="main">
<input id="toggle-all" type="checkbox">
<label for="toggle-all">Mark all as complete</label>
<ul id="todo-list">
<li class="done">
<!-- these are here just to show the structure of the list items -->
<!-- list items should get the class `editing` when editing and `completed` when marked as completed -->
<li class="completed">
<div class="view">
<input class="toggle" type="checkbox" checked>
<label>Create a TodoMVC template</label>
<a class="destroy"></a>
<button class="destroy"></button>
</div>
<input class="edit" type="text" value="Create a TodoMVC template">
<input class="edit" value="Create a TodoMVC template">
</li>
<li>
<div class="view">
<input class="toggle" type="checkbox">
<label>Rule the web</label>
<a class="destroy"></a>
<button class="destroy"></button>
</div>
<input class="edit" type="text" value="Rule the web">
<input class="edit" value="Rule the web">
</li>
</ul>
</section>
<!-- this footer needs to be shown with JS when there are todos and hidden when not -->
<footer>
<a id="clear-completed">Clear completed</a>
<div id="todo-count"></div>
<!-- this footer should hidden by default and shown when there are todos -->
<footer id="footer">
<!-- this should be `0 items left` by default -->
<span id="todo-count"><strong>1</strong> item left</span>
<!-- remove this if you don't implement routing -->
<ul id="filters">
<li>
<a class="selected" href="#/">All</a>
</li>
<li>
<a href="#/active">Active</a>
</li>
<li>
<a href="#/completed">Completed</a>
</li>
</ul>
<button id="clear-completed">Clear completed (1)</button>
</footer>
</div>
<div id="instructions">
Double-click to edit a todo.
</div>
<div id="credits">
Created by <a href="http://addyosmani.github.com/todomvc/">you</a>.
</div>
</section>
<footer id="info">
<p>Double-click to edit a todo</p>
<p>Template by <a href="http://sindresorhus.com">Sindre Sorhus</a></p>
<!-- change this out with your name and url ↓ -->
<p>Created by <a href="http://addyosmani.github.com/todomvc/">you</a></p>
<p>Part of <a href="http://todomvc.com">TodoMVC</a></p>
</footer>
<!-- scripts here -->
<script src="js/app.js"></script>
</body>
......
/*
(function( window ) {
'use strict';
[MIT licensed](http://en.wikipedia.org/wiki/MIT_License)
(c) [You](http://addyosmani.github.com/todomvc/)
// Your starting point. Enjoy the ride!
*/
(function() {
// Your starting point. Enjoy the ride!
})();
\ No newline at end of file
})( window );
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment