Previously /blog returned JSON 404 because only /blog/:slug was wired;
now app.get('/blog') serves the existing public/blog.html.
notFound middleware now detects browser GETs (Accept: text/html,
path not /api/*) and serves public/404.html; API clients keep JSON.
Added public/404.html styled to match the site theme.
Also cleaned up 11 pre-existing lint errors in src/server.js (unused
rate-limit/csrf imports, brace-style on the cache-control chain) while
editing the file.
43 lines
2 KiB
HTML
43 lines
2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Page Not Found | Tractatus AI Safety Framework</title>
|
|
<meta name="description" content="The page you were looking for does not exist.">
|
|
<meta name="robots" content="noindex,nofollow">
|
|
<link rel="icon" type="image/svg+xml" href="/favicon-new.svg">
|
|
<link rel="stylesheet" href="/css/tailwind.css?v=0.1.2.1776366945602">
|
|
<link rel="stylesheet" href="/css/tractatus-theme.min.css?v=0.1.2.1776366945602">
|
|
<style>
|
|
a:focus, button:focus { outline: 3px solid #3b82f6; outline-offset: 2px; }
|
|
a:focus:not(:focus-visible) { outline: none; }
|
|
a:focus-visible { outline: 3px solid #3b82f6; outline-offset: 2px; }
|
|
</style>
|
|
</head>
|
|
<body class="bg-gray-50 min-h-screen flex flex-col">
|
|
|
|
<!-- Navigation (injected by navbar.js) -->
|
|
<script src="/js/components/navbar.js?v=0.1.2.1776366945602"></script>
|
|
|
|
<main class="flex-1 flex items-center justify-center px-4 py-16">
|
|
<div class="max-w-xl text-center">
|
|
<p class="text-sm font-semibold text-indigo-700 uppercase tracking-wider mb-3">404</p>
|
|
<h1 class="text-4xl sm:text-5xl font-bold text-gray-900 mb-4">Page not found</h1>
|
|
<p class="text-lg text-gray-600 mb-8">
|
|
The page you were looking for does not exist, may have moved, or may never have been published.
|
|
</p>
|
|
<div class="flex items-center justify-center gap-4 flex-wrap">
|
|
<a href="/" class="inline-flex items-center bg-blue-700 text-white px-6 py-3 rounded-lg font-semibold hover:bg-blue-800 transition shadow-md border-2 border-blue-900">
|
|
Go to home
|
|
</a>
|
|
<a href="/blog" class="inline-flex items-center text-gray-700 hover:text-indigo-700 px-4 py-3 rounded-lg font-medium border border-gray-300 hover:border-indigo-300 transition">
|
|
Browse the blog
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
|
|
<script src="/js/components/footer.js?v=0.1.2.1776366945602"></script>
|
|
</body>
|
|
</html>
|