1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <!-- 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}} {{#if private}}private{{/if}}">
- <button class="delete">×</button>
- <input type="checkbox" checked="{{checked}}" class="toggle-checked" />
- {{#if isOwner}}
- <button class="toggle-private">
- {{#if private}}
- Private
- {{else}}
- Public
- {{/if}}
- </button>
- {{/if}}
- <span class="text"><strong>{{username}}</strong> - {{text}}</span>
- </li>
- </template>
|