news.tatooine.club/404.html

43 lines
1.1 KiB
HTML

---
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>