simple-todos.html 963 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <!-- Predefined "head" template -->
  2. <head>
  3. <title>Todo List</title>
  4. </head>
  5. <!-- Predefined "body" template -->
  6. <body>
  7. <div class="container">
  8. <header>
  9. <h1>Todo List ({{incompleteCount}})</h1>
  10. <label class="hide-completed">
  11. <input type="checkbox" checked="{{hideCompleted}}" />
  12. Hide completed tasks
  13. </label>
  14. {{> loginButtons}}
  15. <!-- add a form below the h1 -->
  16. {{#if currentUser}}
  17. <form class="new-task">
  18. <input type="text" name="text" placeholder="Type to add new tasks" />
  19. </form>
  20. {{/if}}
  21. </header>
  22. <ul>
  23. {{#each tasks}}
  24. {{> task}}
  25. {{/each}}
  26. </ul>
  27. </div>
  28. </body>
  29. <!-- Custom "task" template -->
  30. <template name="task">
  31. <li class="{{#if checked}}checked{{/if}}">
  32. <button class="delete">&times;</button>
  33. <input type="checkbox" checked="{{checked}}" class="toggle-checked" />
  34. <span class="text"><strong>{{username}}</strong> - {{text}}</span>
  35. </li>
  36. </template>