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