brave
Version:
Old school web application library
16 lines (15 loc) • 565 B
HTML
<table as="table">
<caption><%= data.name %></caption>
<tbody as="body">
<% for (var i = 0; i < data.todos.length; i++) { %>
<tr item="todos[<%= i %>]"></tr>
<% } %>
</tbody>
<tfoot>
<tr>
<td><input id="new-todo" as="newTodoText" type="text" value="<%= data.newTodo.text %>" placeholder="Add new todo"></td>
<td><button id="add-todo" as="addTodo" disabled>Add new</button></td>
<td><button id="clear-todos" as="clearTodos" <%= hasCompleted ? '' : 'disabled' %>>Clear completed</button></td>
</tr>
</tfoot>
</table>