index.html 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Todo</title>
  5. <meta charset="utf-8">
  6. <link rel="stylesheet" type="text/css" href="todomvc.css">
  7. <link rel="stylesheet" type="text/css" href="custom.css">
  8. </head>
  9. <body>
  10. <section id="todoapp" sd-controller="Todos" sd-class="filter">
  11. <header id="header">
  12. <h1>todos</h1>
  13. <!-- main input box -->
  14. <input
  15. id="new-todo"
  16. autofocus
  17. sd-on="keyup:addTodo | key enter"
  18. placeholder="What needs to be done?"
  19. >
  20. </header>
  21. <section id="main" sd-show="total">
  22. <!-- toggle all checkbox-->
  23. <input
  24. id="toggle-all"
  25. type="checkbox"
  26. sd-checked="allDone"
  27. >
  28. <ul id="todo-list">
  29. <!-- a single todo item -->
  30. <li
  31. sd-each="todo:todos"
  32. sd-class="completed:todo.done, editing:todo.editing"
  33. >
  34. <div class="view">
  35. <input
  36. class="toggle"
  37. type="checkbox"
  38. sd-checked="todo.done"
  39. sd-on="change:updateCount"
  40. >
  41. <label
  42. sd-text="todo.text"
  43. sd-on="dblclick:edit"
  44. ></label>
  45. <button class="destroy" sd-on="click:removeTodo"></button>
  46. </div>
  47. <input
  48. class="edit"
  49. type="text"
  50. sd-focus="todo.editing"
  51. sd-on="blur:stopEdit, keyup:stopEdit | key enter"
  52. sd-value="todo.text"
  53. >
  54. </li>
  55. </ul>
  56. </section>
  57. <!-- footer controls -->
  58. <footer id="footer" sd-show="total">
  59. <span id="todo-count">
  60. <strong>{{remaining}}</strong> {{itemLabel}} left
  61. </span>
  62. <ul id="filters">
  63. <li><a href="#/all" data-filter="all" sd-on="click:setFilter">All</a></li>
  64. <li><a href="#/active" data-filter="active" sd-on="click:setFilter">Active</a></li>
  65. <li><a href="#/completed" data-filter="completed" sd-on="click:setFilter">Completed</a></li>
  66. </ul>
  67. <button id="clear-completed" sd-on="click:removeCompleted">
  68. Remove Completed ({{completed}})
  69. </button>
  70. </footer>
  71. </section>
  72. <!-- info -->
  73. <footer id="info">
  74. <p>Double-click to edit a todo</p>
  75. <p>Powered by <a href="https://github.com/yyx990803/seed">Seed.js</a></p>
  76. <p>Created by <a href="http://evanyou.me">Evan You</a></p>
  77. </footer>
  78. <!-- js -->
  79. <script src="../../dist/seed.js"></script>
  80. <script src="app.js"></script>
  81. </body>
  82. </html>