/
base.html
210 lines (190 loc) · 7.04 KB
/
base.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
{# vim: set ts=2 et sts=2 sw=2: #}
{% from 'includes/common_macros.html' import search_box, aux_nav with context %}
{% from 'includes/sidebar_modules.html' import quick_links, for_contributors %}
{% if not top_link %}
{% set top_link = url('home') %}
{% endif %}
{% if not top_text %}
{% set top_text = _('Firefox Help') %}
{% endif %}
<!DOCTYPE html>
<html class="no-js" lang="{{ request.locale }}" {% if DIR %}dir="{{ DIR }}"{% endif %}>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>{{ title }} | {{ _('Firefox Help', 'site_title') }}</title>
<link rel="shortcut icon" type="image/x-icon" href="{{ MEDIA_URL }}img/favicon.ico"/>
<link rel="search" type="application/opensearchdescription+xml" title="{{ _('Firefox Help') }}" href="{{ url('search.plugin') }}"/>
{% if feeds %}
{% for feed in feeds %}
<link rel="alternate" type="application/atom+xml" href="{{ feed[0] }}" title="{{ feed[1] }}"/>
{% endfor %}
{% endif %}
{{ css('common') }}
{{ css('print', 'print') }}
{% for style in styles %}
{{ css(style) }}
{% endfor %}
<!--[if lte IE 7]>
{{ css('ie') }}
<![endif]-->
<!--[if IE 8]>
{{ css('ie8') }}
<![endif]-->
{% if meta %}
{% for tag in meta %}
<meta name="{{ tag[0] }}" content="{{ tag[1] }}"/>
{% endfor %}
{% endif %}
{% if refresh %}
<meta http-equiv="refresh" content="{{ refresh[1] }};url={{ refresh[0] }}"/>
{% endif %}
{% if canonical_url %}
<link rel="canonical" href="{{ canonical_url }}" />
{% endif %}
<!--[if lt IE 9]>
{# html5-shiv.js must be inside <head/> to work. #}
<script src="{{ MEDIA_URL }}js/libs/html5-shiv.js"></script>
<![endif]-->
</head>
<body class="html-{{ DIR }} {{ classes }}"
data-readonly="{{ settings.READ_ONLY|json }}"
data-for-os="{{ for_os|json }}"
data-for-version="{{ for_version|json }}"
data-usernames-api="{{ url('users.api.usernames') }}"
data-media-url="{{ MEDIA_URL }}"
{% if extra_body_attrs -%}
{% for attr, val in extra_body_attrs.items() %}{{ attr }}="{{ val }}" {% endfor %}
{%- endif %}>
{% if settings.STAGE %}
<div id="stage-banner">
{{ _('This is a staging site. The production site is <a href="http://support.mozilla.com">here</a>.') }}
</div>
{% endif %}
<header class="global">
<div id="global-header-tab">
<a href="http://mozilla.org/"><img src="{{ MEDIA_URL }}img/mozilla-tab.png" alt="mozilla.org"></a>
</div>
<div class="sumo-header">
<nav id="aux-nav" role="navigation" class="menu-nav">
<ul>
{{ aux_nav(user) }}
<li>
<a href="#" class="controller" title="{{ _('Find help for other applications') }}">
{{ _('Other Applications') }}
</a>
<ul class="other-apps">
<li class="thunderbird"><a href="http://support.mozillamessaging.com">{{ _('Thunderbird') }}</a></li>
<li class="seamonkey"><a href="http://www.seamonkey-project.org/community">{{ _('SeaMonkey') }}</a></li>
</ul>
</li>
</ul>
</nav>
{% if not hide_header_search %}
{{ search_box(settings, id='support-search') }}
{% endif %}
<div id="masthead">
<h1 class="site-title">
<a href="{{ url('home') }}">
<img src="{{ MEDIA_URL }}img/firefox-54x62.png" alt="{{ _('Firefox') }}" />
{% if h1_text %}
{{ h1_text }}
{% else %}
<mark>{{ _('Firefox Help') }}</mark>
{% endif %}
</a>
</h1>
<nav class="menu-nav" id="site-nav">
<ul>
<li><a href="{{ url('home') }}"{% if active_site_nav == 'desktop' %} class="active"{% endif %}>{{ _('Desktop') }}</a></li>
<li><a href="{{ url('home.mobile') }}"{% if active_site_nav == 'mobile' %} class="active"{% endif %}>{{ _('Mobile') }}</a></li>
</ul>
</nav>
</div>
</div>
</header>
<div id="content">
{% if messages %}
<ul class="user-messages">
{% for message in messages %}
<li {% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
{% block breadcrumbs %}
{{ breadcrumbs(crumbs) }}
{% endblock %}
{% block above_main %}{% endblock %}
<div id="main" role="main">
{% block content %}{% endblock %}
</div>
{% block outer_side %}{# TODO: temporary wrapper block until questions and AoA get updated #}
<div id="side">
{% block side_top %}{% endblock %}
{{ quick_links() }}
{% block side %}{% endblock %}
{{ for_contributors(request, user, settings.WIKI_DEFAULT_LANGUAGE) }}
<div class="sd-module promos">
{% block side_promos %}
<section id="want-to-get-involved">
<h1>{{ _('Be <mark>Awesome</mark>')|safe }}</h1>
<div class="img">
<a href="{{ url('wiki.document', 'superheroes-wanted') }}">
<img src="{{ settings.MEDIA_URL }}img/promo.sumo.png" alt="" />
</a>
</div>
<p>
{% trans %}Did you know that Firefox Help is powered by volunteer
superheroes all around the world?{% endtrans %}
</p>
<a href="{{ url('wiki.document', 'superheroes-wanted') }}">{{ _('Grab your cape and join us »')|safe }}</a>
</section>
{% if not hide_plugin_check %}
<section id="check-your-plugins">
<h1>{{ _('Check your <mark>plugins</mark>')|safe }}</h1>
<div class="img">
<a href="http://www.mozilla.com/plugincheck/">
<img src="{{ settings.MEDIA_URL }}img/promo.plugins.png" alt="" />
</a>
</div>
<p>
{% trans %}
What is a plugin? Why should I keep them updated? Answer these
questions and run an instant check to see if you're up to date.
{% endtrans %}
</p>
<a href="http://www.mozilla.com/plugincheck/">{{ _('Find out more »')|safe }}</a>
</section>
{% endif %}
{% endblock %}
</div>
</div>
{% endblock %}
</div>{# /#content #}
<footer id="footer">
<div id="footer-contents" role="contentinfo">
{% with localizable_url=localizable_url %}
{% include 'layout/footer.html' %}
{% endwith %}
</div>{# /#footer-contents #}
</footer>{# /#footer #}
<script src="{{ url('jsi18n') }}build:{{ BUILD_ID_JS }}"></script>
<script src="{{ url('wafflejs') }}"></script>
{{ js('common') }}
{% for script in scripts %}
{{ js(script) }}
{% endfor %}
{# Webtrends Stats Tracking #}
<script defer src="{{ MEDIA_URL }}js/webtrends.js"></script>
<noscript>
<img id="DCSIMG" width="1" height="1" alt="" src="http://statse.webtrendslive.com/dcskot6d000000w0qxqho15rf_7r6o/njs.gif?dcsuri=/nojavascript&WT.js=No&WT.tv=8.6.2"/>
</noscript>
{# End Webtrends #}
{# Ethnio tracking - see bugs 683643 and 673544 #}
{% if waffle.flag('ethnio-all') %}
<script type="text/javascript" language="javascript" src="//ethn.io/remotes/24561" async="true"></script>
{% endif %}
{# End Ethnio #}
{% block footer_script %}
{% endblock %}
</body>
</html>