WIP: Refactor: split monolithic index.html into separate CSS/JS files #1

Draft
Copilot wants to merge 2 commits from copilot/clean-up-code-for-scalability into master
pull from: copilot/clean-up-code-for-scalability
Copilot commented 2026-03-02 11:53:58 -05:00 (Migrated from github.com)

The entire site lived in a single 1,438-line index.html with all CSS and JS inline, making it hard to maintain, cache, or scale across environments.

Structure

  • Extracted <style> block → css/styles.css
  • Extracted <script> block → js/main.js
  • index.html reduced from 1,438 → 576 lines

Inline style cleanup

Removed all 15 style="" attributes from HTML elements; replaced with semantic CSS classes:

  • btn-block — full-width service card CTAs (margin-top: 1rem; width: 100%)
  • holistic-description / holistic-description-text — holistic section copy block
  • Merged duplicate .hero-video-bg rules into a single definition

Bug fix

Smooth scroll handler threw a querySelector syntax error on bare # hrefs (used by placeholder social/footer links):

// Before — crashes on href="#"
const target = document.querySelector(this.getAttribute('href'));

// After
const href = this.getAttribute('href');
if (!href || href === '#') return;
const target = document.querySelector(href);

Docs

  • Removed hardcoded /home/philip/Work/radiance/ path from prototype-guide.md
  • Updated file structure references in prototype-guide.md and README.md

Site rendering with external CSS/JS


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

The entire site lived in a single 1,438-line `index.html` with all CSS and JS inline, making it hard to maintain, cache, or scale across environments. ## Structure - Extracted `<style>` block → `css/styles.css` - Extracted `<script>` block → `js/main.js` - `index.html` reduced from 1,438 → 576 lines ## Inline style cleanup Removed all 15 `style=""` attributes from HTML elements; replaced with semantic CSS classes: - `btn-block` — full-width service card CTAs (`margin-top: 1rem; width: 100%`) - `holistic-description` / `holistic-description-text` — holistic section copy block - Merged duplicate `.hero-video-bg` rules into a single definition ## Bug fix Smooth scroll handler threw a `querySelector` syntax error on bare `#` hrefs (used by placeholder social/footer links): ```js // Before — crashes on href="#" const target = document.querySelector(this.getAttribute('href')); // After const href = this.getAttribute('href'); if (!href || href === '#') return; const target = document.querySelector(href); ``` ## Docs - Removed hardcoded `/home/philip/Work/radiance/` path from `prototype-guide.md` - Updated file structure references in `prototype-guide.md` and `README.md` ![Site rendering with external CSS/JS](https://github.com/user-attachments/assets/4ec1a104-2bbc-48fd-9c32-96a51255ec31) <!-- START COPILOT CODING AGENT TIPS --> --- 💡 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](https://gh.io/copilot-coding-agent-tips) in the docs.
vercel[bot] commented 2026-03-02 11:54:02 -05:00 (Migrated from github.com)

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
radiance Ready Ready Preview, Comment Mar 2, 2026 5:02pm
[vc]: #9DmIv+oSzWP10SA9I8/+LS+LckMZBx4zjNg/2pumtFo=:eyJpc01vbm9yZXBvIjp0cnVlLCJ0eXBlIjoiZ2l0aHViIiwicHJvamVjdHMiOlt7Im5hbWUiOiJyYWRpYW5jZSIsInByb2plY3RJZCI6InByal91a2owOEtaem40eGFIQUZGOUgzR1lLNjJBNmZDIiwicm9vdERpcmVjdG9yeSI6bnVsbCwiaW5zcGVjdG9yVXJsIjoiaHR0cHM6Ly92ZXJjZWwuY29tL3BoaWxpcC12cy1wcm9qZWN0cy9yYWRpYW5jZS9CZUFpMk5Rd3ZOVWpka2lBMnFtMXFGWVp5aktRIiwicHJldmlld1VybCI6InJhZGlhbmNlLWdpdC1jb3BpbG90LWNsZWFuLXVwLWNvZGUtZm8tMzJjNmMyLXBoaWxpcC12cy1wcm9qZWN0cy52ZXJjZWwuYXBwIiwibmV4dENvbW1pdFN0YXR1cyI6IkRFUExPWUVEIiwibGl2ZUZlZWRiYWNrIjp7InJlc29sdmVkIjowLCJ1bnJlc29sdmVkIjowLCJ0b3RhbCI6MCwibGluayI6InJhZGlhbmNlLWdpdC1jb3BpbG90LWNsZWFuLXVwLWNvZGUtZm8tMzJjNmMyLXBoaWxpcC12cy1wcm9qZWN0cy52ZXJjZWwuYXBwIn19XX0= The latest updates on your projects. Learn more about [Vercel for GitHub](https://vercel.link/github-learn-more). | Project | Deployment | Actions | Updated (UTC) | | :--- | :----- | :------ | :------ | | [radiance](https://vercel.com/philip-vs-projects/radiance) | ![Ready](https://vercel.com/static/status/ready.svg) [Ready](https://vercel.com/philip-vs-projects/radiance/BeAi2NQwvNUjdkiA2qm1qFYZyjKQ) | [Preview](https://radiance-git-copilot-clean-up-code-fo-32c6c2-philip-vs-projects.vercel.app), [Comment](https://vercel.live/open-feedback/radiance-git-copilot-clean-up-code-fo-32c6c2-philip-vs-projects.vercel.app?via=pr-comment-feedback-link) | Mar 2, 2026 5:02pm |
You are not authorized to merge this pull request.
This pull request can be merged automatically.
This pull request is marked as a work in progress.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin copilot/clean-up-code-for-scalability:copilot/clean-up-code-for-scalability
git checkout copilot/clean-up-code-for-scalability
Sign in to join this conversation.