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