Skip to content

Commit 4f5569a

Browse files
committed
Add GitHub Pages 404 page
1 parent 8a12313 commit 4f5569a

1 file changed

Lines changed: 118 additions & 0 deletions

File tree

404.html

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<meta name="robots" content="noindex">
7+
<title>Page not found — Scriptella</title>
8+
<link rel="icon" href="/favicon.ico" sizes="32x32">
9+
<link rel="icon" type="image/png" href="/favicon-192.png" sizes="192x192">
10+
<script src="/theme.js"></script>
11+
<link rel="stylesheet" href="/style.css">
12+
<style>
13+
.error-page {
14+
display: grid;
15+
min-height: 100vh;
16+
min-height: 100svh;
17+
place-items: center;
18+
}
19+
20+
.error-page__content {
21+
width: min(100% - 3rem, 32rem);
22+
text-align: center;
23+
}
24+
25+
.error-page__code {
26+
margin: 0;
27+
color: var(--accent);
28+
font: 700 clamp(5rem, 25vw, 9rem)/0.85 var(--font-mono);
29+
letter-spacing: -0.08em;
30+
}
31+
32+
.error-page h1 {
33+
margin: 1.5rem 0 2.5rem;
34+
color: var(--text-primary);
35+
font-size: clamp(1.5rem, 5vw, 2rem);
36+
line-height: 1.2;
37+
}
38+
39+
.error-page__links {
40+
display: flex;
41+
flex-wrap: wrap;
42+
gap: 0.75rem 1.5rem;
43+
justify-content: center;
44+
}
45+
46+
.error-page__links a {
47+
font-weight: 700;
48+
}
49+
50+
.error-page__suggestion {
51+
margin: 0 0 1.5rem;
52+
}
53+
54+
.error-page__suggestion[hidden] {
55+
display: none;
56+
}
57+
</style>
58+
</head>
59+
<body class="error-page">
60+
<main class="error-page__content">
61+
<p class="error-page__code">404</p>
62+
<h1>Page not found</h1>
63+
<p class="error-page__suggestion" data-page-suggestion hidden>
64+
Looking for <a data-page-suggestion-link></a>?
65+
</p>
66+
<nav class="error-page__links" aria-label="Where to go next">
67+
<a href="https://scriptella.org/">scriptella.org</a>
68+
<a href="https://github.com/scriptella/scriptella-etl">Scriptella GitHub</a>
69+
</nav>
70+
</main>
71+
<script>
72+
(function () {
73+
"use strict";
74+
75+
var routes = [
76+
{ pattern: /(?:^|\/)api(?:\/|$)/, label: "the API documentation", href: "/docs/api/" },
77+
{ pattern: /(?:^|\/)(?:docs?|reference)(?:\/|$)/, label: "the documentation", href: "/reference/" },
78+
{ pattern: /(?:^|\/)drivers?(?:[./_-]|$)/, label: "the driver reference", href: "/reference/drivers.html" },
79+
{ pattern: /(?:^|\/)tutorial(?:[./_-]|$)/, label: "the tutorial", href: "/tutorial.html" },
80+
{ pattern: /(?:^|\/)downloads?(?:[./_-]|$)/, label: "downloads", href: "/download.html" },
81+
{ pattern: /(?:^|\/)faq(?:[./_-]|$)/, label: "the FAQ", href: "/faq.html" },
82+
{ pattern: /(?:^|\/)support(?:[./_-]|$)/, label: "support", href: "/support.html" },
83+
{ pattern: /(?:^|\/)(?:changes?|changelog)(?:[./_-]|$)/, label: "the change history", href: "/changes.html" },
84+
{ pattern: /(?:^|\/)licen[cs]e(?:[./_-]|$)/, label: "the license", href: "/license.html" }
85+
];
86+
87+
var path;
88+
try {
89+
path = decodeURIComponent(window.location.pathname).toLowerCase();
90+
} catch (error) {
91+
path = window.location.pathname.toLowerCase();
92+
}
93+
94+
var route = routes.find(function (candidate) {
95+
return candidate.pattern.test(path);
96+
});
97+
98+
if (!route) {
99+
return;
100+
}
101+
102+
var suggestion = document.querySelector("[data-page-suggestion]");
103+
var link = document.querySelector("[data-page-suggestion-link]");
104+
link.href = route.href;
105+
link.textContent = route.label;
106+
suggestion.hidden = false;
107+
}());
108+
</script>
109+
<!-- StatCounter: existing Scriptella project configuration -->
110+
<script>
111+
var sc_project = 10775960;
112+
var sc_invisible = 1;
113+
var sc_security = "53eaed1c";
114+
</script>
115+
<script defer src="https://secure.statcounter.com/counter/counter.js"></script>
116+
<!-- End StatCounter -->
117+
</body>
118+
</html>

0 commit comments

Comments
 (0)