Skip to content

Commit a6a6547

Browse files
committed
Fix: Add main landmark to offline and 404 pages for accessibility
1 parent 4d80fee commit a6a6547

2 files changed

Lines changed: 47 additions & 9 deletions

File tree

web/public/offline.html

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<!DOCTYPE html>
22
<html lang="en">
3+
34
<head>
45
<meta charset="UTF-8">
56
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -10,6 +11,7 @@
1011
--background: #ffffff;
1112
--text: #1f2937;
1213
}
14+
1315
body {
1416
margin: 0;
1517
padding: 0;
@@ -24,6 +26,7 @@
2426
text-align: center;
2527
padding: 20px;
2628
}
29+
2730
.icon-container {
2831
width: 80px;
2932
height: 80px;
@@ -35,24 +38,28 @@
3538
margin-bottom: 24px;
3639
box-shadow: 0 10px 25px -5px rgba(204, 119, 34, 0.4);
3740
}
41+
3842
svg {
3943
width: 40px;
4044
height: 40px;
4145
color: white;
4246
}
47+
4348
h1 {
4449
font-size: 24px;
4550
font-weight: 800;
4651
margin-bottom: 8px;
4752
color: #111827;
4853
}
54+
4955
p {
5056
font-size: 16px;
5157
color: #6b7280;
5258
max-width: 280px;
5359
line-height: 1.5;
5460
margin-bottom: 32px;
5561
}
62+
5663
.retry-button {
5764
background-color: var(--ochre);
5865
color: white;
@@ -66,19 +73,26 @@
6673
letter-spacing: 0.05em;
6774
font-size: 14px;
6875
}
76+
6977
.retry-button:active {
7078
transform: scale(0.95);
7179
}
7280
</style>
7381
</head>
82+
7483
<body>
75-
<div class="icon-container">
76-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor">
77-
<path stroke-linecap="round" stroke-linejoin="round" d="M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z" />
78-
</svg>
79-
</div>
80-
<h1>Seek Grace in Silence</h1>
81-
<p>It seems your connection is resting. Please check your network to continue your spiritual journey.</p>
82-
<button class="retry-button" onclick="window.location.reload()">Retry Connection</button>
84+
<main>
85+
<div class="icon-container">
86+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2"
87+
stroke="currentColor">
88+
<path stroke-linecap="round" stroke-linejoin="round"
89+
d="M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z" />
90+
</svg>
91+
</div>
92+
<h1>Seek Grace in Silence</h1>
93+
<p>It seems your connection is resting. Please check your network to continue your spiritual journey.</p>
94+
<button class="retry-button" onclick="window.location.reload()">Retry Connection</button>
95+
</main>
8396
</body>
84-
</html>
97+
98+
</html>

web/src/app/not-found.tsx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
'use client';
2+
3+
import Layout from '@/components/layout/Layout';
4+
import Link from 'next/link';
5+
6+
export default function NotFound() {
7+
return (
8+
<Layout>
9+
<div className="flex flex-col items-center justify-center min-h-[60vh] text-center px-4">
10+
<h2 className="text-4xl font-black text-ochre mb-4">404</h2>
11+
<h3 className="text-xl font-bold text-gray-900 mb-2">Page Not Found</h3>
12+
<p className="text-gray-600 mb-8 max-w-md">
13+
The spiritual path you are looking for does not exist or has been moved.
14+
</p>
15+
<Link
16+
href="/"
17+
className="px-6 py-3 bg-ochre text-white rounded-xl font-bold uppercase tracking-wider hover:bg-orange-700 transition-colors"
18+
>
19+
Return Home
20+
</Link>
21+
</div>
22+
</Layout>
23+
);
24+
}

0 commit comments

Comments
 (0)