Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
207 changes: 37 additions & 170 deletions DISCOVER/404.html
Original file line number Diff line number Diff line change
@@ -1,170 +1,37 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>404 - Not Found</title>
<style>
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
height: 100vh;
background: linear-gradient(135deg, black, #e4f0ff);
display: flex;
align-items: center;
justify-content: center;
font-family: 'Segoe UI', sans-serif;
overflow: hidden;
position: relative;
}

.light-blur {
position: absolute;
width: 500px;
height: 500px;
background: radial-gradient(circle at center, transparent);
border-radius: 50%;
filter: blur(80px);
top: 20%;
left: 10%;
animation: drift 10s ease-in-out infinite alternate;
z-index: 0;
}

@keyframes drift {
0% { transform: translate(0, 0); }
100% { transform: translate(60px, 30px); }
}

.glass-card {
background: rgba(255, 255, 255, 0.25);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
padding: 2.5rem 3rem;
border-radius: 20px;
border: 1px solid rgba(255, 255, 255, 0.3);
max-width: 500px;
text-align: center;
z-index: 1;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

h1 {
font-size: 2.5em;
color: rgb(52, 51, 51);
margin-bottom: 0.5rem;
}

p {
font-size: 1.1em;
color: rgb(52, 51, 51);
margin-bottom: 1.4rem;
}

a {
display: inline-block;
margin: 0.4rem;
padding: 0.6rem 1rem;
border-radius: 8px;
text-decoration: none;
background: #d0bfff;
color: #1f1f1f;
font-weight: 600;
transition: background 0.3s ease;
}

a:hover {
background: #c1aaff;
}

select {
margin-top: 1rem;
padding: 0.5rem;
border-radius: 6px;
border: 1px solid #ccc;
font-size: 1em;
background: #fff;
}
</style>
</head>
<body>
<div class="light-blur"></div>
<div class="glass-card">
<h1 id="title">404 - Page Not Found</h1>
<p id="message">This page might’ve wandered off or was never here at all.</p>
<p id="suggestion">Maybe it was deleted, renamed, or never existed in the first place.</p>
<p><strong id="what-do">What can you do?</strong></p>
<a href="./intro.html" id="home">⬅️ Back to Home</a>
<a href="https://github.com/numfocus/DISCOVER-Cookbook/issues" id="report">🐞 Report the Issue</a>

<div>
<label for="language-switcher" style="display:block; margin-top:1.5rem; color:#444;">🌐 Switch Language:</label>
<select id="language-switcher">
<option value="en">English</option>
<option value="es">Español</option>
</select>
</div>

<p id="footer" style="margin-top: 1.2rem;">If you think this is an error, let us know by creating an issue.</p>
</div>

<script>
const translations = {
en: {
title: "404 - Page Not Found",
message: "This page might’ve wandered off or was never here at all.",
suggestion: "Maybe it was deleted, renamed, or never existed in the first place.",
whatDo: "What can you do?",
home: "⬅️ Back to Home",
report: "🐞 Report the Issue",
footer: "If you think this is an error, let us know by creating an issue."
},
es: {
title: "404 - Página no encontrada",
message: "Esta página se ha perdido o nunca existió.",
suggestion: "Tal vez fue eliminada, renombrada o nunca existió.",
whatDo: "¿Qué puedes hacer?",
home: "⬅️ Volver al inicio",
report: "🐞 Informar del problema",
footer: "Si crees que esto es un error, infórmanos creando un issue."
}
};

function detectLanguage() {
const pathLang = location.pathname.split("/")[1];
const refLang = new URL(document.referrer || "", location.origin).pathname.split("/")[1];
const storedLang = localStorage.getItem("preferredLang");
return translations[pathLang]
? pathLang
: translations[refLang]
? refLang
: translations[storedLang]
? storedLang
: "en";
}

function applyLanguage(lang) {
const t = translations[lang] || translations["en"];
document.getElementById("title").textContent = t.title;
document.getElementById("message").textContent = t.message;
document.getElementById("suggestion").textContent = t.suggestion;
document.getElementById("what-do").textContent = t.whatDo;
document.getElementById("home").textContent = t.home;
document.getElementById("report").textContent = t.report;
document.getElementById("footer").textContent = t.footer;
document.getElementById("language-switcher").value = lang;
localStorage.setItem("preferredLang", lang);
}

const initialLang = detectLanguage();
applyLanguage(initialLang);

document.getElementById("language-switcher").addEventListener("change", function () {
applyLanguage(this.value);
});
</script>
</body>
</html>
{% extends "sphinx_book_theme/layout.html" %}

{% block content %}

<div style="text-align:center; padding:60px 20px;">
<h1 style="font-size:80px; color:#2e7d32; margin-bottom:10px;">404</h1>
<h2>Oops! Page not found</h2>

<p style="max-width:500px; margin:20px auto; color:#555;">
The page you are looking for doesn't exist or has been moved.
Let's get you back to the DISCOVER Cookbook.
</p>

<a href="/" style="
background:#2e7d32;
color:white;
padding:12px 24px;
border-radius:8px;
text-decoration:none;
margin:10px;
display:inline-block;">
Go Home
</a>

<a href="/intro.html" style="
border:2px solid #2e7d32;
color:#2e7d32;
padding:12px 24px;
border-radius:8px;
text-decoration:none;
margin:10px;
display:inline-block;">
Start Reading
</a>
</div>

{% endblock %}
31 changes: 31 additions & 0 deletions _build/logs/myst.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"input": {
"files": [
"DISCOVER"
],
"opts": {
"execute": false,
"executeParallel": 11,
"pdf": false,
"tex": false,
"typst": false,
"docx": false,
"md": false,
"xml": false,
"meca": false,
"cff": false,
"site": false,
"html": false,
"all": false,
"doiBib": false,
"watch": false,
"force": false,
"checkLinks": false,
"strict": false,
"ci": false,
"maxSizeWebp": 1572864,
"keepHost": false
}
},
"exports": []
}