-
Notifications
You must be signed in to change notification settings - Fork 19
/
index.html
52 lines (50 loc) · 1.51 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
<!DOCTYPE html>
<html>
<head>
<title>Backbone demo</title>
<link rel="stylesheet" href="css/demo.css" type="text/css" media="screen" />
<!-- Embedded templates -->
<script type="text/jquery-x-template" id="comment-template">
<button class="edit">Edit</button>
<button class="delete">Delete</button>
<button class="reverse">Reverse text</button>
<strong>{{author}}</strong><br />
{{{text}}}
</script>
<script type="text/jquery-x-template" id="form-template">
<strong>Comment edit</strong>
<form>
<input type="text" name="author" value="{{author}}" placeholder="Author name" class="author" /><br />
<textarea name="text" placeholder"Comment text" class="text">{{text}}</textarea>
<button class="submit"> Submit </button>
<button class="cancel"> Cancel </button>
</form>
</script>
</head>
<body>
<!-- Application container element -->
<div id="application">
<a href="#" class="newcomment button">Create new comment</a>
<a href="#" class="randomcomment button">Create random comments</a>
<ul class="commentlist"></ul>
</div>
<!-- Application init -->
<script type="text/javascript" src="js/lib/require.js"></script>
<script type="text/javascript">
require.config({
baseUrl: 'js/',
paths: {
'backbone': 'lib/backbone',
'underscore': 'lib/underscore',
'jquery': 'lib/jquery',
'mustache': 'lib/mustache'
}
});
require(['app/app'], function (App) {
new App({
el: $('#application')
});
});
</script>
</body>
</html>