-
Notifications
You must be signed in to change notification settings - Fork 13
Complete redesign: New cosmic pixel art homepage #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com>
|
@copilot 不需要沿用原来的内容,直接按照你的想法重构一个新的主页给我。 |
Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com>
Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Redesigns the Docusaurus homepage with a new “cosmic pixel art” hero, custom feature cards, and a tech-stack badge section, plus updated theming variables for light/dark modes.
Changes:
- Replaces the previous homepage layout with new
CosmicHero,Features, andTechStacksections. - Adds extensive new CSS module styling for the redesigned homepage (animations, pixel-art styling, responsive layout).
- Updates global Infima theme variables and adds dark-mode adjustments in
custom.css.
Reviewed changes
Copilot reviewed 5 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| website/src/pages/index.js | Replaces homepage composition with new hero/features/tech sections. |
| website/src/pages/index.module.css | Adds the full set of CSS-module styles for the new cosmic pixel homepage. |
| website/src/css/custom.css | Updates theme variables and adds global dark-mode / transition rules intended to support the new homepage. |
| website/src/components/HomepageFeatures/index.js | Swaps SVG references to new cosmic-themed assets (component appears unused now). |
| website/src/components/HomepageFeatures/styles.module.css | Updates styling for the (now seemingly unused) HomepageFeatures visuals. |
| website/static/img/cosmic-rocket.svg | Adds pixel-art rocket SVG asset. |
| website/static/img/cosmic-planet.svg | Adds pixel-art planet SVG asset. |
| website/static/img/cosmic-star.svg | Adds pixel-art star SVG asset. |
Comments suppressed due to low confidence (1)
website/src/pages/index.js:1
- Unused import clsx.
import clsx from 'clsx';
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <div className={styles.cardIcon}>{icon}</div> | ||
| <h3 className={styles.cardTitle}>{title}</h3> | ||
| <p className={styles.cardDesc}>{description}</p> | ||
| <div className={styles.cardArrow}>→</div> |
Copilot
AI
Feb 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The emoji in cardIcon is decorative, but as plain text it will be announced by screen readers (often as “rocket”, “hammer and wrench”, etc.) before the card title. Consider marking the icon as decorative (e.g. aria-hidden) or switching to role="img" with an explicit accessible name if the emoji conveys meaning beyond the title.
| <div className={styles.cardIcon}>{icon}</div> | |
| <h3 className={styles.cardTitle}>{title}</h3> | |
| <p className={styles.cardDesc}>{description}</p> | |
| <div className={styles.cardArrow}>→</div> | |
| <div className={styles.cardIcon} aria-hidden="true">{icon}</div> | |
| <h3 className={styles.cardTitle}>{title}</h3> | |
| <p className={styles.cardDesc}>{description}</p> | |
| <div className={styles.cardArrow} aria-hidden="true">→</div> |
| const FeatureList = [ | ||
| { | ||
| title: 'GeneralUpdate', | ||
| Svg: require('@site/static/img/upgrade.svg').default, | ||
| Svg: require('@site/static/img/cosmic-rocket.svg').default, | ||
| //description: ( |
Copilot
AI
Feb 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These new SVG requires are only referenced by HomepageFeatures, but HomepageFeatures itself doesn’t appear to be imported anywhere under website/src anymore. If the redesign removed this section from the site, consider deleting the component (and these SVG references/assets) to avoid keeping unused code and static files; otherwise the PR description should be updated to reflect that HomepageFeatures still exists.
| /* Dark mode adjustments for new homepage */ | ||
| [data-theme='dark'] .featuresSection { | ||
| background: linear-gradient(180deg, #1a0f3e 0%, #0a0420 100%); | ||
| } | ||
|
|
||
| [data-theme='dark'] .featureCard { | ||
| background: #1a0f3e; | ||
| border-color: #5dade2; | ||
| box-shadow: 8px 8px 0 rgba(93, 173, 226, 0.2); | ||
| } | ||
|
|
||
| [data-theme='dark'] .featureCard:hover { | ||
| box-shadow: 12px 12px 0 rgba(93, 173, 226, 0.3); | ||
| } | ||
|
|
||
| [data-theme='dark'] .cardTitle { | ||
| color: #fff; | ||
| } | ||
|
|
||
| [data-theme='dark'] .cardDesc { | ||
| color: #a8c5e8; | ||
| } | ||
|
|
||
| [data-theme='dark'] .sectionTitle { | ||
| color: #fff; | ||
| } | ||
|
|
||
| [data-theme='dark'] .techSection { | ||
| background: #0a0420; | ||
| } | ||
|
|
||
| [data-theme='dark'] .techTitle { | ||
| color: #fff; | ||
| } | ||
|
|
||
| [data-theme='dark'] .techBadge { | ||
| background: #1a0f3e; | ||
| box-shadow: 4px 4px 0 rgba(93, 173, 226, 0.2); | ||
| } | ||
|
|
||
| [data-theme='dark'] .techBadge:hover { | ||
| box-shadow: 6px 6px 0 rgba(93, 173, 226, 0.3); | ||
| } | ||
|
|
||
| /* Smooth transitions for theme components */ | ||
| .cosmicHero, | ||
| .cosmicHero *, | ||
| .featuresSection, | ||
| .featuresSection *, | ||
| .techSection, | ||
| .techSection *, |
Copilot
AI
Feb 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dark-mode overrides here target plain class names (e.g. .featuresSection, .featureCard, .techSection), but those classes are defined in index.module.css and applied via CSS modules, so the runtime class names are hashed and these selectors won’t match. As a result, the homepage will keep the light-section styles in dark mode. Move these dark-mode rules into index.module.css (e.g. :global([data-theme='dark']) .featuresSection { ... }) or apply a global class name on the elements and target that instead.
| /* Dark mode adjustments for new homepage */ | |
| [data-theme='dark'] .featuresSection { | |
| background: linear-gradient(180deg, #1a0f3e 0%, #0a0420 100%); | |
| } | |
| [data-theme='dark'] .featureCard { | |
| background: #1a0f3e; | |
| border-color: #5dade2; | |
| box-shadow: 8px 8px 0 rgba(93, 173, 226, 0.2); | |
| } | |
| [data-theme='dark'] .featureCard:hover { | |
| box-shadow: 12px 12px 0 rgba(93, 173, 226, 0.3); | |
| } | |
| [data-theme='dark'] .cardTitle { | |
| color: #fff; | |
| } | |
| [data-theme='dark'] .cardDesc { | |
| color: #a8c5e8; | |
| } | |
| [data-theme='dark'] .sectionTitle { | |
| color: #fff; | |
| } | |
| [data-theme='dark'] .techSection { | |
| background: #0a0420; | |
| } | |
| [data-theme='dark'] .techTitle { | |
| color: #fff; | |
| } | |
| [data-theme='dark'] .techBadge { | |
| background: #1a0f3e; | |
| box-shadow: 4px 4px 0 rgba(93, 173, 226, 0.2); | |
| } | |
| [data-theme='dark'] .techBadge:hover { | |
| box-shadow: 6px 6px 0 rgba(93, 173, 226, 0.3); | |
| } | |
| /* Smooth transitions for theme components */ | |
| .cosmicHero, | |
| .cosmicHero *, | |
| .featuresSection, | |
| .featuresSection *, | |
| .techSection, | |
| .techSection *, | |
| /* Smooth transitions for theme components */ |
| .cosmicHero, | ||
| .cosmicHero *, | ||
| .featuresSection, | ||
| .featuresSection *, | ||
| .techSection, | ||
| .techSection *, | ||
| .navbar, | ||
| .footer { | ||
| transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease; | ||
| } No newline at end of file |
Copilot
AI
Feb 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The transition rule block also uses .cosmicHero, .featuresSection, .techSection selectors which (as CSS-module classes) won’t match in global CSS. Even if moved/fixed, applying transitions to * under large sections can be expensive; consider limiting transitions to specific interactive elements (buttons/cards/badges) instead of all descendants.
| .cosmicHero, | |
| .cosmicHero *, | |
| .featuresSection, | |
| .featuresSection *, | |
| .techSection, | |
| .techSection *, | |
| .navbar, | |
| .footer { | |
| transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease; | |
| } | |
| .featureCard, | |
| .techBadge, | |
| .navbar, | |
| .footer { | |
| transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease; | |
| } |
| </Heading> | ||
| <div className={styles.techGrid}> | ||
| {techs.map((tech, idx) => ( | ||
| <div key={idx} className={styles.techBadge} style={{ borderColor: tech.color }}> |
Copilot
AI
Feb 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
techs.map((tech, idx) => ...) uses the array index as the React key. Since the key can be stable here (tech.name), prefer that to avoid unnecessary re-mounts if the list order ever changes.
| <div key={idx} className={styles.techBadge} style={{ borderColor: tech.color }}> | |
| <div key={tech.name} className={styles.techBadge} style={{ borderColor: tech.color }}> |


Completely redesigned website homepage from scratch with cosmic/universe elements in pixel art style and minimalist aesthetic, based on feedback to create an entirely new creative vision.
Visual Changes
Light Mode:

Dark Mode:

Implementation
Full-Screen Cosmic Hero Section (
index.js+index.module.css)linear-gradient(180deg, #0a0420 0%, #1a0f3e 50%, #0a0420 100%)Feature Cards Section
Technology Platform Badges
Color Palette (
custom.css)#3498dbprimary with#f8f9fabackgrounds#5dade2primary on#0a0420deep space backgroundAccessibility & Performance
aria-labelfor emoji subtitle textKey Changes from Original Design
CosmicHero,FeatureCard,Features,TechStackOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.