..
Viewing
404.html
33 lines (34 loc) • 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 | <!DOCTYPE html>
<html lang="{{ config.meta.lang }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
{% if config.meta.description %}<meta name="description" content="{{ config.meta.description }}">{% endif %}
<title>{% if page.title %}{{ page.title }} - {% else %} 404 Page Not Found - {% endif %} {{ config.site_name }}</title>
</head>
<body>
<div class="main">
<h1 id="404-page-not-found" style="text-align: center">404</h1>
<p style="text-align: center"><strong>Page not found</strong></p>
<p style="text-align: center"><a href="{{ site_uri }}">Home</a></p>
</div>
</body>
<script>
var languages = "{{ config.languages|safe }}";
const page = window.location.pathname;
let split = page.split('/');
const a = document.querySelectorAll('a');
split = split.filter(Boolean);
let baseURL = "";
for (const element in split) {
baseURL += "/" + split[element];
if (languages.includes("'" + split[element] + "'")) {
break;
}
}
for (const element in a) {
a[element].href = baseURL + '/';
}
</script>
<html>
|
|