Skip to content

Commit c2b761c

Browse files
committed
Enhance 404 page with search functionality, visual elements, and better navigation
1 parent 00bb853 commit c2b761c

File tree

1 file changed

+47
-3
lines changed

1 file changed

+47
-3
lines changed

www/pages/404.md

Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,71 @@ permalink: /404.html
55
---
66

77
<div class="flex flex-col items-center justify-center py-12">
8+
<div class="flex items-center justify-center w-24 h-24 bg-red-100 rounded-full mb-6">
9+
<svg xmlns="http://www.w3.org/2000/svg" class="h-12 w-12 text-red-500" fill="none" viewBox="0 0 24 24" stroke="currentColor">
10+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" />
11+
</svg>
12+
</div>
13+
814
<div class="text-6xl font-bold text-primary mb-4">404</div>
915
<h1 class="text-2xl font-bold mb-6">Page Not Found</h1>
1016

1117
<p class="text-lg text-center max-w-md mb-8">
1218
The page you're looking for doesn't exist or has been moved.
1319
</p>
1420

15-
<div class="flex flex-col sm:flex-row gap-4">
21+
<div class="flex flex-col sm:flex-row gap-4 mb-8">
1622
<a href="/" class="btn btn-primary">Go to Homepage</a>
1723
<a href="/spec/" class="btn btn-secondary">Read the Specification</a>
1824
</div>
1925

20-
<div class="mt-12 p-6 border rounded-lg bg-gray-50 max-w-lg">
26+
<div class="w-full max-w-md mb-8">
27+
<h2 class="text-xl font-bold mb-4 text-center">Try searching for what you need</h2>
28+
<div class="relative">
29+
<input type="text" id="search-404" placeholder="Search IPCrypt documentation..." class="w-full p-3 border rounded-lg pr-10">
30+
<button id="search-button-404" class="absolute right-3 top-3 text-gray-500">
31+
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
32+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
33+
</svg>
34+
</button>
35+
</div>
36+
</div>
37+
38+
<div class="mt-4 p-6 border rounded-lg bg-gray-50 max-w-lg">
2139
<h2 class="text-xl font-bold mb-4">Looking for something specific?</h2>
2240
<ul class="space-y-2">
2341
<li><a href="/about/" class="text-primary hover:underline">About IPCrypt</a> - Learn about IPCrypt's purpose and benefits</li>
2442
<li><a href="/spec/" class="text-primary hover:underline">Specification</a> - Read the technical specification</li>
2543
<li><a href="/implementations/" class="text-primary hover:underline">Implementations</a> - Explore available implementations</li>
2644
<li><a href="/resources/" class="text-primary hover:underline">Developer Resources</a> - Find guides and examples</li>
45+
<li><a href="/playground/" class="text-primary hover:underline">Playground</a> - Try IPCrypt in your browser</li>
2746
<li><a href="/examples/" class="text-primary hover:underline">Examples</a> - See IPCrypt in action</li>
2847
<li><a href="/community/" class="text-primary hover:underline">Community</a> - Learn how to contribute</li>
2948
</ul>
3049
</div>
31-
</div>
50+
51+
<div class="mt-8 text-center text-gray-600">
52+
<p>Found a broken link? <a href="https://github.com/ipcrypt-std/ipcrypt-std.github.io/issues/new" class="text-primary hover:underline" target="_blank" rel="noopener">Report it on GitHub</a></p>
53+
</div>
54+
</div>
55+
56+
<script>
57+
document.addEventListener('DOMContentLoaded', function() {
58+
const searchInput = document.getElementById('search-404');
59+
const searchButton = document.getElementById('search-button-404');
60+
61+
function performSearch() {
62+
const query = searchInput.value.trim();
63+
if (query) {
64+
window.location.href = `https://github.com/ipcrypt-std/ipcrypt-std.github.io/search?q=${encodeURIComponent(query)}`;
65+
}
66+
}
67+
68+
searchButton.addEventListener('click', performSearch);
69+
searchInput.addEventListener('keypress', function(e) {
70+
if (e.key === 'Enter') {
71+
performSearch();
72+
}
73+
});
74+
});
75+
</script>

0 commit comments

Comments
 (0)