Draft
Add complete Sci-Fi UI demo with three modular themes and JavaScript switcher#27
Conversation
Co-authored-by: hutoczky <5453461+hutoczky@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add complete, audit-ready Sci-Fi UI project with themes
Add complete Sci-Fi UI demo with three modular themes and JavaScript switcher
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 a complete, audit-ready Sci-Fi UI project under
docs/scifi-ui/featuring three distinct futuristic interface themes inspired by iconic science fiction universes. The demo includes a JavaScript theme switcher with localStorage persistence and full keyboard accessibility.What's New
The Sci-Fi UI demo showcases three modular themes that users can switch between dynamically:
Implementation Details
Files Added
docs/scifi-ui/index.html- Main demo page with responsive layoutdocs/scifi-ui/scripts/theme-switcher.js- Theme switching logic with localStorage persistencedocs/scifi-ui/styles/lcars.css- Star Trek LCARS themedocs/scifi-ui/styles/starwars.css- Star Wars HUD themedocs/scifi-ui/styles/cyberpunk.css- Cyberpunk 2077 themeFeatures
prefers-reduced-motionfor animationsGitHub Pages Deployment
The demo will be automatically published to https://hutoczky.github.io/FormatX/scifi-ui/ upon merge, served from the existing
/docsfolder via the configured GitHub Pages workflow.Screenshots
Star Trek LCARS Theme
Star Wars HUD Theme
Cyberpunk 2077 Theme
Testing
All three themes have been tested and verified to work correctly:
Original prompt
Add a complete, audit‑ready Sci‑Fi UI project under docs/scifi-ui with three modular themes (Star Trek LCARS, Star Wars HUD, Cyberpunk 2077 glitch) and a JavaScript theme switcher. Replace existing files in docs/scifi-ui with the following exact contents. Ensure GitHub Pages (which serves from /docs) will publish the demo at https://hutoczky.github.io/FormatX/scifi-ui/ after merge.
Create/Update these files with EXACT content:
- docs/scifi-ui/index.html
<title>Sci-Fi UI</title> <script src="scripts/theme-switcher.js" defer></script> <style> /* Base reset and layout only (theme visuals live in theme CSS files) */ :root { --border: rgba(160,220,255,.16); --wrap: min(1100px, 94%); } *,*::before,*::after{ box-sizing: border-box } html,body{ height:100% } body{ margin:0 } .wrap{ width: var(--wrap); margin-inline:auto } nav{ position: sticky; top:0; z-index: 10; background: rgba(0,0,0,.2); backdrop-filter: blur(6px); border-bottom: 1px solid var(--border) } nav .wrap{ display:flex; gap:.5rem; align-items:center; padding:.6rem 0; flex-wrap: wrap } main.wrap{ padding: 1rem 0 2rem } .panel{ display:flex; gap:.5rem; flex-wrap:wrap; margin: 1rem 0 } .features{ display:grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .8rem } .features .box{ border: 1px solid var(--border); border-radius: 12px; padding: 1rem; text-align:center } footer{ border-top: 1px solid var(--border); margin-top: 2rem } footer .wrap{ display:flex; align-items:center; justify-content:space-between; padding: .9rem 0 } .sr-only{ position:absolute!important; width:1px;height:1px; padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0 } </style>Formázás a jövőből
Gyors. Moduláris. Bővíthető. Azonos szerkezet, eltérő sci‑fi stílusok.
docs/scifi-ui/scripts/theme-switcher.js
(function(){
const STORAGE_KEY = 'sci-fi-ui-theme';
const link = document.getElementById('theme-stylesheet');
const THEMES = ['lcars','starwars','cyberpunk'];
function apply(theme){
if(!THEMES.includes(theme)) theme = 'lcars';
link.setAttribute('href',
styles/${theme}.css);try{ localStorage.setItem(STORAGE_KEY, theme); }catch(){}
document.documentElement.setAttribute('data-theme', theme);
}
document.addEventListener('DOMContentLoaded', () => {
let initial = 'lcars';
try{ const s = localStorage.getItem(STORAGE_KEY); if(s && THEMES.includes(s)) initial = s; }catch(){}
apply(initial);
document.querySelectorAll('nav [data-theme]').forEach(btn => {
btn.addEventListener('click', () => apply(btn.getAttribute('data-theme')));
btn.addEventListener('keydown', (e)=>{ if(e.key==='Enter' || e.key===' '){ e.preventDefault(); btn.click(); }});
btn.setAttribute('role','button'); btn.tabIndex = 0;
});
});
})();
docs/scifi-ui/styles/lcars.css
/* Star Trek — LCARS */
:root{ --bg:#0B0F18; --ink:#0B0F18; --text:#eaf3ff; --muted:#b9cde3; --rail:#F7BFA4; --rail2:#E08AA3; --cyan:#7EC8FF; --amber:#FFCE66; --border: rgba(126,200,255,.22) }
html,body{ background: var(--bg); color: var(--text); font-family: "Orbitron", "Exo 2", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif }
nav{ background: transparent; border-bottom: 0 }
nav button{ appearance:none; border:0; border-radius: 18px; padding:.55rem .9rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase; background: var(--cyan); color:#051018; box-shadow: 0 2px 8px rgba(126,20...
This pull request was created as a result of the following prompt from Copilot chat.
💡 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.