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