Refactor into plain js html css - #36
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR refactors the site from a Next.js/TypeScript/Tailwind app into a static site built with plain HTML, CSS, and JavaScript, with page content driven by JSON data files and shared header/footer partials.
Changes:
- Added static HTML pages for home/about/projects/work plus a shared header/footer component pattern loaded at runtime.
- Introduced
assets/js/main.jsto load components and render projects/work/about data from JSON. - Removed the prior Next.js + Tailwind + TypeScript codebase/configuration and trimmed
package.jsonaccordingly.
Reviewed changes
Copilot reviewed 44 out of 111 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| work/index.html | Adds static Work & Experience page shell that is populated by main.js. |
| utils/cn.ts | Removes Tailwind/clsx helper used by the former React UI. |
| tsconfig.json | Removes TypeScript configuration (no longer a TS app). |
| tailwind.config.ts | Removes Tailwind configuration. |
| README.md | Removes Next.js template README. |
| public/wha.svg | Removes unused asset from prior UI. |
| public/twit.svg | Removes unused asset from prior UI. |
| public/three.svg | Removes unused asset from prior UI. |
| public/tail.svg | Removes unused asset from prior UI. |
| public/streamName.svg | Removes unused asset from prior UI. |
| public/stream.svg | Removes unused asset from prior UI. |
| public/s.svg | Removes unused asset from prior UI. |
| public/next.svg | Removes unused Next.js logo asset. |
| public/hostName.svg | Removes unused asset from prior UI. |
| public/host.svg | Removes unused asset from prior UI. |
| public/exp2.svg | Removes unused asset from prior UI. |
| public/exp1.svg | Removes unused asset from prior UI. |
| public/dockerName.svg | Removes unused asset from prior UI. |
| public/cloud.svg | Removes unused asset from prior UI. |
| public/c.svg | Removes unused asset from prior UI. |
| public/b4.svg | Removes unused asset from prior UI. |
| public/arrow.svg | Removes unused asset from prior UI. |
| public/appName.svg | Removes unused asset from prior UI. |
| public/app.svg | Removes unused asset from prior UI. |
| projects/index.html | Adds static Projects page shell that is populated by main.js. |
| postcss.config.mjs | Removes Tailwind/PostCSS configuration. |
| package.json | Removes Next.js/React/Tailwind deps; keeps ESLint/Prettier tooling. |
| next.config.ts | Removes Next.js configuration. |
| index.html | Adds new static home page layout and content. |
| hooks/use-outside-click.ts | Removes React hook from prior UI. |
| eslint.config.mjs | Replaces Next.js ESLint compat config with a flat config for JS/CSS. |
| data/index.ts | Removes old TS data module (replaced by JSON files). |
| components/ui/timeline.tsx | Removes React UI component. |
| components/ui/TextGenerateEffect.tsx | Removes React UI component. |
| components/ui/Spotlight.tsx | Removes React UI component. |
| components/ui/MovingBorders.tsx | Removes React UI component. |
| components/ui/Modal.tsx | Removes React UI component. |
| components/ui/MagicButton.tsx | Removes React UI component. |
| components/ui/FloatingNav.tsx | Removes React UI component. |
| components/ui/ErrorBanner.tsx | Removes React UI component. |
| components/ui/BentoGrid.tsx | Removes React UI component. |
| components/ui/background-gradient.tsx | Removes React UI component. |
| components/ui/apple-cards-carousel.tsx | Removes React UI component. |
| components/ui/3d-pin.tsx | Removes React UI component. |
| components/Timeline.tsx | Removes React wrapper component. |
| components/RecentProjects.tsx | Removes React feature component. |
| components/Hero.tsx | Removes React feature component. |
| components/header.html | Adds shared header partial with placeholder URLs for runtime replacement. |
| components/Grid.tsx | Removes React feature component. |
| components/Footer.tsx | Removes React feature component. |
| components/footer.html | Adds shared footer partial (dynamic year). |
| components/Experience.tsx | Removes React feature component. |
| assets/js/main.js | Adds runtime loader + JSON-driven rendering for projects/work/about. |
| assets/icons/website.svg | Adds icon asset for projects list. |
| assets/icons/unity.svg | Adds icon asset for projects list. |
| assets/icons/ts.svg | Adds icon asset for projects list. |
| assets/icons/scala.svg | Adds icon asset for projects list. |
| assets/icons/re.svg | Adds icon asset for projects list. |
| assets/icons/linkedin.svg | Adds social icon asset. |
| assets/icons/java.svg | Adds icon asset for projects list. |
| assets/icons/iot.svg | Adds icon asset for projects list. |
| assets/icons/insta.svg | Adds social icon asset. |
| assets/icons/github.svg | Adds social icon asset. |
| assets/icons/game.svg | Adds icon asset for projects list. |
| assets/icons/email.svg | Adds social icon asset. |
| assets/icons/dock.svg | Adds icon asset for projects list. |
| assets/icons/cpu.svg | Adds icon asset for projects list. |
| assets/icons/cpp.svg | Adds icon asset for projects list. |
| assets/icons/computer-vision.svg | Adds icon asset for projects list. |
| assets/data/work.json | Adds JSON data for Work & Experience rendering. |
| assets/data/projects.json | Adds JSON data for Projects rendering. |
| assets/data/about.json | Adds JSON data for About rendering. |
| app/provider.tsx | Removes Next.js theme provider (no longer applicable). |
| app/page.tsx | Removes Next.js page entrypoint. |
| app/layout.tsx | Removes Next.js root layout. |
| app/globals.css | Removes Tailwind-based global styles. |
| about/index.html | Adds static About page shell that is populated by main.js. |
| .prettierrc | Adds Prettier config (empty/default). |
| .prettierignore | Adds Prettier ignore rules. |
| .gitignore | Replaces Next.js-oriented ignores with more general ignores. |
Suppressed comments (2)
index.html:90
- Links opened with
target="_blank"should includerel="noopener noreferrer"(not justnoreferrer) to prevent reverse-tabnabbing.
index.html:108 - Links opened with
target="_blank"should includerel="noopener noreferrer"(not justnoreferrer) to prevent reverse-tabnabbing.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+1
to
+7
| function siteBasePath() { | ||
| const depth = window.location.pathname | ||
| .split("/") | ||
| .filter(Boolean) | ||
| .slice(0, -1).length; | ||
| return depth === 0 ? "./" : "../".repeat(depth); | ||
| } |
Comment on lines
+50
to
+75
| function renderProjects(projects = []) { | ||
| const grid = document.getElementById("projects-grid"); | ||
| if (!grid) return; | ||
|
|
||
| const html = projects | ||
| .map( | ||
| (p) => ` | ||
| <article class="project-card"> | ||
| ${p.icon ? `<div class="project-icon-wrap"><img class="project-icon" src="${p.icon}" alt="${p.title} icon" loading="lazy" decoding="async" width="64" height="64" /></div>` : ""} | ||
| <div class="project-body"> | ||
| <h3 class="project-title">${p.title}</h3> | ||
| <p>${p.description}</p> | ||
| <div class="tech-list"> | ||
| ${(p.tech || []).map((t) => `<span class="tag">${t}</span>`).join("")} | ||
| </div> | ||
| <p style="margin-top:0.9rem;"> | ||
| <a class="btn" href="${p.link}" target="_blank" rel="noreferrer">View Repository</a> | ||
| </p> | ||
| </div> | ||
| </article> | ||
| `, | ||
| ) | ||
| .join(""); | ||
|
|
||
| grid.innerHTML = html; | ||
| } |
| class="icon-btn" | ||
| href="https://github.com/Marstar03" | ||
| target="_blank" | ||
| rel="noreferrer" |
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.
No description provided.