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