|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="en"> |
| 3 | + |
| 4 | +<head> |
| 5 | + <meta charset="utf-8"> |
| 6 | + <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover"> |
| 7 | + <meta name="theme-color" content="#05070d"> |
| 8 | + <meta name="apple-mobile-web-app-capable" content="yes"> |
| 9 | + <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"> |
| 10 | + <title>LEOINO // OFFLINE</title> |
| 11 | + <style> |
| 12 | + :root { |
| 13 | + --cp-bg: #05070d; |
| 14 | + --cp-cyan: #00f0ff; |
| 15 | + --cp-magenta: #ff2a6d; |
| 16 | + --cp-dim: #6b7a99; |
| 17 | + } |
| 18 | + |
| 19 | + * { |
| 20 | + box-sizing: border-box; |
| 21 | + } |
| 22 | + |
| 23 | + html, |
| 24 | + body { |
| 25 | + margin: 0; |
| 26 | + height: 100%; |
| 27 | + } |
| 28 | + |
| 29 | + body { |
| 30 | + background: radial-gradient(circle at 50% 30%, #0b1022 0%, var(--cp-bg) 70%); |
| 31 | + color: #cfe9ff; |
| 32 | + font-family: "Rajdhani", "Segoe UI", system-ui, -apple-system, sans-serif; |
| 33 | + display: flex; |
| 34 | + flex-direction: column; |
| 35 | + align-items: center; |
| 36 | + justify-content: center; |
| 37 | + text-align: center; |
| 38 | + padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom)); |
| 39 | + min-height: 100vh; |
| 40 | + overflow: hidden; |
| 41 | + } |
| 42 | + |
| 43 | + .glyph { |
| 44 | + width: 96px; |
| 45 | + height: 96px; |
| 46 | + margin-bottom: 28px; |
| 47 | + color: var(--cp-magenta); |
| 48 | + filter: drop-shadow(0 0 14px rgba(255, 42, 109, .55)); |
| 49 | + animation: pulse 2.2s ease-in-out infinite; |
| 50 | + } |
| 51 | + |
| 52 | + @keyframes pulse { |
| 53 | + |
| 54 | + 0%, |
| 55 | + 100% { |
| 56 | + opacity: .55; |
| 57 | + transform: scale(1); |
| 58 | + } |
| 59 | + |
| 60 | + 50% { |
| 61 | + opacity: 1; |
| 62 | + transform: scale(1.04); |
| 63 | + } |
| 64 | + } |
| 65 | + |
| 66 | + h1 { |
| 67 | + font-family: "Orbitron", "Rajdhani", sans-serif; |
| 68 | + letter-spacing: .18em; |
| 69 | + text-transform: uppercase; |
| 70 | + font-size: 1.5rem; |
| 71 | + margin: 0 0 10px; |
| 72 | + color: var(--cp-cyan); |
| 73 | + text-shadow: 0 0 12px rgba(0, 240, 255, .6); |
| 74 | + } |
| 75 | + |
| 76 | + p { |
| 77 | + max-width: 360px; |
| 78 | + line-height: 1.5; |
| 79 | + color: var(--cp-dim); |
| 80 | + margin: 0 0 28px; |
| 81 | + font-size: 1rem; |
| 82 | + } |
| 83 | + |
| 84 | + .status { |
| 85 | + font-family: "Share Tech Mono", monospace; |
| 86 | + letter-spacing: .15em; |
| 87 | + text-transform: uppercase; |
| 88 | + font-size: .8rem; |
| 89 | + color: var(--cp-magenta); |
| 90 | + margin-bottom: 6px; |
| 91 | + } |
| 92 | + |
| 93 | + button { |
| 94 | + font-family: "Rajdhani", sans-serif; |
| 95 | + font-weight: 600; |
| 96 | + text-transform: uppercase; |
| 97 | + letter-spacing: .12em; |
| 98 | + font-size: 1rem; |
| 99 | + color: var(--cp-cyan); |
| 100 | + background: rgba(0, 240, 255, .06); |
| 101 | + border: 1px solid rgba(0, 240, 255, .5); |
| 102 | + border-radius: 6px; |
| 103 | + padding: 12px 28px; |
| 104 | + cursor: pointer; |
| 105 | + transition: all .25s ease; |
| 106 | + min-width: 200px; |
| 107 | + } |
| 108 | + |
| 109 | + button:hover, |
| 110 | + button:active { |
| 111 | + color: #021019; |
| 112 | + background: var(--cp-cyan); |
| 113 | + box-shadow: 0 0 18px rgba(0, 240, 255, .6); |
| 114 | + } |
| 115 | + |
| 116 | + button:disabled { |
| 117 | + opacity: .5; |
| 118 | + pointer-events: none; |
| 119 | + } |
| 120 | + |
| 121 | + .foot { |
| 122 | + position: fixed; |
| 123 | + bottom: max(14px, env(safe-area-inset-bottom)); |
| 124 | + left: 0; |
| 125 | + right: 0; |
| 126 | + font-family: "Share Tech Mono", monospace; |
| 127 | + font-size: .7rem; |
| 128 | + letter-spacing: .12em; |
| 129 | + color: rgba(107, 122, 153, .7); |
| 130 | + } |
| 131 | + </style> |
| 132 | +</head> |
| 133 | + |
| 134 | +<body> |
| 135 | + <svg class="glyph" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" |
| 136 | + stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> |
| 137 | + <path d="M18.36 6.64a9 9 0 1 1-12.73 0" /> |
| 138 | + <line x1="12" y1="2" x2="12" y2="12" /> |
| 139 | + </svg> |
| 140 | + <div class="status" id="status">// signal lost</div> |
| 141 | + <h1>ESPuino Offline</h1> |
| 142 | + <p>The player is powered down or out of reach. This screen stays available so the app never goes dark. It will |
| 143 | + reconnect automatically once the device is back online.</p> |
| 144 | + <button id="retry" type="button">Reconnect</button> |
| 145 | + <div class="foot">LEO INDUSTRIES // AT-1 · NEON DREAMS RUN ON ESP32</div> |
| 146 | + |
| 147 | + <script> |
| 148 | + (function () { |
| 149 | + var btn = document.getElementById('retry'); |
| 150 | + var status = document.getElementById('status'); |
| 151 | + |
| 152 | + // Probe a small, auth-exempt endpoint. On success the device is back -> load the app. |
| 153 | + function probe() { |
| 154 | + return fetch('/manifest.json', { method: 'GET', cache: 'no-store' }) |
| 155 | + .then(function (r) { return r && r.ok; }) |
| 156 | + .catch(function () { return false; }); |
| 157 | + } |
| 158 | + |
| 159 | + function attempt(manual) { |
| 160 | + if (manual) { |
| 161 | + btn.disabled = true; |
| 162 | + status.textContent = '// reconnecting…'; |
| 163 | + } |
| 164 | + probe().then(function (online) { |
| 165 | + if (online) { |
| 166 | + status.textContent = '// link restored'; |
| 167 | + location.replace('/'); |
| 168 | + } else if (manual) { |
| 169 | + btn.disabled = false; |
| 170 | + status.textContent = '// still offline'; |
| 171 | + } |
| 172 | + }); |
| 173 | + } |
| 174 | + |
| 175 | + btn.addEventListener('click', function () { attempt(true); }); |
| 176 | + // silent auto-retry every 5s |
| 177 | + setInterval(function () { attempt(false); }, 5000); |
| 178 | + // also retry as soon as the OS reports connectivity is back |
| 179 | + window.addEventListener('online', function () { attempt(false); }); |
| 180 | + })(); |
| 181 | + </script> |
| 182 | +</body> |
| 183 | + |
| 184 | +</html> |
0 commit comments