Skip to content

Add complete Sci-Fi UI demo with three modular themes and JavaScript switcher#27

Draft
hutoczky with Copilot wants to merge 2 commits into
masterfrom
copilot/add-sci-fi-ui-project
Draft

Add complete Sci-Fi UI demo with three modular themes and JavaScript switcher#27
hutoczky with Copilot wants to merge 2 commits into
masterfrom
copilot/add-sci-fi-ui-project

Conversation

Copilot AI commented Oct 20, 2025

Copy link
Copy Markdown
Contributor

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:

  1. Star Trek LCARS - The Library Computer Access/Retrieval System featuring characteristic rail elements, bold cyan colors, and rounded corners
  2. Star Wars HUD - Holographic display interface with grid overlays, glowing cyan accents, and translucent panels
  3. Cyberpunk 2077 - Neon-soaked glitch aesthetic with vibrant magenta and cyan colors, dashed borders, and animated glow effects

Implementation Details

Files Added

  • docs/scifi-ui/index.html - Main demo page with responsive layout
  • docs/scifi-ui/scripts/theme-switcher.js - Theme switching logic with localStorage persistence
  • docs/scifi-ui/styles/lcars.css - Star Trek LCARS theme
  • docs/scifi-ui/styles/starwars.css - Star Wars HUD theme
  • docs/scifi-ui/styles/cyberpunk.css - Cyberpunk 2077 theme

Features

  • ✨ Three distinct, production-ready themes
  • 💾 Theme preference saved in localStorage
  • ⌨️ Full keyboard accessibility (Enter/Space key support)
  • 🎨 CSS variables for easy customization
  • ♿ Respects prefers-reduced-motion for animations
  • 📱 Responsive design that works on all screen sizes

GitHub Pages Deployment

The demo will be automatically published to https://hutoczky.github.io/FormatX/scifi-ui/ upon merge, served from the existing /docs folder via the configured GitHub Pages workflow.

Screenshots

Star Trek LCARS Theme

LCARS Theme

Star Wars HUD Theme

Star Wars Theme

Cyberpunk 2077 Theme

Cyberpunk Theme

Testing

All three themes have been tested and verified to work correctly:

  • Theme switching is instant and smooth
  • localStorage persistence works across page reloads
  • Keyboard navigation functions properly
  • All CSS animations respect user motion preferences
  • Responsive layout adapts to different screen sizes
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:

  1. 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>
Téma választó Star Trek Star Wars Cyberpunk

Formázás a jövőből

Gyors. Moduláris. Bővíthető. Azonos szerkezet, eltérő sci‑fi stílusok.

Letöltés Funkciók
Villámgyors
Bővíthető
Web UI
Nyílt forrás
© Sci‑Fi UI
<script> document.getElementById('year').textContent = new Date().getFullYear().toString(); </script>
  1. 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;
    });
    });
    })();

  2. 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.

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:

  1. 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>
Téma választó Star Trek Star Wars Cyberpunk

Formázás a jövőből

Gyors. Moduláris. Bővíthető. Azonos szerkezet, eltérő sci‑fi stílusok.

Letöltés Funkciók
Villámgyors
Bővíthető
Web UI
Nyílt forrás
© Sci‑Fi UI
<script> document.getElementById('year').textContent = new Date().getFullYear().toString(); </script>
  1. 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;
    });
    });
    })();

  2. 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,200,255,.25) }
    nav button:hover{ transform: translateY(-1px) }
    main .panel button{ appearance:none; border:0; border-radius: 12px; padding:.55rem .9rem; background: var(--cyan); color:#051018; font-weight:800; letter-spacing:.06em; box-shadow: 0 6px 20px rgba(126,200,255,.22) }
    .features .box{ background: rgba(6,12,24,.28); border: 1px solid var(--border); border-radius: 12px; box-shadow: inset 0 10px 30px rgba(0,0,0,.18) }
    /
    header rails */
    nav::after{ content:""; display:block; height: 22px; background: var(--rail); border-radius: 12px; box-shadow: inset 0 -2px 6px rgba(0,0,0,.25); }
    nav .wrap::before{ content:""; position:absolute; left:0; right:0; height:4px; background: var(--rail2); margin-top: 26px; border-radius: 2px }

  3. docs/scifi-ui/styles/starwars.css
    /* Star Wars — Holographic HUD */
    :root{ --bg:#05070c; --text:#e6fbff; --holo:#60e5ff; --holo2:#94f6ff; --amber:#ffc766; --grid: rgba(96,229,255,.14); --border: rgba(96,229,255,.25) }
    html,body{ background: var(--bg); color: var(--text); font-family: "Aurebesh", "Share Tech Mono", "Orbitron", ui-monospace, monospace }
    nav{ background: rgba(5,10,18,.55); border-bottom: 1px solid var(--border); box-shadow: 0 0 20px rgba(96,229,255,.10) inset }
    nav .wrap{ position: relative }
    nav .wrap::after{ content:""; position:absolute; inset:0; background:
    linear-gradient(to right, var(--grid) 1px, transparent 1px) 0 0/ 40px 40px,
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px) 0 0/ 40px 40px; opacity:.5; pointer-events:none }
    nav button{ appearance:none; border:1px solid var(--border); border-radius: 8px; padding:.55rem .9rem; background: linear-gradient(180deg, rgba(10,20,28,.55), rgba(10,20,28,.25)); color: var(--holo2); text-shadow: 0 0 8px rgba(96,229,255,.6) }
    main .panel button{ appearance:none; border:1px solid var(--border); border-radius: 8px; padding:.55rem .9rem; background: rgba(10,20,28,.35); color: var(--holo); text-shadow: 0 0 8px rgba(96,229,255,.6) }
    .features .box{ background: rgba(8,12,20,.36); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 0 24px rgba(96,229,255,.12) inset }

  4. docs/scifi-ui/styles/cyberpunk.css
    /* Cyberpunk 2077 — Neon Glitch /
    :root{ --bg:#0b0b12; --text:#e9ecff; --neon:#00fff5; --magenta:#ff00b8; --yellow:#ffea00; --border: rgba(0,255,245,.28) }
    html,body{ background: var(--bg); color: var(--text); font-family: "Audiowide", "Exo 2", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif }
    nav{ background: linear-gradient(90deg, rgba(255,0,184,.18), rgba(0,255,245,.18)); border-bottom: 1px solid var(--border) }
    nav button{ appearance:none; border:1px solid var(--border); border-radius: 10px; padding:.55rem .9rem; background:
    radial-gradient(120px 40px at 20% 0%, rgba(0,255,245,.22), transparent 60%),
    linear-gradient(180deg, rgba(255,0,184,.18), rgba(0,255,245,.18)),
    linear-gradient(180deg, rgba(10,12,24,.9), rgba(10,12,24,.5));
    color: var(--text); text-shadow: 0 0 10px rgba(0,255,245,.55)
    }
    main .panel button{ appearance:none; border:1px solid var(--border); border-radius: 10px; padding:.55rem .9rem; background: rgba(10,12,24,.55); color: var(--text) }
    .features .box{ background: rgba(10,12,24,.55); border: 1px dashed var(--border); border-radius: 12px; box-shadow: 0 0 18px rgba(255,0,184,.18) inset }
    /
    glitch pulse */
    @media (prefers-reduced-motion: no-preference){
    nav{ animation: glow 3.8s ease-in-out infinite }
    @Keyframes glow{ 0%,100%{ filter: hue-rotate(0deg) } 50%{ filter: hue-rotate(15deg) } }
    }


💡 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.

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
Copilot AI requested a review from hutoczky October 20, 2025 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants