1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<html>
  <head>
   <script src="http://coffeekup.org/coffeekup.js"></script>
	<script>
if (typeof templates === "undefined" || templates === null) templates = {};

templates.first = function() {
  doctype(5);
  return html(function() {
    head(function() {
      return title("" + this.title);
    });
    return body(function() {
      return h1("" + this.hello);
    });
  });
};
	</script>
  </head>
  <body>
	Hello
	<script>
var out = CoffeeKup.render(templates.first, {title: 'Say Hello', hello: 'Hello World!'});
alert(out);
	</script>
  </body>
</html>