ytptube/ui/app/spa-loading-template.html
2026-04-22 18:07:21 +03:00

212 lines
4.9 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#0f172a" />
<title>Loading YTPTube</title>
<style>
:root {
color-scheme: light dark;
--bg: #edf2f9;
--bg-deep: #dbe5f1;
--panel: rgb(255 255 255 / 0.84);
--border: rgb(15 23 42 / 0.1);
--shadow: rgb(15 23 42 / 0.14);
--text: #0f172a;
--muted: #5b6b80;
--accent: #dc2626;
--accent-soft: rgb(220 38 38 / 0.18);
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #08111d;
--bg-deep: #0f172a;
--panel: rgb(15 23 42 / 0.84);
--border: rgb(148 163 184 / 0.16);
--shadow: rgb(2 6 23 / 0.45);
--text: #e7eef9;
--muted: #9fb0c7;
--accent: #f87171;
--accent-soft: rgb(248 113 113 / 0.18);
}
}
* {
box-sizing: border-box;
}
html,
body {
min-height: 100%;
}
body {
margin: 0;
min-height: 100vh;
min-height: 100dvh;
padding: 1rem;
display: grid;
place-items: center;
overflow: hidden;
color: var(--text);
user-select: none;
font-family:
system-ui,
-apple-system,
BlinkMacSystemFont,
'Segoe UI',
sans-serif;
background:
radial-gradient(circle at top left, var(--accent-soft), transparent 24%),
linear-gradient(180deg, var(--bg-deep), var(--bg));
}
body::before {
content: '';
position: fixed;
inset: 0;
pointer-events: none;
background:
linear-gradient(rgb(255 255 255 / 0.035) 1px, transparent 1px),
linear-gradient(90deg, rgb(255 255 255 / 0.035) 1px, transparent 1px);
background-size: 2rem 2rem;
opacity: 0.32;
}
.loading-card {
width: min(100%, 29rem);
position: relative;
padding: 1.65rem;
border: 1px solid var(--border);
border-radius: 1.1rem;
background: var(--panel);
box-shadow: 0 1rem 2.5rem var(--shadow);
backdrop-filter: blur(16px);
}
.brand {
display: flex;
align-items: center;
gap: 0.95rem;
}
.brand img {
width: 2.8rem;
height: 2.8rem;
flex: none;
display: block;
object-fit: contain;
}
.brand-copy {
min-width: 0;
}
.label {
margin: 0;
font-size: 0.74rem;
font-weight: 700;
letter-spacing: 0.18em;
text-transform: uppercase;
color: var(--muted);
}
h1 {
margin: 0.35rem 0 0;
font-size: 1.55rem;
line-height: 1.1;
letter-spacing: -0.02em;
font-weight: 700;
}
.description {
margin: 1rem 0 0;
color: var(--muted);
font-size: 0.96rem;
line-height: 1.55;
}
.loader {
margin-top: 1.2rem;
height: 0.32rem;
overflow: hidden;
border-radius: 999px;
background: rgb(148 163 184 / 0.22);
}
.loader::before {
content: '';
display: block;
width: 36%;
height: 100%;
border-radius: inherit;
background: linear-gradient(90deg, transparent, var(--accent), transparent);
animation: slide 1.35s ease-in-out infinite;
}
.hint {
margin: 0.95rem 0 0;
font-size: 0.82rem;
color: var(--muted);
}
@keyframes slide {
0% {
transform: translateX(-130%);
}
100% {
transform: translateX(330%);
}
}
@media (max-width: 560px) {
body {
padding-top: calc(1rem + env(safe-area-inset-top));
padding-bottom: calc(1rem + env(safe-area-inset-bottom));
}
.loading-card {
padding: 1.3rem;
transform: translateY(clamp(-2.75rem, -7vh, -1.5rem));
}
.brand {
align-items: flex-start;
}
h1 {
font-size: 1.35rem;
}
}
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation: none !important;
transition: none !important;
}
}
</style>
</head>
<body>
<main class="loading-card" role="status" aria-live="polite" aria-busy="true">
<div class="brand">
<img src="/images/favicon.png" alt="" aria-hidden="true" />
<div class="brand-copy">
<p class="label">YTPTube</p>
<h1>Loading your dashboard</h1>
</div>
</div>
<p class="description">Getting the interface ready. Please wait a moment...</p>
<div class="loader" aria-hidden="true"></div>
<p class="hint">Please wait...</p>
</main>
</body>
</html>