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