-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path404-raw.html
102 lines (92 loc) · 5.18 KB
/
404-raw.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<!DOCTYPE html>
<html lang="en">
<head>
<!-- ToDo: Maybe Sync this header with the main page header, for example by adding the header to a seperate file and building both files with it?
However, some things from the main page where removed here, so maye not.-->
<meta charset="UTF-8">
<title>phseiff - opinions & obscurities</title>
<meta name="description" content="
Views about politics, social topics, economics, and whatever else I deem worth talking about. Let yourself be enriched by some opinions & obscurities!"/>
<meta property="og:title" content="phseiff - opinions & obscurities"/>
<meta property="og:type" content="website"/>
<meta property="og:image" content="https://phseiff.com/images/icon.jpeg"/>
<meta property="og:url" content="https://phseiff.com"/>
<meta property="og:description" content="
Views about politics, social topics, economics, and whatever else I deem worth talking about. Let yourself be enriched by some opinions & obscurities!"/>
<meta name="twitter:card" content="summary"/>
<meta name="twitter:site" content="@phseiff"/>
<meta name="twitter:creator" content="@phseiff"/>
<meta name="twitter:image" content="https://phseiff.com/images/icon.jpeg"/>
<meta name="twitter:title" content="phseiff - opinions & obscurities"/>
<meta name="twitter:description" content="
Views about politics, social topics, economics, and whatever else I deem worth talking about. Let yourself be enriched by some opinions & obscurities!"/>
<link type="text/css" rel="stylesheet" href="/materialize-css/materialize.min.css" media="screen,projection"/>
<link type="text/css" rel="stylesheet" href="/google-fonts/icons.min.css"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<! color scheme >
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="theme-color" content="orange">
<meta name="msapplication-navbutton-color" content="orange">
<meta name="apple-mobile-web-app-status-bar-style" content="orange">
<! Be an exception for darkreader >
<meta name="darkreader" content="104d4afa-2a17-4971-b5af-7914e4f49e72">
</head>
<body>
<span style="text-align: center;">
<style>
.h2class {
color: orange;
}
</style>
<!-- HTML -->
<a href="https://phseiff.com">
<img src="/images/404.jpeg" alt="404" title="visit phseiff.com!" class="circle"
style="width: 400px; height: 400px; display: block; margin: 0 auto; max-width: 80vw; max-height: 80vw;">
</a>
<h4 class="h2class">Hm.... Looks like the
<span id="page-or-essay">page</span>
you wanted to access does not exist here.</h4>
<h5>But you can visit <a href="https://phseiff.com">phseiff.com</a> for more opinions & obscurities! :)</h5>
<!--- Redirection -->
<script>
/* This is code to redirect from phseiff.com/e/foo to phseiff.com/#foo in case an essay exists, but is not
listed on the page and thus not accessible via /e/ in the URL. If the essay does not exist, but the URL
scheme is /e/ anyways, replace "page" in the "apology"-text with "essay".
*/
if (window.location.pathname.startsWith("/e/")) {
let essay_name = window.location.pathname.replace("/e/", "");
console.log("Essay name:", essay_name);
if (!essay_name.includes("/")) {
console.log("Essay requested!");
// Send request to determine whether page exists.
let request = new XMLHttpRequest();
request.open('GET', 'https://phseiff.com/phseiff-essays/' + essay_name + '.md', true);
request.onreadystatechange = function(){
if (request.readyState === 4){
if (request.status === 404) {
console.log("The essay does not exist!");
document.getElementById("page-or-essay").innerText = "essay";
}
else {
console.log("Redirecting!");
window.location.href = window.location.protocol + "//" + window.location.host + "/#" + essay_name;
}
}
};
request.send();
}
}
</script>
<!-- Dark Mode -->
<script type="text/javascript" src="/darkreader/darkreader.min.js"></script>
<script>
DarkReader.setFetchMethod(window.fetch);
DarkReader.enable({
brightness: 100,
contrast: 90,
sepia: 10
});
</script>
</span>
</body>
</html>