a065e058ad9da1ee07bc4c81fef3b59c8806397c
[ipfire.org.git] / src / templates / base.html
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4 <title>{{ hostname }} - {% block title %}{{ _("No title given") }}{% end block %}</title>
5 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
6 <meta name="author" content="IPFire.org - IPFire Development Team" />
7
8 <meta name="keywords" content="Linux, Firewall, IPFire, Security, IPCop, Open Source, Free, ARM, VPN, Proxy, IDS, IPS" />
9
10 <link rel="icon" sizes="192x192" href="{{ static_url("img/apple-touch-icon-192x192-precomposed.png") }}">
11 {% for res in ("72x72", "76x76", "120x120", "144x144", "152x152", "180x180") %}
12 <link rel="apple-touch-icon-precomposed" sizes="{{ res }}" href="{{ static_url("img/apple-touch-icon-%s-precomposed.png" % res )}}">
13 {% end %}
14 <link rel="apple-touch-icon-precomposed" href="{{ static_url("img/apple-touch-icon-60x60-precomposed.png") }}">
15
16 <!-- styling stuff -->
17 <link rel="stylesheet" type="text/css" href="{{ static_url("main.css") }}" />
18 <meta name="viewport" content="width=device-width, initial-scale=1.0">
19
20 {% block head %}{% end block %}
21 </head>
22
23 <body id="page-top" class="{{ hostname.replace(".", "-") }}">
24 <nav class="navbar navbar-dark navbar-expand-lg mb-4">
25 <div class="container">
26 <a class="navbar-brand" href="/">
27 <strong>IPFire</strong>
28
29 {% if hostname == "blog.ipfire.org" %}
30 {{ _("Blog") }}
31 {% elif hostname == "fireinfo.ipfire.org" %}
32 {{ _("Fireinfo") }}
33 {% elif hostname == "location.ipfire.org" %}
34 {{ _("Location") }}
35 {% elif hostname == "mirrors.ipfire.org" %}
36 {{ _("Mirrors") }}
37 {% elif hostname == "people.ipfire.org" %}
38 {{ _("People") }}
39 {% elif hostname == "wiki.ipfire.org" %}
40 {{ _("Wiki") }}
41 {% end %}
42 </a>
43
44 {% block menu %}
45 {% if hostname in ("www.ipfire.org", "dev.ipfire.org") %}
46 <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar"
47 aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
48 <span class="fas fa-bars"></span>
49 </button>
50
51 <div class="collapse navbar-collapse" id="navbar">
52 <ul class="navbar-nav ml-auto">
53 <li class="nav-item d-sm-block d-md-block d-lg-none">
54 <a class="nav-link {% if request.path == "/" %}active{% end %}" href="/">{{ _("Home") }}</a>
55 </li>
56
57 <li class="nav-item">
58 <a class="nav-link {% if request.path == "/features" %}active{% end %}" href="/features">{{ _("Features") }}</a>
59 </li>
60
61 <li class="nav-item">
62 <a class="nav-link {% if request.path == "/support" %}active{% end %}" href="/support">{{ _("Support") }}</a>
63 </li>
64
65 <li class="nav-item">
66 <a class="nav-link" href="https://blog.ipfire.org/">{{ _("Blog") }}</a>
67 </li>
68
69 <li class="nav-item">
70 <a class="nav-link" href="https://community.ipfire.org/">{{ _("Community") }}</a>
71 </li>
72
73 <li class="nav-item">
74 <a class="nav-link {% if request.path.startswith("/download") %}active{% end %}" href="/download">{{ _("Download") }}</a>
75 </li>
76 </ul>
77
78 <a class="btn btn-primary mt-2 mt-lg-0 ml-lg-2" href="/donate">
79 {{ _("Donate") }}
80 </a>
81 </div>
82 {% elif hostname == "blog.ipfire.org" %}
83 <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar"
84 aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
85 <span class="fas fa-bars"></span>
86 </button>
87
88 <div class="collapse navbar-collapse" id="navbar">
89 <ul class="navbar-nav ml-auto d-lg-none">
90 <li class="nav-item">
91 <a class="nav-link {% if request.path == "/" %}active{% end %}" href="/">
92 {{ _("Newest") }}
93 </a>
94 </li>
95
96 {% if current_user %}
97 <li class="nav-item">
98 <a class="nav-link {% if request.path == "/drafts" %}active{% end %}" href="/drafts">
99 {{ _("My Drafts") }}
100 </a>
101 </li>
102 {% end %}
103
104 <li class="nav-item">
105 <a class="nav-link {% if request.path == "/tags/featured" %}active{% end %}" href="/tags/featured">
106 {{ _("Featured") }}
107 </a>
108 </li>
109
110 <li class="nav-item">
111 <a class="nav-link {% if request.path == "/tags/lightningwirelabs.com" %}active{% end %} d-flex justify-content-between"
112 href="/tags/lightningwirelabs.com">
113 <span>{{ _("Lightning Wire Labs") }}</span>
114
115 <img class="img-fluid" src="{{ static_url("img/lightningwirelabs-logo.svg") }}"
116 alt="{{ _("Lightning Wire Labs") }}">
117 </a>
118 </li>
119
120 <li class="nav-item">
121 <a class="nav-link d-flex justify-content-between" href="/feed.xml">
122 <span>{{ _("RSS Feed") }}</span> <span class="fas fa-rss"></span>
123 </a>
124 </li>
125 </ul>
126
127 <form class="form-inline ml-lg-auto my-2 my-lg-0" action="/search" method="GET">
128 <input class="form-control form-control-sm" type="search" name="q"
129 placeholder="{{ _("Search...") }}" aria-label="{{ _("Search") }}" value="{% try %}{{ q }}{% except %}{% end %}">
130 </form>
131
132 <a class="btn btn-primary ml-lg-2" href="https://www.ipfire.org/donate">
133 {{ _("Donate") }}
134 </a>
135 </div>
136 {% elif hostname == "fireinfo.ipfire.org" %}
137 <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar"
138 aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
139 <span class="fas fa-bars"></span>
140 </button>
141
142 <div class="collapse navbar-collapse" id="navbar">
143 <ul class="navbar-nav ml-auto">
144 {% if current_user and current_user.is_staff() %}
145 <li class="nav-item">
146 <a class="nav-link {% if request.path.startswith("/admin") %}active{% end %}" href="/admin">
147 {{ _("Admin") }}
148 </a>
149 </li>
150 {% end %}
151
152 <li class="nav-item">
153 <a class="nav-link {% if request.path.startswith("/vendors") %}active{% end %}" href="/vendors">
154 {{ _("Vendors") }}
155 </a>
156 </li>
157 </ul>
158 </div>
159 {% elif hostname == "location.ipfire.org" %}
160 <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar"
161 aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
162 <span class="fas fa-bars"></span>
163 </button>
164
165 <div class="collapse navbar-collapse" id="navbar">
166 <ul class="navbar-nav ml-auto">
167 <li class="nav-item">
168 <a class="nav-link {% if request.path == "/how-to-use" %}active{% end %}" href="/how-to-use">
169 {{ _("How To Use") }}
170 </a>
171 </li>
172
173 <li class="nav-item">
174 <a class="nav-link {% if request.path == "/download" %}active{% end %}" href="/download">
175 {{ _("Download") }}
176 </a>
177 </li>
178 </ul>
179
180 <a class="btn btn-primary ml-lg-2" href="https://www.ipfire.org/donate">
181 {{ _("Donate") }}
182 </a>
183 </div>
184 {% elif hostname == "nopaste.ipfire.org" %}
185 <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar"
186 aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
187 <span class="fas fa-bars"></span>
188 </button>
189
190 <div class="collapse navbar-collapse" id="navbar">
191 <ul class="navbar-nav ml-auto">
192 <li class="nav-item">
193 <a class="nav-link" href="/?mode=upload">{{ _("Upload File") }}</a>
194 </li>
195 </ul>
196 </div>
197 {% elif hostname == "people.ipfire.org" %}
198 {% if current_user %}
199 <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar"
200 aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
201 <span class="fas fa-bars"></span>
202 </button>
203
204 <div class="collapse navbar-collapse" id="navbar">
205 <ul class="navbar-nav ml-auto mr-3">
206 <li class="nav-item">
207 <a class="nav-link {% if request.path == "/users/%s" % current_user.uid %}active{% end %}" href="/users/{{ current_user.uid }}">
208 {{ _("My Profile") }}
209 </a>
210 </li>
211
212 {% if current_user.is_staff() %}
213 <li class="nav-item">
214 <a class="nav-link {% if request.path == "/users" %}active{% end %}" href="/users">
215 {{ _("Users") }}
216 </a>
217 </li>
218
219 <li class="nav-item">
220 <a class="nav-link {% if request.path.startswith("/groups") %}active{% end %}" href="/groups">
221 {{ _("Groups") }}
222 </a>
223 </li>
224
225 <li class="nav-item">
226 <a class="nav-link {% if request.path == "/stats" %}active{% end %}" href="/stats">
227 {{ _("Stats") }}
228 </a>
229 </li>
230 {% end %}
231
232 {% if current_user.has_sip() %}
233 <li class="nav-item">
234 <a class="nav-link {% if request.path.startswith("/conferences") %}active{% end %}" href="/conferences">
235 {{ _("Conferences") }}
236 </a>
237 </li>
238 {% end %}
239 </ul>
240
241 <form class="form-inline my-2 my-lg-0" action="/search" method="GET">
242 <input class="form-control form-control-sm mr-sm-2" type="search" name="q"
243 placeholder="{{ _("Search") }}" aria-label="{{ _("Search") }}" value="{% try %}{{ q }}{% except %}{% end %}">
244 </form>
245 </div>
246 {% end %}
247 {% elif hostname == "wiki.ipfire.org" %}
248 <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar"
249 aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
250 <span class="fas fa-bars"></span>
251 </button>
252
253 <div class="collapse navbar-collapse" id="navbar">
254 <form class="form-inline ml-auto my-2 my-lg-0" action="/search" method="GET">
255 <input class="form-control form-control-sm" type="search" name="q"
256 placeholder="{{ _("Search...") }}" aria-label="{{ _("Search") }}" value="{% try %}{{ q }}{% except %}{% end %}">
257 </form>
258
259 <a class="btn btn-primary ml-lg-2" href="https://www.ipfire.org/donate">
260 {{ _("Donate") }}
261 </a>
262 </div>
263 {% end %}
264 {% end block %}
265 </div>
266 </nav>
267
268 {% block container %}
269 <div class="container">
270 {% block content %}{% end block %}
271 </div>
272 {% end block %}
273
274 {% block footer %}
275 <footer>
276 <div class="footer">
277 {% if hostname in ("www.ipfire.org", "dev.ipfire.org") %}
278 <div class="footer-info">
279 <div class="container pb-3">
280 <div class="row mb-6 justify-content-between">
281 <div class="col-12 col-lg-4 mb-4">
282 <a class="btn btn-primary btn-block mb-3" href="https://people.ipfire.org/register">
283 {{ _("Join Us To Stay Up To Date") }}
284 </a>
285
286 <p>
287 {{ _("Sign up to our community to take part and get the latest news") }}
288 </p>
289 </div>
290
291 <div class="col-12 col-lg-3 mb-4 small">
292 <h6>{{ _("Looking For More?") }}</h6>
293
294 <div class="row">
295 <div class="col">
296 <ul class="list-unstyled">
297 <li>
298 <a href="/features">{{ _("Features") }}</a>
299 </li>
300
301 <li>
302 <a href="/support">{{ _("Support") }}</a>
303 </li>
304
305 <li>
306 <a href="https://wiki.ipfire.org/devel">{{ _("Development") }}</a>
307 </li>
308 </ul>
309 </div>
310
311 <div class="col">
312 <ul class="list-unstyled">
313 <li>
314 <a href="/download">{{ _("Download") }}</a>
315 </li>
316
317 <li>
318 <a href="https://blog.ipfire.org">{{ _("Blog") }}</a>
319 </li>
320
321 <li>
322 <a href="https://community.ipfire.org/">{{ _("Community") }}</a>
323 </li>
324 </ul>
325 </div>
326 </div>
327 </div>
328
329 <div class="col-12 col-lg-4 text-center mb-4">
330 <a class="btn btn-primary btn-lg px-4 my-3" href="/donate">
331 {{ _("Donate") }}
332 </a>
333
334 <div class="btn-toolbar justify-content-center">
335 <a class="btn btn-link" href="https://twitter.com/ipfire">
336 <span class="fab fa-twitter"></span>
337 </a>
338
339 <a class="btn btn-link" href="https://www.facebook.com/IPFire.org">
340 <span class="fab fa-facebook"></span>
341 </a>
342
343 <a class="btn btn-link" href="https://youtube.com/user/ipfireproject">
344 <span class="fab fa-youtube"></span>
345 </a>
346 </div>
347 </div>
348 </div>
349 </div>
350 </div>
351 {% elif hostname == "wiki.ipfire.org" %}
352 <div class="footer-info">
353 <div class="container pb-3">
354 <ul class="list-inline">
355 <li class="list-inline-item">
356 <a href="/watchlist">{{ _("My Watchlist") }}
357 </li>
358
359 <li class="list-inline-item">
360 <a href="/recent-changes">{{ _("Recent Changes") }}
361 </li>
362
363 <li class="list-inline-item">
364 <a href="/tree">{{ _("Tree") }}
365 </li>
366 </ul>
367 </div>
368 </div>
369 {% end %}
370
371 <div class="copyright">
372 <div class="container">
373 <div class="row flex-lg-row-reverse">
374 <div class="col-12 col-lg-6 text-center text-lg-right">
375 {% if not current_user and hostname in ("blog.ipfire.org", "fireinfo.ipfire.org", "nopaste.ipfire.org", "wiki.ipfire.org") %}
376 <a href="/login">{{ _("Login") }}</a>
377 {% elif current_user %}
378 <p class="mb-0">
379 <span class="mr-2">
380 {{ _("You are currently logged in as %s") % current_user }}
381 </span>
382
383 <a href="/logout">{{ _("Logout") }}</a>
384 </p>
385 {% end %}
386 </div>
387
388 <div class="col-12 col-lg-6 text-center text-lg-left">
389 &copy; {{ year }} - IPFire - {{ _("The Open Source Firewall") }}
390 - <a href="https://www.ipfire.org/legal">{{ _("Legal") }}</a>
391 </div>
392 </div>
393 </div>
394 </div>
395 </div>
396 </footer>
397 {% end block %}
398
399 <script src="{{ static_url("js/jquery-3.3.1.min.js") }}"></script>
400 <script src="{{ static_url("js/popper.min.js") }}"></script>
401 <script src="{{ static_url("js/bootstrap.min.js") }}"></script>
402 {% block javascript %}{% end block %}
403 </body>
404 </html>