1 |
{% extends "base.html" %} |
2 |
|
3 |
{% block head %} |
4 |
<title> {{ title }} </title> |
5 |
{% endblock %} |
6 |
|
7 |
{% block body %} |
8 |
<div class="container" id="container"> |
9 |
<div id="header"> |
10 |
<div id="navigation"></div> |
11 |
</div> |
12 |
<div id="content-container"></div> |
13 |
<div id="footer"> {{ footer|safe }} </div> |
14 |
</div> |
15 |
|
16 |
<script> |
17 |
//Code to initialize the framework |
18 |
window.M = window.M || {}; |
19 |
M.MenuURL = function() { return "{{ url_for('insertMenu') }}"}; |
20 |
M.PageURL = function() { return "{{ url_for('insertPage') }}"; }; |
21 |
M.site_content = {{ content|tojson|safe }}; |
22 |
window.onload = function() { |
23 |
M.init(); |
24 |
}; |
25 |
</script> |
26 |
|
27 |
{% endblock %} |
28 |
|
29 |
{% block scripts %} |
30 |
<script src="{{url_for('static', filename='js/mouchak.js')}}"></script> |
31 |
<script src="{{url_for('static', filename='js/models.js')}}"></script> |
32 |
<script src="{{url_for('static', filename='js/views.js')}}"></script> |
33 |
{% endblock %} |
34 |
|
35 |
{% block templates %} |
36 |
|
37 |
<!-- Underscore templates --> |
38 |
<script type="text/template" id="news-template"> |
39 |
<div id="feeds"> |
40 |
<img src="img/ajax-loader.gif" id="feeds-loader"/> |
41 |
</div> |
42 |
</script> |
43 |
<script type="text/template" id="news-item-template"> |
44 |
<div class="news-item-wrapper"> |
45 |
<div class="news-title"><%= title %></div> |
46 |
<a href="<%= link %>">Read More</a> |
47 |
</div> |
48 |
</script> |
49 |
|
50 |
<!-- navigation templates |
51 |
the ones with .nav-type can be used interchangbly to render different |
52 |
kinds of navigation bar / components |
53 |
one can add more |
54 |
--> |
55 |
<script type="text/template" id="nav-bar-template" class="nav-type"> |
56 |
<div class="navbar navbar-default" role="navigation"> |
57 |
<!-- Brand and toggle get grouped for better mobile display --> |
58 |
<div class="navbar-header"> |
59 |
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse"> |
60 |
<span class="sr-only">Toggle navigation</span> |
61 |
<span class="icon-bar"></span> |
62 |
<span class="icon-bar"></span> |
63 |
<span class="icon-bar"></span> |
64 |
</button> |
65 |
<a class="navbar-brand" href="<%= brand_href %>"><%= brand %></a> |
66 |
</div> |
67 |
<!-- Collect the nav links, forms, and other content for toggling --> |
68 |
<div class="collapse navbar-collapse navbar-ex1-collapse"> |
69 |
<ul class="nav navbar-nav"></ul> |
70 |
</div> |
71 |
</div> |
72 |
</script> |
73 |
|
74 |
<script type="text/template" id="nav-pills-template" class="nav-type"> |
75 |
<div class="navigation"> |
76 |
<ul class="nav nav-pills"></ul> |
77 |
</div> |
78 |
</script> |
79 |
|
80 |
<script type="text/template" id="nav-item-template"> |
81 |
<li class="<%= cls %>"> |
82 |
<a href="#/<%=page%>"> <%= M.humanReadable(page) %> </a> |
83 |
</li> |
84 |
</script> |
85 |
|
86 |
<script type="text/template" id="nav-dropdown-template"> |
87 |
<li class="dropdown"> |
88 |
<a class="dropdown-toggle" data-toggle="dropdown" href="#/<%= M.sanitize(name) %>" |
89 |
data-target='#'> |
90 |
<%= name %> |
91 |
<b class="caret"></b> |
92 |
</a> |
93 |
<ul class="dropdown-menu"> |
94 |
<% _.each(list, function(item) { |
95 |
%> |
96 |
<li><a href="#/<%= M.sanitize(item) %>"> <%= item %> </a></li> |
97 |
<% |
98 |
}); |
99 |
%> |
100 |
</ul> |
101 |
</li> |
102 |
</script> |
103 |
|
104 |
<!-- Template for map--> |
105 |
<script type="text/template" id="map-template"> |
106 |
<div id="map"> |
107 |
</div> |
108 |
</script> |
109 |
|
110 |
<script type="text/template" id="image-view-template"> |
111 |
<div class="img-wrapper"> |
112 |
<img src="<%= src %>"> |
113 |
</div> |
114 |
</script> |
115 |
|
116 |
{% endblock %} |