-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
103 lines (83 loc) · 3.71 KB
/
Copy pathindex.html
File metadata and controls
103 lines (83 loc) · 3.71 KB
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Super Simple Backbone Blog</title>
<link href="css/bootstrap.css" rel="stylesheet">
</head>
<body>
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="collapse navbar-collapse" id="main-nav">
<ul class="nav navbar-nav">
<li><a href="#/dashboard">Dashboard</a></li>
<li><a href="#/create-blog">Create Blog</a></li>
</ul>
</div><!--.navbar-collapse-->
</div><!--.container-fluid-->
</nav>
<!--Add container class to content-container-->
<div id="content-container" class="container">
</div>
<script type="text/template" id="dashboard-view-template">
<!--Add div to center our dahsboard using bootstraps grid system-->
<div class="container col-md-offset-3 col-md-6 text-center">
<h1>Dashboard</h1>
<small>{{greeting}}</small>
<!--Utilize Handlebars #each helper to iterate through theBlogs,
use bootstrap classes for a clean look-->
{{#each theBlogs}}
<div class="panel panel-default">
<div class="panel-heading">
<div class="pull-right">
<button type="button" class="btn btn-default btn-xs btn-edit">EDIT</button><!--these buttons do nothing right now-->
<button type="button" class="btn btn-default btn-xs btn-delete">DELETE</button>
</div>
<!--Put the blogTitle here vvvv-->
<h3 class="panel-title">{{blogTitle}}</h3>
</div>
<div class="panel-body">
<!--Put the blogBody here vvvv -->
{{blogBody}}
</div>
</div>
{{/each}} <!--Handlebars will repeat this until there are no more models in theBlogs-->
</div>
</script>
<script type="text/template" id="create-blog-template">
<!--Add div to center our creation screen using bootstraps grid system-->
<div class="container col-md-offset-3 col-md-6 text-center">
<h1>Create A Blog</h1>
<small>{{content}}</small>
<div class="panel panel-default">
<div class="panel-heading">
<!--Put the blogTitle here vvvv-->
<div class="form-group">
<label for="blog-title">Blog Title:</label>
<input type="text" class="form-control" id="blog-title" placeholder="Blog Title">
</div><!--form-group-->
</div><!--panel-heading-->
<div class="panel-body">
<!--Put the blogBody here vvvv -->
<div class="form-group">
<label for="blog-body">Blog Body:</label>
<textarea class="form-control" rows="10" placeholder="Type your blog entry here!" id="blog-body"></textarea>
</div><!--form-group-->
<!--we need a button for the user to press to 'submit' their blog-->
<div>
<button type="button" id="submit-button" class="btn submit-button btn-default col-xs-3 pull-right">Submit</button>
</div>
</div><!--panel-body-->
</div> <!--panel panel-default-->
</div><!--container col-md-offset-3 col-md-6 text-center-->
</script>
<script src="libs/jquery-1.11.3.js"></script> <!--Jquery must come first -->
<script src="libs/underscore-1.8.3.js"></script> <!--We have to load Underscore before backbone-->
<script src="libs/backbone-1.2.0.js"></script>
<script src="libs/handlebars-v3.0.3.js"></script>
<script src="libs/json2.js"></script>
<script src="app/app.js"></script>
</body>
</html>