-
Notifications
You must be signed in to change notification settings - Fork 7
/
404.html
49 lines (44 loc) · 1.31 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
44
45
46
47
48
49
---
title: 404
permalink: 404.html
layout: page
subtitle: Uh, oh!<br>The link you're looking for no longer exists.
call_to_action: 'Contact Us'
call_to_action_link: 'mailto:[email protected]'
early_javascript: |
// Redirect bjc-r/ to cs10.org/
if (location.pathname.indexOf('/bjc-r') == 0) {
window.location = 'https://cs10.org' + location.pathname + location.search;
}
---
<script>
function checkArchive() {
if (!$) {return; }
if (location.pathname.indexOf('/archive') == 0) {
// Just so things don't look ugly.
$('.js-archivePath').attr('href', location.href).text(location.href)
return;
}
$('.js-archivePath').attr('href', '/archive' + location.pathname).html(
location.origin + '/archive' + location.pathname
)
$.ajax({
method: 'GET',
url: '/archive' + location.pathname,
success: function () {
location.href = '/archive' + location.pathname
}
})
}
document.addEventListener("DOMContentLoaded", checkArchive);
</script>
<!--
TODO:
* try to redirect to a different URL
* Show the URL they tried to access
-->
{% capture section_content %}
<div class="js-redirectNotice"></div>
<h4>We've recently moved some files around. Try checking: <a class="js-archivePath"></a>.</h4>
{% endcapture %}
{% include section.html %}