feat(theme): animate public background with aurora and particles, polish landing pages
Add background_effect (aurora/particles), background_overlay tint and opacity to the theme manager, rendered site-wide by ThemeVars on every public page. Polish the home and register pages (hero mascot, live stat pulse, date pills, photo strip, CTA band, theme-aware register intro, i18n for home/register section).
This commit is contained in:
1 parent
5923b736fa
commit
d131124515
9 files changed
+573
-25
No files matched your search
@@ -590,6 +590,148 @@ html.dark body.site-bg:has([data-admin]) {
|
||||
background-blend-mode: normal;
|
||||
}
|
||||
|
||||
/* ── Animated site backdrop (Theme Manager effects) ────────────────
|
||||
A fixed, decorative layer between the body wallpaper and the content.
|
||||
Theme-driven: aurora + particles are pure CSS on transform/opacity, so
|
||||
they stay cheap and pause for prefers-reduced-motion automatically. */
|
||||
.site-backdrop {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: -1;
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
contain: layout paint style;
|
||||
}
|
||||
.site-backdrop > span {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
body:has([data-admin]) .site-backdrop {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Aurora blobs (large, soft radial gradients — no filters). */
|
||||
.site-backdrop > .site-backdrop-aurora {
|
||||
inset: -12% -10%;
|
||||
overflow: hidden;
|
||||
}
|
||||
.site-backdrop-blob {
|
||||
position: absolute;
|
||||
border-radius: 999px;
|
||||
opacity: 0.42;
|
||||
will-change: transform;
|
||||
animation: aurora-drift 20s ease-in-out infinite alternate;
|
||||
}
|
||||
.site-backdrop-blob-1 {
|
||||
width: clamp(320px, 44vw, 620px);
|
||||
height: clamp(320px, 44vw, 620px);
|
||||
top: -14%;
|
||||
left: -10%;
|
||||
background: radial-gradient(
|
||||
circle at 32% 32%,
|
||||
color-mix(in srgb, var(--color-primary) 60%, transparent) 0%,
|
||||
transparent 68%
|
||||
);
|
||||
}
|
||||
.site-backdrop-blob-2 {
|
||||
width: clamp(280px, 38vw, 540px);
|
||||
height: clamp(280px, 38vw, 540px);
|
||||
top: -10%;
|
||||
right: -8%;
|
||||
background: radial-gradient(
|
||||
circle at 62% 40%,
|
||||
color-mix(in srgb, var(--color-accent) 48%, transparent) 0%,
|
||||
transparent 68%
|
||||
);
|
||||
animation-delay: -7s;
|
||||
animation-duration: 24s;
|
||||
}
|
||||
.site-backdrop-blob-3 {
|
||||
width: clamp(360px, 50vw, 700px);
|
||||
height: clamp(360px, 50vw, 700px);
|
||||
bottom: -22%;
|
||||
left: 12%;
|
||||
background: radial-gradient(
|
||||
circle at 50% 50%,
|
||||
color-mix(in srgb, var(--color-primary) 34%, transparent) 0%,
|
||||
color-mix(in srgb, var(--color-accent) 18%, transparent) 42%,
|
||||
transparent 72%
|
||||
);
|
||||
animation-delay: -13s;
|
||||
animation-duration: 28s;
|
||||
}
|
||||
@keyframes aurora-drift {
|
||||
0% {
|
||||
transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: translate3d(6vw, 5vh, 0) scale(1.16) rotate(6deg);
|
||||
}
|
||||
}
|
||||
html.dark .site-backdrop-blob {
|
||||
opacity: 0.55;
|
||||
}
|
||||
|
||||
/* Floating particles drifting upward. */
|
||||
.site-backdrop-particles {
|
||||
inset: 0;
|
||||
}
|
||||
.site-backdrop-dot {
|
||||
position: absolute;
|
||||
bottom: -4vh;
|
||||
width: calc(var(--dot-size, 3) * 1px + 1px);
|
||||
height: calc(var(--dot-size, 3) * 1px + 1px);
|
||||
border-radius: 999px;
|
||||
background: color-mix(in srgb, var(--color-primary) 70%, transparent);
|
||||
box-shadow: 0 0 8px color-mix(in srgb, var(--color-primary) 55%, transparent);
|
||||
opacity: 0;
|
||||
animation: particle-rise var(--dot-duration, 12s) linear infinite;
|
||||
animation-delay: var(--dot-delay, 0s);
|
||||
}
|
||||
@keyframes particle-rise {
|
||||
0% {
|
||||
transform: translate3d(0, 0, 0);
|
||||
opacity: 0;
|
||||
}
|
||||
10% {
|
||||
opacity: var(--dot-alpha, 0.45);
|
||||
}
|
||||
88% {
|
||||
opacity: var(--dot-alpha, 0.45);
|
||||
}
|
||||
100% {
|
||||
transform: translate3d(var(--dot-drift, 2vw), -108vh, 0);
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
html.dark .site-backdrop-dot {
|
||||
background: color-mix(in srgb, var(--color-primary) 82%, transparent);
|
||||
}
|
||||
|
||||
/* Overlay tint above image/effects keeps custom backgrounds readable. */
|
||||
.site-backdrop-overlay {
|
||||
inset: 0;
|
||||
background: var(--background-overlay, transparent);
|
||||
}
|
||||
|
||||
/* Show only the selected effect(s). */
|
||||
.site-backdrop[data-effect="none"] .site-backdrop-particles,
|
||||
.site-backdrop[data-effect="none"] .site-backdrop-aurora,
|
||||
.site-backdrop[data-effect="aurora"] .site-backdrop-particles,
|
||||
.site-backdrop[data-effect="particles"] .site-backdrop-aurora {
|
||||
display: none;
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.site-backdrop-blob {
|
||||
animation: none;
|
||||
}
|
||||
.site-backdrop-dot {
|
||||
animation: none;
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.article-body {
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user