-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
404.html
43 lines (36 loc) · 1.1 KB
/
404.html
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
35
36
37
38
39
40
41
42
43
---
permalink: /404.html
layout: default
---
<style type="text/css" media="screen">
.container {
margin: 10px auto;
max-width: 600px;
text-align: center;
}
h1 {
margin: 30px 0;
font-size: 4em;
line-height: 1;
letter-spacing: -1px;
}
</style>
<div class="container">
<h1>404</h1>
<p><strong>Page not found :(</strong></p>
<p>The requested page could not be found.</p>
<p>This website only keeps articles from the last few days, so if you landed here from a link, it's likely that the article is no longer available. This page will automatically redirect to Beatroot News in such cases.</p>
</div>
<script>
// Get the current pathname
var currentPath = window.location.pathname;
// Extract the integer from the pathname using regular expressions
var match = currentPath.match(/\/(\d+)\//);
// Check if a match is found and the matched string is an integer
if (match && !isNaN(match[1])) {
// Extract the integer value
var integer = match[1];
// Redirect the user to the desired URL
window.location.href = `https://app.beatrootnews.com/#article-${integer}`;
}
</script>