-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy path404.html
More file actions
52 lines (45 loc) · 1.74 KB
/
404.html
File metadata and controls
52 lines (45 loc) · 1.74 KB
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
---
permalink: /404.html
layout: home
title: "Page Not Found"
nav_exclude: true
search_exclude: true
collection: none
visibility: hidden
---
<main class="error-container">
<h1>Page not found</h1>
<p>We are sorry. This page no longer exists or has been moved.</p>
<p>You can try one of the following options:</p>
<ul class="links">
<li><a href="#" id="focus-search" onclick="$('#searchToggle').trigger('click'); return false;">Search the Documentation</a></li>
<li><a href="/" class="primary-link">Go to the homepage</a></li>
<li id="go-back-item"><a href="#" id="go-back">Return to the previous page</a></li>
</ul>
<div id="pageEval" style="text-align: left;">
<div class="siteReviewThumbs">
<span id="yesSiteReviewThumb"></span>
<span>If you got here via a link, </span>
<span id="noSiteReviewThumb" class="siteReviewThumb noselect" data-toggle="popover" data-html="true">please let us know </span>
<span> so that we can improve the Documentation for everyone.</span>
</div>
</div>
</main>
<script>
// Go back if appropriate
const backItem = document.getElementById('go-back-item');
const backLink = document.getElementById('go-back');
const referrer = document.referrer;
const hasHistory = window.history.length > 1;
const isLocalhost = location.hostname === "localhost" || location.hostname === "127.0.0.1";
const allowedReferrer = referrer && referrer.startsWith("https://docs.evolveum.com");
// Show Go back only if history > 1 AND (localhost OR allowedReferrer)
if (hasHistory && (isLocalhost || allowedReferrer)) {
backLink.addEventListener('click', (e) => {
e.preventDefault();
window.history.back();
});
} else {
backItem.style.display = 'none';
}
</script>