Skip to content

Instantly share code, notes, and snippets.

@lefnire
Created June 29, 2013 21:57
Show Gist options
  • Save lefnire/5892836 to your computer and use it in GitHub Desktop.
Save lefnire/5892836 to your computer and use it in GitHub Desktop.
derby-examples/todos #282 part2
diff --git a/todos/views/todos/index.html b/todos/views/todos/index.html
index 874c8cd..cf8de8b 100644
--- a/todos/views/todos/index.html
+++ b/todos/views/todos/index.html
@@ -3,19 +3,23 @@
<Body:>
<div id="overlay"></div>
- <form id="head" x-bind="submit: add">
- <h1>Todos <span>{remaining(_page.list)} remaining</span></h1>
- <div id="add">
- <div id="add-input"><input id="new-todo" value="{_page.newTodo}"></div>
- <input id="add-button" type="submit" value="Add">
+ <!-- May have multiple lists (Habit does) -->
+ <app:todo-list list="{_page.list}" />
+
+<todo-list:>
+ <form id="head" x-bind="submit: add">
+ <h1>Todos <span>{remaining(@list)} remaining</span></h1>
+ <div id="add">
+ <div id="add-input"><input id="new-todo" value="{_page.newTodo}"></div>
+ <input id="add-button" type="submit" value="Add">
+ </div>
+ </form>
+ <div id="dragbox"></div>
+ <div id="todos">
+ {#each @list as :todo}
+ <app:todo>
+ {/}
</div>
- </form>
- <div id="dragbox"></div>
- <div id="todos">
- {#each _page.list as :todo}
- <app:todo>
- {/}
- </div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment