94 lines
5.8 KiB
HTML
94 lines
5.8 KiB
HTML
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover, user-scalable=no" />
|
|
<title>Meatloaf Manipulator</title>
|
|
<meta name="theme-color" content="#4d4d4d" />
|
|
<link rel="manifest" href="/manifest.webmanifest" />
|
|
<link rel="icon" type="image/png" sizes="192x192" href="/icon.192.png" />
|
|
<link rel="icon" type="image/png" sizes="512x512" href="/icon.512.png" />
|
|
<!-- PWA / add-to-home-screen -->
|
|
<meta name="mobile-web-app-capable" content="yes" />
|
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
|
<meta name="apple-mobile-web-app-title" content="Meatloaf" />
|
|
<link rel="apple-touch-icon" href="/icon.192.png" />
|
|
<style>
|
|
html, body { height: 100%; margin: 0; overscroll-behavior: none; }
|
|
#root { height: 100%; }
|
|
/* Pre-React splash: shown from first paint until React mounts and
|
|
replaces #root. Visually matches the in-app LazyLoader (dark
|
|
backdrop, blue progress bar, "Loading…" label) so the handoff is
|
|
seamless. Pure CSS + inline SVG — no JS, no extra requests. */
|
|
#splash {
|
|
position: fixed; inset: 0; z-index: 40;
|
|
background: #0a0a0a;
|
|
display: flex; flex-direction: column; align-items: center; justify-content: center;
|
|
color: #525252; font: 500 12px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
|
|
letter-spacing: 0.05em;
|
|
transition: opacity 250ms ease-out;
|
|
}
|
|
#splash.gone { opacity: 0; pointer-events: none; }
|
|
#splash .bar {
|
|
position: absolute; top: 0; left: 0; right: 0; height: 2px;
|
|
background: #262626; overflow: hidden;
|
|
}
|
|
#splash .bar::after {
|
|
content: ""; display: block; height: 100%; width: 30%;
|
|
background: #3b82f6;
|
|
animation: splash-bar 1500ms ease-in-out infinite;
|
|
}
|
|
#splash .ring {
|
|
width: 24px; height: 24px; margin-bottom: 12px;
|
|
border: 2px solid #262626; border-top-color: #525252;
|
|
border-radius: 50%;
|
|
animation: splash-spin 800ms linear infinite;
|
|
}
|
|
#splash .icon { width: 48px; height: 48px; margin-bottom: 16px; opacity: 0.7; }
|
|
@keyframes splash-spin { to { transform: rotate(360deg); } }
|
|
@keyframes splash-bar { 0% { transform: translateX(-100%); } 100% { transform: translateX(400%); } }
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<div id="root">
|
|
<div id="splash" role="status" aria-live="polite" aria-label="Loading Meatloaf Manipulator">
|
|
<div class="bar"></div>
|
|
<!-- Meatloaf logo from public/assets/icon.svg, inlined as a data URI
|
|
so it works under any Vite base path (/, /config/, etc.) and
|
|
adds no extra HTTP request during the initial bundle load. -->
|
|
<img class="icon" alt="" aria-hidden="true"
|
|
src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iM2luIiBoZWlnaHQ9IjNpbiIgdmlld0JveD0iMCAwIDYyOS4wMDcgNjI5LjAwNyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjNGQ0ZDRkIiBzdHJva2U9IiM0ZDRkNGQiIHN0cm9rZS13aWR0aD0iMjcuOTc0IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGQ9Ik0xNC4zMTggMTMuNzQ5aDYwMC42NjZ2NjAxLjA5NUgxNC4zMTh6Ii8+PGcgc3Ryb2tlLXdpZHRoPSIuMTE0Ij48cGF0aCBkPSJNNTE4LjM3IDQ2MC4yOTVsLjAxMiA3NC41MjhoNzQuNTE1di03NC4zeiIgZmlsbD0iI2ZhNTc0YSIgc3Ryb2tlPSIjZmE1NzRhIiBzdHJva2Utd2lkdGg9Ii40Njk3NjY2NCIvPjxwYXRoIGQ9Ik01MTguMzY5IDM2Ni45MDNsLjAxMiA3NC41MjdoNzQuNTE2di03NC4zeiIgZmlsbD0iI2ZjOTE0OSIgc3Ryb2tlPSIjZmM5MTQ5IiBzdHJva2Utd2lkdGg9Ii40Njk3NjY2NCIvPjxwYXRoIGQ9Ik01MTguMzY5IDI3NS45MDNsLjAxMiA3NC41MjdoNzQuNTE2di03NC4zeiIgZmlsbD0iI2VkZTI0YyIgc3Ryb2tlPSIjZWRlMjRjIiBzdHJva2Utd2lkdGg9Ii40Njk3NjY2NCIvPjxwYXRoIGQ9Ik01MTguMzY5IDE4NC45MDNsLjAxMiA3NC41MjhoNzQuNTE2di03NC4zeiIgZmlsbD0iIzkxY2I0MSIgc3Ryb2tlPSIjOTFjYjQxIiBzdHJva2Utd2lkdGg9Ii40Njk3NjY2NCIvPjxwYXRoIGQ9Ik01MTguMzY5IDkzLjg2NGwuMDEyIDc0LjUyOGg3NC41MTZ2LTc0LjN6IiBmaWxsPSIjNzZjNGYyIiBzdHJva2U9IiM3NmM0ZjIiIHN0cm9rZS13aWR0aD0iLjQ2OTc2NjY0Ii8+PC9nPjxnIGZpbGw9IiNmZmZmZmIiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLXdpZHRoPSIuMjY1Ij48cGF0aCBkPSJNMzcuMDkyIDk1LjA2NmwyMDYuNjEyIDIwNi42MTIuMzM2IDIzMy4xNTItMjA3LjYyLS4zMzZ6TTQ5Ni40MTggOTUuMDY4TDI4OS44MDUgMzAxLjY4bC0uMzM2IDIzMy4xNTMgMjA3LjYyMS0uMzM2eiIgc3Ryb2tlLXdpZHRoPSIxLjA5MjAwMTQiLz48L2c+PC9zdmc+" />
|
|
<div class="ring"></div>
|
|
<span>Loading…</span>
|
|
</div>
|
|
</div>
|
|
<script type="module" src="/src/main.tsx"></script>
|
|
<script>
|
|
// Fade the splash as React takes over. React renders into #root and
|
|
// replaces its children, so we listen for that swap and animate the
|
|
// old splash out instead of just letting it disappear.
|
|
(function () {
|
|
var root = document.getElementById('root');
|
|
if (!root) return;
|
|
var splash = document.getElementById('splash');
|
|
if (!splash) return;
|
|
// Use a MutationObserver to detect when React replaces the splash.
|
|
// The splash node is removed entirely when React renders <App />.
|
|
new MutationObserver(function () {
|
|
if (!document.getElementById('splash')) return;
|
|
if (root.firstChild && root.firstChild.id !== 'splash') {
|
|
splash.classList.add('gone');
|
|
setTimeout(function () { splash.remove(); }, 300);
|
|
}
|
|
}).observe(root, { childList: true });
|
|
// Hard fallback: if JS-driven React never mounts (network failure,
|
|
// bundle error, etc.), keep the splash visible rather than showing
|
|
// a blank page. We do nothing here; the splash is the fallback.
|
|
})();
|
|
</script>
|
|
</body>
|
|
</html>
|
|
|