]> git.ipfire.org Git - ipfire.org.git/blob - src/templates/base.html
base: Add link to the documentation to the main nav
[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 class="is-flex is-flex-direction-column">
24 <nav class="navbar" role="navigation" aria-label="main navigation">
25 <div class="container">
26 <div class="navbar-brand">
27 <a class="navbar-item is-size-4" href="/">
28 <strong>
29 IPFire<span class="has-text-primary">_</span>
30
31 {% if hostname.startswith("fireinfo.") %}
32 {{ _("Fireinfo") }}
33 {% elif hostname.startswith("nopaste.") %}
34 {{ _("Nopaste") }}
35 {% elif hostname.startswith("location.") %}
36 {{ _("Location") }}
37 {% elif hostname.startswith("wiki.") %}
38 {{ _("Wiki") }}
39 {% end %}
40 </strong>
41 </a>
42
43 <a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="navbarMainMenu">
44 <span aria-hidden="true"></span>
45 <span aria-hidden="true"></span>
46 <span aria-hidden="true"></span>
47 </a>
48 </div>
49 <div class="navbar-menu" id="navbarMainMenu">
50 {% block menu %}
51 {% if hostname.startswith("www.") or hostname.startswith("dev.") %}
52 <div class="navbar-end">
53 {# Show a search bar for blog #}
54 {% if request.path.startswith("/blog") %}
55 {# Navigation for Blog Authors #}
56 {% if current_user and current_user.is_blog_author() %}
57 <a class="navbar-item {% if request.path == "/blog/drafts" %}is-active{% end %}" href="/blog/drafts">
58 {{ _("My Drafts") }}
59 </a>
60 {% end %}
61
62 <div class="navbar-item">
63 <form action="/blog" method="GET">
64 <div class="field">
65 <div class="control has-icons-left">
66 <input class="input" type="text"
67 name="q" {% if "q" in locals() and q %}value="{{ q }}"{% end %}
68 placeholder="{{ _("Search Blog...") }}">
69 <span class="icon is-small is-left">
70 <i class="fas fa-search"></i>
71 </span>
72 </div>
73 </div>
74 </form>
75 </div>
76 {# Show a search bar for docs #}
77 {% elif request.path.startswith("/docs") %}
78 <div class="navbar-item">
79 <form action="/docs/search" method="GET">
80 <div class="field">
81 <div class="control has-icons-left">
82 <input class="input" type="text"
83 name="q" {% if "q" in locals() and q %}value="{{ q }}"{% end %}
84 placeholder="{{ _("Search Docs...") }}">
85 <span class="icon is-small is-left">
86 <i class="fas fa-search"></i>
87 </span>
88 </div>
89 </div>
90 </form>
91 </div>
92 {% end %}
93
94 <a class="navbar-item {% if request.path == "/about" %}is-active{% end %}" href="/about">{{ _("About") }}</a>
95
96 <a class="navbar-item {% if request.path.startswith("/docs") %}is-active{% end %}" href="/docs">{{ _("Documentation") }}</a>
97
98 <a class="navbar-item {% if request.path.startswith("/download") %}is-active{% end %}" href="/download">{{ _("Download") }}</a>
99
100 <a class="navbar-item {% if request.path.startswith("/blog") %}is-active{% end %}" href="/blog">{{ _("Blog") }}</a>
101
102 <a class="navbar-item {% if request.path == "/help" %}is-active{% end %}" href="/help">{{ _("Help") }}</a>
103
104 <div class="navbar-item">
105 <a class="button is-lwl has-text-weight-bold is-uppercase"
106 href="https://store.lightningwirelabs.com/?utm_source={{ hostname }}&utm_medium=navigation">
107 {{ _("Buy") }}
108 </a>
109 </div>
110
111 <div class="navbar-item">
112 <a class="button is-primary has-text-weight-bold is-uppercase"
113 href="https://www.ipfire.org/donate">
114 {{ _("Donate") }}
115 </a>
116 </div>
117 </div>
118 {% elif hostname == "fireinfo.ipfire.org" %}
119 <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar"
120 aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
121 <span class="fas fa-bars"></span>
122 </button>
123
124 <div class="collapse navbar-collapse" id="navbar">
125 <ul class="navbar-nav ml-auto">
126 {% if current_user and current_user.is_staff() %}
127 <li class="nav-item">
128 <a class="nav-link {% if request.path.startswith("/admin") %}is-active{% end %}" href="/admin">
129 {{ _("Admin") }}
130 </a>
131 </li>
132 {% end %}
133
134 <li class="nav-item">
135 <a class="nav-link {% if request.path.startswith("/vendors") %}is-active{% end %}" href="/vendors">
136 {{ _("Vendors") }}
137 </a>
138 </li>
139 </ul>
140 </div>
141 {% elif hostname == "location.ipfire.org" %}
142 <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar"
143 aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
144 <span class="fas fa-bars"></span>
145 </button>
146
147 <div class="collapse navbar-collapse" id="navbar">
148 <ul class="navbar-nav ml-auto">
149 <li class="nav-item">
150 <a class="nav-link {% if request.path == "/how-to-use" %}is-active{% end %}" href="/how-to-use">
151 {{ _("How To Use") }}
152 </a>
153 </li>
154
155 <li class="nav-item">
156 <a class="nav-link {% if request.path == "/download" %}is-active{% end %}" href="/download">
157 {{ _("Download") }}
158 </a>
159 </li>
160 </ul>
161
162 <a class="btn btn-primary ml-lg-2" href="https://www.ipfire.org/donate">
163 {{ _("Donate") }}
164 </a>
165 </div>
166 {% elif hostname == "nopaste.ipfire.org" %}
167 <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar"
168 aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
169 <span class="fas fa-bars"></span>
170 </button>
171
172 <div class="collapse navbar-collapse" id="navbar">
173 <ul class="navbar-nav ml-auto">
174 <li class="nav-item">
175 <a class="nav-link" href="/?mode=upload">{{ _("Upload File") }}</a>
176 </li>
177 </ul>
178 </div>
179 {% elif hostname == "wiki.ipfire.org" %}
180 <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar"
181 aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
182 <span class="fas fa-bars"></span>
183 </button>
184
185 <div class="collapse navbar-collapse" id="navbar">
186 <form class=" ml-auto my-2 my-lg-0" action="/search" method="GET">
187 <input class="form-control form-control-sm" type="search" name="q"
188 placeholder="{{ _("Search...") }}" aria-label="{{ _("Search") }}" value="{% try %}{{ q }}{% except %}{% end %}">
189 </form>
190
191 <a class="btn btn-primary ml-lg-2" href="https://www.ipfire.org/donate">
192 {{ _("Donate") }}
193 </a>
194 </div>
195 {% end %}
196 {% end block %}
197 </div>
198 </div>
199 </nav>
200
201 <div class="is-flex-grow-1 is-flex-shrink-0">
202 {% block container %}
203 <div class="container">
204 {% block content %}{% end block %}
205 </div>
206 {% end block %}
207 </div>
208
209 {% block footer %}
210 <footer class="footer is-flex-shrink-0">
211 <div class="container">
212 <div class="columns">
213 <div class="column is-two-fifths">
214 {# Show some profile information for users who are logged in #}
215 {% if current_user %}
216 <h4 class="title is-4 mb-0">{{ _("Hello, %s!") % current_user }}</h4>
217
218 <div class="level is-mobile">
219 <div class="level-left">
220 <a class="level-item" href="/users/{{ current_user.uid }}">
221 {{ _("My Profile") }}
222 </a>
223
224 <a class="level-item" href="/logout">
225 {{ _("Logout") }}
226 </a>
227 </div>
228 </div>
229
230 {# Otherwise encourage people to join #}
231 {% else %}
232 <p class="is-size-4">
233 <span class="has-text-weight-bold">IPFire</span><span class="has-text-primary has-text-weight-bold">_</span>People
234 </p>
235
236 <p>
237 Join the community and sign up for our newsletter
238 </p>
239
240 <a class="button is-primary is-outlined is-medium
241 has-text-black has-text-weight-bold" href="/register">
242 JOIN NOW
243 </a>
244 <a class="button is-primary is-outlined is-medium
245 has-text-black has-text-weight-bold" href="/login">
246 LOG IN
247 </a>
248 {% end %}
249 </div>
250
251 <div class="column">
252 <ul>
253 <li>
254 <a href="/about">
255 {{ _("About") }}
256 </a>
257 </li>
258 <li>
259 <a href="https://wiki.ipfire.org">
260 {{ _("Wiki") }}
261 </a>
262 </li>
263 <li>
264 <a href="/help">
265 {{ _("Help") }}
266 </a>
267 </li>
268 <li>
269 <a href="https://wiki.ipfire.org/devel">
270 {{ _("Development") }}
271 </a>
272 </li>
273 </ul>
274 </div>
275
276 <div class="column">
277 <ul>
278 <li>
279 <a href="/download">
280 {{ _("Download") }}
281 </a>
282 </li>
283 <li>
284 <a href="/blog">
285 {{ _("Blog") }}
286 </a>
287 </li>
288 <li>
289 <a href="https://community.ipfire.org/">
290 {{ _("Community") }}
291 </a>
292 </li>
293 <li>
294 <a href="/legal">
295 {{ _("Legal") }}
296 </a>
297 </li>
298 </ul>
299 </div>
300
301 {% if current_user and current_user.is_staff() %}
302 <div class="column">
303 <ul>
304 <li>
305 <a href="/voip">
306 {{ _("VoIP") }}
307 </a>
308 </li>
309 </ul>
310 </div>
311 {% end %}
312
313 <div class="column is-one-fifth">
314 <div class="block">
315 <a class="button is-primary is-fullwidth is-medium has-text-weight-bold is-uppercase"
316 href="https://www.ipfire.org/donate">
317 {{ _("Donate") }}
318 </a>
319 </div>
320
321 <div class="block">
322 <div class="level is-mobile">
323 <div class="level-item">
324 <a href="https://social.ipfire.org/@news" title="{{ _("Mastodon") }}">
325 <i class="fa-brands fa-mastodon"></i>
326 </a>
327 </div>
328 <div class="level-item">
329 <a href="https://twitter.com/ipfire" title="{{ _("Twitter") }}">
330 <i class="fa-brands fa-twitter"></i>
331 </a>
332 </div>
333 <div class="level-item">
334 <a href="https://linkedin.com/company/ipfire" title="{{ _("LinkedIn") }}">
335 <i class="fa-brands fa-linkedin-in"></i>
336 </a>
337 </div>
338 </div>
339 </div>
340 </div>
341 </div>
342 </div>
343 </footer>
344 {% end block %}
345
346 <script src="{{ static_url("js/jquery-3.6.0.min.js") }}"></script>
347 <script src="{{ static_url("js/site.js") }}"></script>
348 {% block javascript %}{% end block %}
349 </body>
350 </html>