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