Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fixes template inheritance in option 2 #15

Merged
merged 1 commit into from

2 participants

@sv1jsb

This commit fixes a template inheritance error in option 2. Closes #14.

@addyosmani addyosmani merged commit ba94a9a into addyosmani:master
@addyosmani
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 13, 2012
  1. @sv1jsb
This page is out of date. Refresh to see the latest.
Showing with 42 additions and 38 deletions.
  1. +3 −2 option2/views/layout.jade
  2. +39 −36 option2/views/todo.jade
View
5 option2/views/layout.jade
@@ -25,7 +25,8 @@ body
#container
header
- #main(role="main")!=body
+ #main(role="main")
+ block content
footer
//! end of #container
@@ -49,4 +50,4 @@ body
script(src="//ajax.googleapis.com/ajax/libs/chrome-frame/1.0.3/CFInstall.min.js")
script
window.attachEvent('onload',function(){CFInstall.check({mode:'overlay'})})
-</html>
+</html>
View
75 option2/views/todo.jade
@@ -1,40 +1,43 @@
-// Todo App Interface
+extends layout
-#todoapp
- .title
- h1 Todos
- .content
- #create-todo
- input#new-todo(placeholder="What needs to be done?", type="text")
- span.ui-tooltip-top(style="display:none;") Press Enter to save this task
- #todos
- ul#todo-list
- #todo-stats
+block content
+ // Todo App Interface
+ #todoapp
+ .title
+ h1 Todos
+ .content
+ #create-todo
+ input#new-todo(placeholder="What needs to be done?", type="text")
+ span.ui-tooltip-top(style="display:none;") Press Enter to save this task
+ #todos
+ ul#todo-list
+ #todo-stats
-// Templates
-script#item-template(type="text/template")
- <div class="todo <%= done ? 'done' : '' %>">
- .display
- <input class="check" type="checkbox" <%= done ? 'checked="checked"' : '' %> />
- .todo-text
- span#todo-destroy
- .edit
- input.todo-input(type="text", "value"="")
- </div>
-script#stats-template(type="text/template")
- <% if (total) { %>
- span.todo-count
- span.number <%= remaining %>
- span.word <%= remaining == 1 ? 'item' : 'items' %>
- | left.
- <% } %>
- <% if (done) { %>
- span.todo-clear
- a(href="#")
- | Clear
- span.number-done <%= done %>
- | completed
- span.word-done <%= done == 1 ? 'item' : 'items' %>
- <% } %>
+ // Templates
+ script#item-template(type="text/template")
+ <div class="todo <%= done ? 'done' : '' %>">
+ .display
+ <input class="check" type="checkbox" <%= done ? 'checked="checked"' : '' %> />
+ .todo-text
+ span#todo-destroy
+ .edit
+ input.todo-input(type="text", "value"="")
+ </div>
+
+ script#stats-template(type="text/template")
+ <% if (total) { %>
+ span.todo-count
+ span.number <%= remaining %>
+ span.word <%= remaining == 1 ? 'item' : 'items' %>
+ | left.
+ <% } %>
+ <% if (done) { %>
+ span.todo-clear
+ a(href="#")
+ | Clear
+ span.number-done <%= done %>
+ | completed
+ span.word-done <%= done == 1 ? 'item' : 'items' %>
+ <% } %>
Something went wrong with that request. Please try again.