-
Notifications
You must be signed in to change notification settings - Fork 9
[refactor] redesign & rewrite Hackathon home page #59
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
Merged
TechQuery
merged 14 commits into
Open-Source-Bazaar:main
from
lichang333:codex/static-hackathon-niuma-2026
Mar 30, 2026
Merged
Changes from 8 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
6df3619
Add static hackathon fallback for niuma 2026
elleryli fec9d0a
Generalize hackathon page redesign
elleryli 6c5d0fa
Address hackathon page review feedback
elleryli 1674037
Polish remaining hackathon review fixes
elleryli ae8eed3
[fix] many CodeX bugs
TechQuery d6c6f97
Rewrite hackathon detail layout
elleryli 2a5b181
Normalize hackathon quotes
elleryli d6c1dba
Refactor hackathon detail sections
elleryli 6ffeb32
Address remaining review threads
elleryli 77bbdfb
Normalize LESS quotes
elleryli 0211cca
Apply latest PR review feedback
elleryli 8ef8dd2
[optimize] simplify CodeX codes
TechQuery e0ed89e
[refactor] fix many layouts & styles of CodeX codes
TechQuery faaad19
[optimize] simplify CodeX codes
TechQuery File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
140 changes: 140 additions & 0 deletions
140
components/Activity/Hackathon/HackathonActionHub.module.less
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,140 @@ | ||
| @import './theme.less'; | ||
|
|
||
| .section { | ||
| .section-shell(); | ||
| padding-top: clamp(3rem, 5vw, 4rem); | ||
| } | ||
|
|
||
| .registerWrap { | ||
| display: grid; | ||
| grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); | ||
| gap: 1.5rem; | ||
| align-items: start; | ||
| } | ||
|
|
||
| .registerCard { | ||
| .panel-card(); | ||
| background: linear-gradient(135deg, rgba(44, 232, 255, 0.08), rgba(123, 97, 255, 0.14)); | ||
| } | ||
|
|
||
| .registerCardInner, | ||
| .entryHub { | ||
| padding: 1.55rem; | ||
| } | ||
|
|
||
| .regEyebrow, | ||
| .entryEyebrow, | ||
| .entryStep { | ||
| .eyebrow(); | ||
| } | ||
|
|
||
| .regTitle, | ||
| .entryTitle { | ||
| margin: 0; | ||
| color: #fff; | ||
| font-family: @heading; | ||
| font-size: clamp(1.55rem, 3vw, 2.1rem); | ||
| font-weight: 800; | ||
| line-height: 1.3; | ||
| } | ||
|
|
||
| .regTitle { | ||
| margin-top: 0.4rem; | ||
| } | ||
|
|
||
| .regDesc, | ||
| .entryCard p { | ||
| color: @muted; | ||
| line-height: 1.75; | ||
| } | ||
|
|
||
| .regDesc { | ||
| margin: 0.9rem 0 1.2rem; | ||
| } | ||
|
|
||
| .regActions, | ||
| .entryLinks { | ||
| display: flex; | ||
| flex-wrap: wrap; | ||
| gap: 0.9rem; | ||
| } | ||
|
|
||
| .actionButton { | ||
| .button-primary(); | ||
| } | ||
|
|
||
| .actionButtonGhost, | ||
| .entryLink { | ||
| .button-ghost(); | ||
| } | ||
|
|
||
| .regFacts { | ||
| display: flex; | ||
| flex-wrap: wrap; | ||
| gap: 0.75rem; | ||
| margin: 1.3rem 0 0; | ||
|
|
||
| li { | ||
| .chip(); | ||
| padding: 0.48rem 0.85rem; | ||
| color: @copy; | ||
| font-size: 0.9rem; | ||
| } | ||
| } | ||
|
|
||
| .entryHub { | ||
| .panel-card(); | ||
| } | ||
|
|
||
| .entryHubHead { | ||
| margin-bottom: 1.25rem; | ||
| } | ||
|
|
||
| .entryTitle { | ||
| margin-top: 0.35rem; | ||
| font-size: 1.55rem; | ||
| } | ||
|
|
||
| .entryCard { | ||
| .panel-card(); | ||
| height: 100%; | ||
| padding: 1.3rem; | ||
| } | ||
|
|
||
| .entryStep { | ||
| color: @cyan; | ||
| } | ||
|
|
||
| .entryCard h4 { | ||
| margin: 0.55rem 0 0.45rem; | ||
| color: #fff; | ||
| font-family: @heading; | ||
| font-size: 1.02rem; | ||
| } | ||
|
|
||
| .entryCard p { | ||
| margin: 0; | ||
| } | ||
|
|
||
| .entryMetaRow { | ||
| display: flex; | ||
| flex-wrap: wrap; | ||
| gap: 0.6rem; | ||
| margin: 1rem 0; | ||
| } | ||
|
|
||
| .entryMeta { | ||
| .chip(); | ||
| padding: 0.35rem 0.7rem; | ||
| color: @gold; | ||
| font-family: @heading; | ||
| font-size: 0.72rem; | ||
| letter-spacing: 0.06em; | ||
| text-transform: uppercase; | ||
| } | ||
|
|
||
| @media (max-width: 1199px) { | ||
| .registerWrap { | ||
| grid-template-columns: 1fr; | ||
| } | ||
| } | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,116 @@ | ||
| import { FC } from 'react'; | ||
| import { Col, Container, Row } from 'react-bootstrap'; | ||
|
|
||
| import { HackathonHeroAction } from './HackathonHero'; | ||
| import styles from './HackathonActionHub.module.less'; | ||
|
|
||
| export interface HackathonActionHubEntry { | ||
| count: number; | ||
| description: string; | ||
| eyebrow: string; | ||
| links: HackathonHeroAction[]; | ||
| title: string; | ||
| } | ||
|
|
||
| export interface HackathonActionHubProps { | ||
| entries: HackathonActionHubEntry[]; | ||
| facts: string[]; | ||
| primaryAction?: HackathonHeroAction; | ||
| primaryDescription: string; | ||
| primaryTitle: string; | ||
| secondaryAction: HackathonHeroAction; | ||
| subtitle: string; | ||
| title: string; | ||
| } | ||
|
|
||
| const ActionHubLink: FC<{ action: HackathonHeroAction; variant: 'ghost' | 'primary' }> = ({ | ||
| action, | ||
| variant, | ||
| }) => ( | ||
| <a | ||
| className={variant === 'primary' ? styles.actionButton : styles.actionButtonGhost} | ||
| href={action.href} | ||
| {...(action.external && { target: '_blank', rel: 'noreferrer' })} | ||
| > | ||
| {action.label} | ||
| </a> | ||
| ); | ||
|
|
||
| const ActionEntryCard: FC<{ entry: HackathonActionHubEntry; step: string }> = ({ entry, step }) => ( | ||
| <article className={styles.entryCard}> | ||
| <span className={styles.entryStep}> | ||
| {step} · {entry.eyebrow} | ||
| </span> | ||
| <h4>{entry.title}</h4> | ||
| <p>{entry.description}</p> | ||
|
|
||
| <div className={styles.entryMetaRow}> | ||
| <span className={styles.entryMeta}>{entry.count}</span> | ||
| <span className={styles.entryMeta}>{entry.eyebrow}</span> | ||
| </div> | ||
|
|
||
| <nav className={styles.entryLinks} aria-label={entry.title}> | ||
| {entry.links.map(link => ( | ||
| <a | ||
| key={`${link.label}-${link.href}`} | ||
| className={styles.entryLink} | ||
| href={link.href} | ||
| {...(link.external && { target: '_blank', rel: 'noreferrer' })} | ||
| > | ||
| {link.label} | ||
| </a> | ||
| ))} | ||
| </nav> | ||
| </article> | ||
| ); | ||
|
|
||
| export const HackathonActionHub: FC<HackathonActionHubProps> = ({ | ||
| entries, | ||
| facts, | ||
| primaryAction, | ||
| primaryDescription, | ||
| primaryTitle, | ||
| secondaryAction, | ||
| subtitle, | ||
| title, | ||
| }) => ( | ||
| <section id="entry-hub" className={styles.section}> | ||
| <Container> | ||
| <div className={styles.registerWrap}> | ||
| <article className={styles.registerCard}> | ||
| <div className={styles.registerCardInner}> | ||
| <p className={styles.regEyebrow}>{title}</p> | ||
| <h2 className={styles.regTitle}>{primaryTitle}</h2> | ||
| <p className={styles.regDesc}>{primaryDescription}</p> | ||
|
|
||
| <nav className={styles.regActions} aria-label={title}> | ||
| {primaryAction && <ActionHubLink action={primaryAction} variant="primary" />} | ||
| <ActionHubLink action={secondaryAction} variant="ghost" /> | ||
|
TechQuery marked this conversation as resolved.
Outdated
|
||
| </nav> | ||
|
|
||
| <ul className={`list-unstyled ${styles.regFacts}`}> | ||
| {facts.map(fact => ( | ||
| <li key={fact}>{fact}</li> | ||
| ))} | ||
| </ul> | ||
| </div> | ||
| </article> | ||
|
|
||
| <div className={styles.entryHub}> | ||
| <header className={styles.entryHubHead}> | ||
| <p className={styles.entryEyebrow}>{subtitle}</p> | ||
| <h3 className={styles.entryTitle}>{title}</h3> | ||
| </header> | ||
|
|
||
| <Row as="ol" className="list-unstyled g-3 mb-0"> | ||
| {entries.map((entry, index) => ( | ||
| <Col as="li" key={entry.title} md={6}> | ||
| <ActionEntryCard entry={entry} step={String(index + 1).padStart(2, '0')} /> | ||
| </Col> | ||
| ))} | ||
| </Row> | ||
| </div> | ||
| </div> | ||
| </Container> | ||
| </section> | ||
| ); | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.