123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <!-- Predefined "head" template -->
- <head>
- <title>Todo List</title>
- </head>
- <!-- Predefined "body" template -->
- <body>
- <div class="container">
- <header>
- <h1>Todo List ({{incompleteCount}})</h1>
- <label class="hide-completed">
- <input type="checkbox" checked="{{hideCompleted}}" />
- Hide completed tasks
- </label>
- {{> loginButtons}}
- <!-- add a form below the h1 -->
- {{#if currentUser}}
- <form class="new-task">
- <input type="text" name="text" placeholder="Type to add new tasks" />
- </form>
- {{/if}}
- </header>
- <ul>
- {{#each tasks}}
- {{> task}}
- {{/each}}
- </ul>
- </div>
- </body>
- <!-- Custom "task" template -->
- <template name="task">
- <li class="{{#if checked}}checked{{/if}}">
- <button class="delete">×</button>
- <input type="checkbox" checked="{{checked}}" class="toggle-checked" />
- <span class="text"><strong>{{username}}</strong> - {{text}}</span>
- </li>
- </template>
|