forked from stecb/mustachejs-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·86 lines (73 loc) · 2.43 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
<meta name="description" content="">
<meta name="author" content="">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="stylesheet" href="css/style.css">
<script src="js/libs/modernizr-2.0.6.min.js"></script>
</head>
<body>
<div id="container">
<header>
<h1>{{Mustache}}js Examples</h1>
</header>
<div id="main" role="main">
<ul class="examples">
<li id="example-1">
<h2>Example #1, simple mustache use + event delegation</h2>
<div class="textarea-wrapper">
<textarea><div class="file" id="{{id}}">
<img src="{{thumb}}" />
<div class="info">
{{first_name}} {{last_name}} ({{profession}}, awesomeness {{awesomeness}})
{{#canPlayJazz}}<p> Can play jazz :)</p>{{/canPlayJazz}}
{{^canPlayJazz}}<p> Can't play jazz :(</p>{{/canPlayJazz}}
</div>
<ul>
{{#gear}}
<li>{{.}}</li>
{{/gear}}
{{^gear}}<li>No gear, won't play :(</li>{{/gear}}
</ul>
</div></textarea>
</div>
<button class="render">Render</button>
<div class="result-placeholder"></div>
</li>
<li id="example-2">
<h2>Example #2, Partials</h2>
<div class="textarea-wrapper">
<textarea>Items in stock:
<ul class="stock">
{{#instruments}}<li>{{name}}{{>details}}</li>{{/instruments}}
</ul></textarea>
</div>
<label>
Items to generate <input type="number" class="howmany" />
</label>
<button class="render">Render</button>
<div class="result-placeholder"></div>
</li>
<li id="example-3">
<h2>Example #3, external JSON</h2>
<iframe style="width: 100%; height: 400px; border:none;" src="http://jsfiddle.net/steweb/mjRwW/embedded/"></iframe>
</li>
</ul>
</div>
<footer>
<a href="http://twitter.com/stecb">@stecb</a>
</footer>
</div> <!--! end of #container -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/libs/jquery-1.6.2.min.js"><\/script>')</script>
<script src="js/libs/mustache.js"></script>
<!-- scripts concatenated and minified via ant build script-->
<script src="js/plugins.js"></script>
<script src="js/script.js"></script>
<!-- end scripts-->
</body>
</html>