1 |
<!DOCTYPE html> |
2 |
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> |
3 |
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> |
4 |
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> |
5 |
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> |
6 |
<head> |
7 |
<meta charset="utf-8"> |
8 |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
9 |
<title> Mouchak - ummm!</title> |
10 |
<meta name="description" content=""> |
11 |
<meta name="viewport" content="width=device-width"> |
12 |
|
13 |
<!-- Place favicon.ico in the root directory --> |
14 |
|
15 |
<link rel="stylesheet" href="/static/css/normalize.css"> |
16 |
<link rel="stylesheet" href="/static/css/bootstrap.css"> |
17 |
<link rel="stylesheet" href="/static/css/main.css"> |
18 |
<script src="/static/js/lib/modernizr-2.6.1.min.js"></script> |
19 |
</head> |
20 |
<body> |
21 |
<!--[if lt IE 7]> |
22 |
<p class="chromeframe">You are using an outdated browser. <a href="http://browsehappy.com/">Upgrade your browser today</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to better experience this site.</p> |
23 |
<![endif]--> |
24 |
|
25 |
<div class="container" id="container"> |
26 |
<div id="header"></div> |
27 |
<div id="content-container"> |
28 |
<div class="clearfix"></div> |
29 |
</div> |
30 |
</div> |
31 |
<div id="footer"></div> |
32 |
|
33 |
<script> |
34 |
// initialize editor |
35 |
window.M = window.M || {}; |
36 |
M.site_content = {{ content|tojson|safe }}; |
37 |
window.onload = function() { |
38 |
M.editor.init(); |
39 |
}; |
40 |
</script> |
41 |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script> |
42 |
<script>window.jQuery || document.write('<script src="/static/js/lib/jquery-1.8.0.min.js"><\/script>')</script> |
43 |
<script src="/static/js/lib/underscore.js"></script> |
44 |
<script src="/static/js/lib/backbone-1.0.0.js"></script> |
45 |
<script src="/static/js/lib/bootstrap.js"></script> |
46 |
<script src="/static/js/lib/tinymce/tinymce.min.js"></script> |
47 |
<script src="/static/js/lib/tinymce/jquery.tinymce.min.js"></script> |
48 |
<script src="/static/js/plugins.js"></script> |
49 |
<script src="/static/js/mouchak.js"></script> |
50 |
<script src="/static/js/models.js"></script> |
51 |
<script src="/static/js/editor.js"></script> |
52 |
|
53 |
<!-- Underscore templates --> |
54 |
<script type="text/template" id="page-list-template"> |
55 |
<div id="pagelistview"> |
56 |
<h4> List of Pages </h4> |
57 |
<div id="pagelist"></div> |
58 |
<button class="btn btn-primary pull-right" id="addPage">Add Page</button> |
59 |
</div> |
60 |
</script> |
61 |
<script type="text/template" id="page-list-item-template"> |
62 |
<div class="pagename"> |
63 |
<a class="disp" id="<%= id %>" href="#"><%= name %></a> |
64 |
<span class="pull-right"> |
65 |
<a href="#" class="remove" for="<%= id %>"> |
66 |
<i class="icon-trash"></i> |
67 |
</a> |
68 |
</span> |
69 |
</div> |
70 |
</script> |
71 |
|
72 |
<script type="text/template" id="page-template"> |
73 |
<div class="page"> |
74 |
<h4> Page Properties </h4> |
75 |
<form class="form-horizontal"> |
76 |
<div class="control-group"> |
77 |
<div class="input-prepend"> |
78 |
<span class="add-on"> <strong> Name </strong></span> |
79 |
<input id="name" type="text" placeholder="name of the page" value="<%= name %>"> |
80 |
</div> |
81 |
</div> |
82 |
<div class="control-group"> |
83 |
<div class="input-prepend"> |
84 |
<span class="add-on"> <strong>Title</strong> </span> |
85 |
<input id="title" type="text" placeholder="title of the page" |
86 |
value="<%= title %>"> |
87 |
</div> |
88 |
</div> |
89 |
<div class="control-group"> |
90 |
<div class="input-prepend"> |
91 |
<span class="add-on"> <strong>Children</strong> </span> |
92 |
<input id="children" type="text" placeholder="csv of child pages" |
93 |
value="<%= children %>"> |
94 |
</div> |
95 |
</div> |
96 |
<label><strong> Content </strong></label> |
97 |
<div id="content" class="content well"> |
98 |
<%= content %> |
99 |
<p></p> |
100 |
<button class="addContent btn btn-mini btn-primary">Add Content</button> |
101 |
</div> |
102 |
<button id="updatePage" type="submit" class="btn btn-primary pull-right"> Update </button> |
103 |
</form> |
104 |
</div> |
105 |
</script> |
106 |
|
107 |
<script type="text/template" id="content-list-template"> |
108 |
<div class="content-item-wrapper"> |
109 |
<span class="content-item" id="content-<%= no %>"> |
110 |
<span class="label label-info"> <%= type %> </span> |
111 |
<span class=""> |
112 |
[ <small> <%= title %> <%= more %> </small> ] |
113 |
</span> |
114 |
</span> |
115 |
<span class="pull-right"> |
116 |
<a href="#" class="remove" for="<%=no%>"><i class="icon-trash"></i></a> |
117 |
</span> |
118 |
</div> |
119 |
</script> |
120 |
|
121 |
<script type="text/template" id="content-template"> |
122 |
<div class="contentview"> |
123 |
<div class=""> |
124 |
<label><b>Type</b></label> |
125 |
<select> |
126 |
<% _.each(_.keys(M.types.model), function(type) { %> |
127 |
<option><%= type %></option> |
128 |
<% }); %> |
129 |
</select> |
130 |
<div class="control-group"> |
131 |
<div class="input-prepend"> |
132 |
<span class="add-on"> <b>Title</b> </span> |
133 |
<input type="text" placeholder="title of the content" value="<%= |
134 |
title %>" m-data-target="title"> |
135 |
</div> |
136 |
</div> |
137 |
<div class="control-group"> |
138 |
<div class="input-prepend"> |
139 |
<span class="add-on"> <strong>Tags</strong> </span> |
140 |
<input type="text" placeholder="csv of tags for this content" |
141 |
value="<%= tags %>" m-data-target="tags"> |
142 |
</div> |
143 |
</div> |
144 |
</div> |
145 |
<div id="specific-content"></div> |
146 |
<button class="btn btn-info" id="done">Done</button> |
147 |
<button class="btn btn-primary" id="updateContent">Update</button> |
148 |
</div> |
149 |
</script> |
150 |
|
151 |
<script type="text/template" id="media-template"> |
152 |
<div class="data"> |
153 |
<div class="control-group"> |
154 |
<div class="input-prepend"> |
155 |
<span class="add-on"><strong>path to file</strong></span> |
156 |
<input type="text" placeholder="src" value="<%= src %>" |
157 |
m-data-target="src"> |
158 |
</div> |
159 |
</div> |
160 |
<div class="preview"></div> |
161 |
</div> |
162 |
</script> |
163 |
|
164 |
<script type="text/template" id="text-template"> |
165 |
<div class="data"> |
166 |
<label><b> Content </b></label> |
167 |
<p> |
168 |
<span class="label label-important">Tip</span> |
169 |
<span><small> You can unleash your HTML power here </small></span> |
170 |
</p> |
171 |
<textarea id="edit" m-data-target="data"> |
172 |
<%= data %> |
173 |
</textarea> |
174 |
</div> |
175 |
</script> |
176 |
</body> |
177 |
</html> |