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