Skip to content

Commit

Permalink
Moving to mustache template
Browse files Browse the repository at this point in the history
  • Loading branch information
Zach Moazeni committed May 8, 2012
1 parent 35f51f1 commit 15cdc1d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion coffee/site.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class App extends Spine.Controller
Spine.Route.setup()

renderUser: (user) =>
@content.html("<div>user: #{user.name}</div>")
@content.html(@view("show", user:user))

navigateTo: (e) =>
e.preventDefault()
Expand Down
5 changes: 5 additions & 0 deletions coffee/views.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ views["index"] = """
</form>
"""


views["show"] = """
<div>user: {{user.name}}</div>
"""

views["static"] = """
<header>
<h1><img src="https://secure.gravatar.com/avatar/d46a89672353a9c5258e187c8095ea40?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png" alt="zmoazeni's gravatar" /> Zach Moazeni (zmoazeni)</h1>
Expand Down
4 changes: 3 additions & 1 deletion js/site.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions js/views.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 15cdc1d

Please sign in to comment.