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/editor.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
28
      <div id="content-container"></div>
29
30
      <div id="footer">
31
      </div>
32
    </div>
33
    
34
35
    <script>
36
      // initialize editor
37
      window.M = window.M || {};
38
      M.site_content = {{ content|tojson|safe }};
39
      window.onload = function() {
40
        M.editor.init();
41
      };
42
    </script>
43
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
44
    <script>window.jQuery || document.write('<script src="/static/js/lib/jquery-1.8.0.min.js"><\/script>')</script>
45
    <script src="/static/js/lib/underscore.js"></script>
46
    <script src="/static/js/lib/backbone-1.0.0.js"></script>
47
    <script src="/static/js/lib/bootstrap.js"></script>
48
    <script src="/static/js/lib/tinymce/tinymce.min.js"></script>
49
    <script src="/static/js/lib/tinymce/jquery.tinymce.min.js"></script>
50
    <script src="/static/js/plugins.js"></script>
51
    <script src="/static/js/mouchak.js"></script>
52
    <script src="/static/js/models.js"></script>
53
    <script src="/static/js/editor.js"></script>
54
55
    <!-- Underscore templates -->
56
    <script type="text/template" id="menu-config-template">
57
      <div id="menu-config">
58
        <textarea id="menu">
59
          <%= menu %>
60
        </textarea>
61
      </div>
62
    </script>
63
64
    <script type="text/template" id="page-list-template">
65
      <div id="pagelistview">
66
        <h4> List of Pages </h4>
67
        <div id="pagelist"></div>
68
        <button class="btn btn-primary pull-right" id="addPage">Add Page</button>
69
        <p><a href="/" class="btn"> Go to site </a></p>
70
      </div>
71
    </script>
72
    <script type="text/template" id="page-list-item-template">
73
      <div class="pagename">
74
        <a class="disp" id="<%= id %>" href="#"><%= name %></a>
75
        <span class="pull-right">
76
          <a href="#" class="remove" for="<%= id %>">
77
            <i class="icon-trash"></i>
78
          </a>
79
        </span>
80
      </div>
81
    </script>
82
83
    <script type="text/template" id="page-template">
84
      <div class="page">
85
        <h4> Page Properties </h4>
86
        <form class="form-horizontal">
87
          <div class="control-group">
88
            <div class="input-prepend">
89
              <span class="add-on"> <strong> Name </strong></span>
90
              <input id="name" type="text" placeholder="name of the page" value="<%= name %>">
91
            </div>
92
          </div>
93
          <div class="control-group">
94
            <div class="input-prepend">
95
              <span class="add-on"> <strong>Title</strong> </span>
96
              <input id="title" type="text" placeholder="title of the page"
97
               value="<%= title %>">
98
            </div>
99
          </div>
100
          <div class="control-group">
101
            <div class="input-prepend">
102
              <span class="add-on"> <strong>Children</strong> </span>
103
              <input id="children" type="text" placeholder="csv of child pages"
104
              value="<%= children %>">
105
            </div> 
106
          </div>
107
          <label><strong> Content </strong></label>
108
          <div id="content" class="content well">
109
            <%= content %>
110
            <p></p>
111
            <button class="addContent btn btn-mini btn-primary">Add Content</button>
112
          </div>
113
          <button id="updatePage" type="submit" class="btn btn-primary pull-right"> Update </button>
114
        </form>
115
      </div>
116
    </script>
117
118
    <script type="text/template" id="content-list-template">
119
      <div class="content-item-wrapper">
120
        <span class="content-item" id="content-<%= no %>"> 
121
          <span class="label label-info"> <%= type %> </span> 
122
          <span class=""> 
123
            [ <small> <%= title %>  <%= more %> </small> ]
124
          </span>
125
        </span>
126
        <span class="pull-right">
127
          <a href="#" class="remove" for="<%=no%>"><i class="icon-trash"></i></a>
128
        </span>
129
      </div>
130
    </script>
131
132
    <script type="text/template" id="content-template">
133
      <div class="contentview">
134
        <div class="">
135
          <label><b>Type</b></label>
136
          <select>
137
            <% _.each(_.keys(M.types.model), function(type) { %>
138
              <option><%= type %></option>
139
            <%  }); %>
140
          </select>
141
          <div class="control-group">
142
            <div class="input-prepend">
143
              <span class="add-on"> <b>Title</b> </span>
144
              <input type="text" placeholder="title of the content" value="<%=
145
              title %>" m-data-target="title">
146
            </div> 
147
          </div>
148
          <div class="control-group">
149
            <div class="input-prepend">
150
              <span class="add-on"> <strong>Tags</strong> </span>
151
              <input type="text" placeholder="csv of tags for this content"
152
              value="<%= tags %>" m-data-target="tags">
153
            </div> 
154
          </div>
155
        </div>
156
        <div id="specific-content"></div>
157
        <button class="btn btn-info" id="done">Done</button>
158
        <button class="btn btn-primary" id="updateContent">Update</button>
159
      </div>
160
    </script>
161
162
    <script type="text/template" id="media-template">
163
      <div class="data">
164
        <div class="control-group">
165
          <div class="input-prepend">
166
            <span class="add-on"><strong>path to file</strong></span>
167
            <input type="text" placeholder="src" value="<%= src %>"
168
            m-data-target="src">
169
          </div>
170
        </div>
171
        <div class="preview"></div>
172
      </div>
173
    </script>
174
175
    <script type="text/template" id="text-template">
176
      <div class="data">
177
        <label><b> Content </b></label>
178
        <p>
179
        <span class="label label-important">Tip</span>
180
        <span><small> You can unleash your HTML power here </small></span>
181
        </p>
182
        <textarea id="edit" m-data-target="data">
183
          <%= data %>
184
        </textarea>
185
      </div>
186
    </script>
187
  </body>
188
</html>