commit: 93423d06f2ee74d7328ff4edf6e887fec40aea17
parent 46a74ce09d97b6d072451307888e20813815de70
Author: Лu Лinveгa <aliceffekt@gmail.com>
Date: Fri, 14 Jun 2019 09:40:34 +0900
Merge pull request #7 from microlith57/patch-3
Fix redirection weirdness
Diffstat:
M | 404.html | 40 | +++++++++++++++++++++++++++++++++------- |
1 file changed, 33 insertions(+), 7 deletions(-)
diff --git a/404.html b/404.html
@@ -5,24 +5,50 @@ permalink: /404.html
<html lang="en">
<head>
<meta charset="utf-8">
- <title>Loading..</title>
+ <title>Loading...</title>
+ <style>
+ .fadein {
+ -webkit-animation: fadein 3s linear 0s 1;
+ animation: fadein 3s linear 0s 1;
+ }
+
+ @-webkit-keyframes fadein {
+ 0% {opacity: 0;}
+ 50% {opacity: 0;}
+ 100% {opacity: 1;}
+ }
+ @keyframes fadein {
+ 0% {opacity: 0;}
+ 50% {opacity: 0;}
+ 100% {opacity: 1;}
+ }
+
+ body {
+ font-family: 'Helvetica Neue', Helvetica, Arial;
+ }
+ </style>
</head>
<body style='background:black; color:white'>
<script>
- var parts = window.location.pathname.split("/")
- var target = parts.slice(-1);
- parts.splice(-1)
- document.location.href = parts.join("/")+"/#"+target
+ // Find current path (relative to grimgrains.com)
+ var target = decodeURI(window.location.pathname);
+
+ // Fancy slugify regex bit
+ target = target.toLowerCase();
+ target = target.replace(/[\s·\\/_'",:;\.-]+/g, '+'); // Replace whitespace and "·\/_'",:;.-" to "+"
+ target = target.replace(/^\++|\++$/g, ''); // Remove "+"es at start and end
+
+ document.location.href = document.location.origin + "/#" + target; // Go to grimgrains.com/#target
</script>
- <h1>
+ <h1 class="fadein">
Loading, please wait.
<br />
If this takes a long time, please check your Javascript settings.
</h1>
<noscript>
- <h2>
+ <h2 class="fadein">
This website requires Javascript. To view the content, please enable it in your browser settings.
</h2>
</noscript>