feat(themes): Add AE_Firefly variant themes — SteelBlue, Indigo, Rainbow
Three new Firefly-family themes following the AE_Firefly design system: - AE_Firefly_SteelBlue: metallic steel blue primary (~214°), burnished gold secondary, cobalt navy tertiary, chrome silver surfaces - AE_Firefly_Indigo: deep indigo primary (~266°), violet secondary, dusty rose tertiary, velvet slate surfaces - AE_Firefly_Rainbow: coral-red primary (~15°), emerald green secondary, rich violet tertiary, sunrise cream surfaces (spans the visible spectrum) All variants share consistent semantic colors (success/warning/error) with AE_Firefly for cross-theme recognizability. All WCAG 2.1 AA compliant. Also adds URL param support for theme switching: - ?theme=AE_Firefly_SteelBlue&theme_mode=dark - Params applied to ae_loc (persisted), then silently removed via replaceState
This commit is contained in:
@@ -234,6 +234,23 @@
|
||||
if (iframe === 'true') $ae_loc.iframe = true;
|
||||
else if (iframe === 'false') $ae_loc.iframe = false;
|
||||
|
||||
// Theme URL params — ?theme=AE_Firefly_SteelBlue&theme_mode=dark
|
||||
// Applied once on load, then silently removed from the URL (no history entry).
|
||||
const url_theme = data.url.searchParams.get('theme');
|
||||
const url_theme_mode = data.url.searchParams.get('theme_mode');
|
||||
if (url_theme || url_theme_mode) {
|
||||
if (url_theme) $ae_loc.theme_name = url_theme;
|
||||
if (url_theme_mode === 'light' || url_theme_mode === 'dark') $ae_loc.theme_mode = url_theme_mode;
|
||||
const clean_url = new URL(data.url.href);
|
||||
clean_url.searchParams.delete('theme');
|
||||
clean_url.searchParams.delete('theme_mode');
|
||||
goto(clean_url.pathname + clean_url.search + clean_url.hash, {
|
||||
replaceState: true,
|
||||
noScroll: true,
|
||||
keepFocus: true
|
||||
});
|
||||
}
|
||||
|
||||
// Electron Detection
|
||||
if ((window as any).native_app || (window as any).aetherNative) {
|
||||
if (!$ae_loc.is_native) $ae_loc.is_native = true;
|
||||
|
||||
Reference in New Issue
Block a user