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
@@ -7,9 +7,37 @@ export const BACKGROUND_KEYS = [
|
||||
"background_position",
|
||||
"background_size",
|
||||
"background_repeat",
|
||||
"background_effect",
|
||||
"background_overlay",
|
||||
"background_overlay_opacity",
|
||||
] as const;
|
||||
export type BackgroundKey = (typeof BACKGROUND_KEYS)[number];
|
||||
|
||||
/**
|
||||
* Animated background effects rendered behind the public site. Purely
|
||||
* decorative and CSS-driven (transform/opacity only) so they stay cheap on
|
||||
* every device and respect `prefers-reduced-motion`.
|
||||
*/
|
||||
export const BACKGROUND_EFFECTS = [
|
||||
"none",
|
||||
"aurora",
|
||||
"particles",
|
||||
"aurora-particles",
|
||||
] as const;
|
||||
export type BackgroundEffect = (typeof BACKGROUND_EFFECTS)[number];
|
||||
|
||||
export const BACKGROUND_EFFECT_DEFAULT: BackgroundEffect = "none";
|
||||
|
||||
export const OVERLAY_PRESETS = [
|
||||
{ label: "None", value: "" },
|
||||
{ label: "Black", value: "#000000" },
|
||||
{ label: "White", value: "#ffffff" },
|
||||
{ label: "Navy", value: "#0b1220" },
|
||||
{ label: "Slate", value: "#1e293b" },
|
||||
] as const;
|
||||
|
||||
export const OVERLAY_OPACITY_MAX = 90;
|
||||
|
||||
export const BACKGROUND_POSITIONS = [
|
||||
"center center",
|
||||
"top center",
|
||||
@@ -36,6 +64,9 @@ export const BACKGROUND_DEFAULTS: Record<BackgroundKey, string> = {
|
||||
background_position: "center center",
|
||||
background_size: "cover",
|
||||
background_repeat: "no-repeat",
|
||||
background_effect: BACKGROUND_EFFECT_DEFAULT,
|
||||
background_overlay: "",
|
||||
background_overlay_opacity: "0",
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user