Skip to content

Instantly share code, notes, and snippets.

@mauricemach
Created October 28, 2010 04:06
Show Gist options
  • Select an option

  • Save mauricemach/650620 to your computer and use it in GitHub Desktop.

Select an option

Save mauricemach/650620 to your computer and use it in GitHub Desktop.
ck = require 'coffeekup'
template = ->
doctype 5
html ->
head ->
title 'title'
body ->
render @user_panel, user: @user
user_panel = ->
p "Hi #{@user}!"
p -> a href: '/signout', -> 'Sign Out'
render = (tpl, data) ->
ck.render tpl, context: data
puts ck.render template, locals: {render: render}, context: {user_panel: user_panel, user: 'Waldo'}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment