-
Notifications
You must be signed in to change notification settings - Fork 84
/
index.html
40 lines (32 loc) · 1.07 KB
/
index.html
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
28
29
30
31
32
33
34
35
36
37
38
39
40
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Client-side CoffeeKup (Crème)</title>
<!-- jQuery is NOT required, used here for convenience -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script src="http://jashkenas.github.com/coffee-script/extras/coffee-script.js"></script>
<script src="coffeekup.js"></script>
<script type="text/coffeescript">
stooges = ['moe', 'larry', 'curly']
$().ready ->
stringy = """
h2 'Template as string'
ul ->
for guy in @stooges
li guy
"""
codey = ->
h2 'Template as a function'
ul ->
for guy in @stooges
li guy
$('body').append CoffeeKup.render(stringy, stooges: stooges)
$('body').append CoffeeKup.render(codey, stooges: stooges)
</script>
</head>
<body>
<h1>Client-side CoffeeKup (crème)</h1>
<p>Doing everything on the client. Lots of flexibility but a fatty download.</p>
</body>
</html>