UNPKG

todomvc

Version:

> Helping you select an MV\* framework

57 lines (56 loc) 2.21 kB
<!doctype html> <html lang="en" data-framework="canjs"> <head> <meta charset="utf-8"> <title>CanJS + RequireJS • TodoMVC</title> <link rel="stylesheet" href="bower_components/todomvc-common/base.css"> </head> <body> <section id="todoapp"></section> <footer id="info"> <p>Double-click to edit a todo</p> <p>Written by <a href="http://bitovi.com">Bitovi</a></p> <p>Part of <a href="http://todomvc.com">TodoMVC</a></p> </footer> <script type="text/mustache" id="app-template"> <todo-app> <header id="header"> <h1>todos</h1> <input id="new-todo" placeholder="What needs to be done?" autofocus="" can-enter="createTodo"> </header> <section id="main" class="{{^if todos.length}}hidden{{/if}}"> <input id="toggle-all" type="checkbox" {{#if todos.allComplete}}checked="checked"{{/if}} can-click="toggleAll"> <label for="toggle-all">Mark all as complete</label> <ul id="todo-list"> {{#each displayList}} <li class="todo{{#if complete}} completed{{/if}}{{#if editing}} editing{{/if}}"> <div class="view"> <input class="toggle" type="checkbox" can-value="complete"> <label can-dblclick="edit">{{text}}</label> <button class="destroy" can-click="destroy"></button> </div> <input class="edit" type="text" value="{{text}}" can-blur="updateTodo" can-keyup="cancelEditing" can-enter="updateTodo"> </li> {{/each}} </ul> </section> <footer id="footer" class="{{^if todos.length}}hidden{{/if}}"> <span id="todo-count"> <strong>{{todos.remaining}}</strong> {{plural "item" todos.remaining}} left </span> <ul id="filters"> <li>{{{link "All" undefined}}}</li> <li>{{{link "Active" "active"}}}</li> <li>{{{link "Completed" "completed"}}}</li> </ul> <button id="clear-completed" class="{{^if todos.completed.length}}hidden{{/if}}" can-click="clearCompleted"> Clear completed ({{todos.completed.length}}) </button> </footer> </todo-app> </script> <script src="bower_components/todomvc-common/base.js"></script> <script data-main="js/app" src="bower_components/requirejs/require.js"></script> </body> </html>