Last active
August 29, 2015 14:01
-
-
Save ELLIOTTCABLE/27d822c6cc632a2f2226 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{#outer}} | |
123 456 | |
{{/outer}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abc def | |
{{yield}} | |
ghi jkl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nest_template = (template)-> -> (content, outer_render)-> | |
view = Object.create this | |
view.yield = -> outer_render content | |
mustache.render template, view, templates | |
app = connect() | |
# ... | |
.use (i, o, next)-> | |
# ... | |
view = | |
outer: nest_template templates.outer | |
o.setHeader 'Content-Type', 'text/html' | |
o.end mustache.render templates.landing, view, templates |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment