Create 404.html with redirects (#1889)

* Create 404.html with redirects

* Create index.html
This commit is contained in:
Jeffrey Warren
2025-09-06 03:26:01 -04:00
committed by GitHub
parent 3a1e332721
commit 7be289779a
2 changed files with 59 additions and 0 deletions

36
404.html Normal file
View File

@@ -0,0 +1,36 @@
<!doctype html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta charset="utf-8"/>
<title>MapKnitter | static archive</title>
<link rel="stylesheet" href="https://jywarren.github.io/markdown-pages/node_modules/spectre-markdown.css/dist/markdown.css">
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Lora">
<link rel="stylesheet" href="https://jywarren.github.io/markdown-pages-template/style.css">
</head>
<body>
<header>
<a href="#">MapKnitter</a>
</header>
<div class="md-pages markdown-css responsive"></div>
<!--
https://mapknitter.org/map/tidwell-park
should become:
https://publiclab.github.io/Leaflet.DistortableImage/examples/archive?json=https://archive.org/download/mapknitter-wayback/tidwell-park.json
and same with https://mapknitter.org/embed/tidwell-park
-->
<script>
if (window.location == "https://mapknitter.org/") {
window.location = "https://publiclab.github.io/Leaflet.DistortableImage/examples/archive/";
} else if (window.location.split('/')[4] == "embed") {
var path = "https://publiclab.github.io/Leaflet.DistortableImage/examples/archive?json=https://archive.org/download/mapknitter-wayback/" + document.location.href.split('.org/embed/')[1];
window.location.replace("https://publiclab.github.io/Leaflet.DistortableImage/" + path);
} else {
var path = "https://publiclab.github.io/Leaflet.DistortableImage/examples/archive?json=https://archive.org/download/mapknitter-wayback/" + document.location.href.split('.org/map/')[1];
window.location.replace("https://publiclab.github.io/Leaflet.DistortableImage/" + path);
}
</script>
</body>
</html>

23
index.html Normal file
View File

@@ -0,0 +1,23 @@
<!doctype html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta charset="utf-8"/>
<title>MapKnitter | static archive</title>
<link rel="stylesheet" href="https://jywarren.github.io/markdown-pages/node_modules/spectre-markdown.css/dist/markdown.css">
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Lora">
<link rel="stylesheet" href="https://jywarren.github.io/markdown-pages-template/style.css">
</head>
<body>
<header>
<a href="#">MapKnitter</a>
</header>
<div class="md-pages markdown-css responsive"></div>
Redirecting to <a href="https://publiclab.github.io/Leaflet.DistortableImage/examples/archive/">https://publiclab.github.io/Leaflet.DistortableImage/examples/archive/</a> ...
<script>
window.location = "https://publiclab.github.io/Leaflet.DistortableImage/examples/archive/";
</script>
</body>
</html>