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