Draft
Add multi-theme support with four franchise-inspired themes to docs site#10
Conversation
Co-authored-by: hutoczky <5453461+hutoczky@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add multi-theme support for documentation site
Add multi-theme support with four franchise-inspired themes to docs site
Oct 20, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR adds comprehensive multi-theme support to the FormatX documentation site, featuring four distinct franchise-inspired themes that users can switch between. The selected theme persists across sessions using localStorage, and all themes include unique intro animations and full accessibility support.
Themes Implemented
🖖 LCARS (Star Trek) - Default
The original cyan/blue sci-fi aesthetic inspired by Star Trek's LCARS interface system. Features clean lines, futuristic gradients, and a warp core animation.
🌃 Cyberpunk 2077
Neon-soaked magenta and purple theme with glitch text effects and high-contrast neon borders. The preloader features flickering animations reminiscent of Night City.
⚔️ Star Wars
Classic gold and yellow color scheme paying homage to the iconic Star Wars opening crawl. Features warm, epic styling with blue accents.
🌌 Stargate
Blue chevron design inspired by Stargate's iconic gate interface. Features subtle blue glows and orange accents with a chevron-lock animation effect.
Technical Implementation
New Files
docs/themes.css(307 lines) - Complete theme definitions including:docs/theme-loader.js(176 lines) - Theme management system featuring:fx-themekey)themechangeevent dispatchingModified Files
docs/index.html- Added theme-loader.js script tag in head, removed old binary theme toggle buttondocs/styles.css- Removed deprecated light theme CSS, cleaned up theme-specific stylesdocs/script.js- Removed old theme toggle logic (now handled by theme-loader.js)Key Features
✅ Persistent Selection - Themes are saved to localStorage and automatically restored on page load
✅ Smooth Transitions - Subtle fade effect when switching themes
✅ Reduced-Motion Support - All animations respect
prefers-reduced-motion: reduce✅ Accessibility - Keyboard navigation, semantic HTML, ARIA labels
✅ Theme API - Exposed on
window.FormatXThemesfor debugging and programmatic control✅ No Build Required - Pure CSS/JS, works immediately with GitHub Pages
Usage
Users can switch themes using the dropdown selector in the navigation bar. The selected theme persists across page reloads and browser sessions.
For developers, the theme API is available:
Screenshots
LCARS (Star Trek) - Default Theme
Cyberpunk 2077 Theme
Star Wars Theme
Stargate Theme
Deployment
After merge to master, GitHub Pages will automatically publish the changes. No additional configuration or build steps are required. Users will immediately see the default LCARS theme with the option to select their preferred theme from the dropdown.
Code Quality
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.