feat(pwa): add offline.html fallback page (HIG-styled)
This commit is contained in:
@@ -0,0 +1,87 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
||||
<meta name="theme-color" content="#166534">
|
||||
<title>Offline — Route Commerce</title>
|
||||
<style>
|
||||
:root {
|
||||
--color-bg: #ffffff;
|
||||
--color-surface: #faf8f5;
|
||||
--color-text: #1d1d1f;
|
||||
--color-text-muted: #424245;
|
||||
--color-accent: #166534;
|
||||
--color-warning: #854d0e;
|
||||
}
|
||||
* { box-sizing: border-box; }
|
||||
html, body { margin: 0; padding: 0; }
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Manrope, system-ui, sans-serif;
|
||||
background: var(--color-surface);
|
||||
color: var(--color-text);
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 24px;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
.card {
|
||||
max-width: 480px;
|
||||
width: 100%;
|
||||
background: var(--color-bg);
|
||||
border-radius: 24px;
|
||||
padding: 48px 32px;
|
||||
text-align: center;
|
||||
box-shadow: 0 4px 24px rgba(0,0,0,0.06);
|
||||
}
|
||||
.icon {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
margin: 0 auto 24px;
|
||||
background: var(--color-warning);
|
||||
color: white;
|
||||
border-radius: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 32px;
|
||||
}
|
||||
h1 {
|
||||
font-family: Fraunces, Georgia, serif;
|
||||
font-size: 32px;
|
||||
font-weight: 600;
|
||||
margin: 0 0 12px;
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
p {
|
||||
font-size: 18px;
|
||||
line-height: 1.45;
|
||||
color: var(--color-text-muted);
|
||||
margin: 0 0 24px;
|
||||
}
|
||||
button {
|
||||
background: var(--color-accent);
|
||||
color: white;
|
||||
border: 0;
|
||||
border-radius: 12px;
|
||||
padding: 16px 32px;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.02em;
|
||||
cursor: pointer;
|
||||
min-height: 56px;
|
||||
}
|
||||
button:active { opacity: 0.85; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="card" role="status">
|
||||
<div class="icon" aria-hidden="true">📡</div>
|
||||
<h1>You're offline</h1>
|
||||
<p>This page isn't available without a connection. Cached pages will still work. Your changes will sync when you're back online.</p>
|
||||
<button type="button" onclick="location.reload()">Try again</button>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user