Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

56 lines (47 sloc) 0.966 kb
require('./zappajs') ->
@get
'/': ->
@render 'index', foo: 'bar'
'/eco': ->
@render 'index.eco', foo: 'bar'
'/jade': ->
@render 'index.jade', foo: 'bar'
@view index: ->
h2 'CoffeeCup inline template'
p @foo
@view layout: ->
doctype 5
html ->
head ->
title 'CoffeeCup inline layout'
body ->
h1 'CoffeeCup inline layout'
@body
@view 'index.eco': '''
<h2>Eco inline template</h2>
<p><%= @foo %></p>
'''
@view 'layout.eco': '''
<!DOCTYPE html>
<html>
<head>
<title>Eco inline layout</title>
<body>
<h1>Eco inline layout</h1>
<%- @body %>
</body>
</html>
'''
@view 'index.jade': '''
h2 Jade inline template
p= foo
'''
@view 'layout.jade': '''
!!! 5
html
head
title Jade inline layout
body
h1 Jade inline layout
!= body
'''
Jump to Line
Something went wrong with that request. Please try again.