{{ message }}
Repository navigation
refactor(website): simplify landing page (helpers, types, data-driven blocks) - #4350
Merged
Merged
Conversation
… blocks) - sections.ts: SECTIONS now stores plain ids; add hash() + revealClass() helpers, RevealDelay union, and DEFAULT_THEME so consumers stop calling .slice(1) and stop concatenating "reveal d1" by hand. - lib/links.ts: shared EXT_LINK constant replaces the 12+ hand-written target="_blank" rel="noopener noreferrer" triples on the landing page. - Brand component: factor the logo + wordmark block out of Nav and Footer (it was a verbatim copy). - FeatureCard: drop the style / titleStyle / descStyle / className escape hatches; expose delay? + variant?: 'lg' instead. FocusExport switches to the variant + new mini--lg / platforms--start / plat--compact CSS modifier classes. - Stats / Download: render from a STATS[] / PLATFORMS[] data table instead of repeated JSX blocks. - Themes: replace the duplicate SunSmallIcon with SunIcon (removed from Icons.tsx). - useTheme + app/layout: read DEFAULT_THEME from sections.ts so the inline boot script no longer hard-codes the 'dark' literal. - globals.css: add the modifier classes (.card--lg, .plat--compact, .platforms--start, .block--top-tight, .kicker--center, .hero-cta--center, .hero-note--cta, .grid-3.grid-2, .mini--lg) that replace the previous inline style triplets. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
Contributor
|
Build artifacts for PR #4350: Run: https://github.com/marktext/marktext/actions/runs/26832302713 |
thimbleberrysystems
pushed a commit
to thimbleberrysystems/WordBird
that referenced
this pull request
Jun 21, 2026
… blocks) (marktext#4350) - sections.ts: SECTIONS now stores plain ids; add hash() + revealClass() helpers, RevealDelay union, and DEFAULT_THEME so consumers stop calling .slice(1) and stop concatenating "reveal d1" by hand. - lib/links.ts: shared EXT_LINK constant replaces the 12+ hand-written target="_blank" rel="noopener noreferrer" triples on the landing page. - Brand component: factor the logo + wordmark block out of Nav and Footer (it was a verbatim copy). - FeatureCard: drop the style / titleStyle / descStyle / className escape hatches; expose delay? + variant?: 'lg' instead. FocusExport switches to the variant + new mini--lg / platforms--start / plat--compact CSS modifier classes. - Stats / Download: render from a STATS[] / PLATFORMS[] data table instead of repeated JSX blocks. - Themes: replace the duplicate SunSmallIcon with SunIcon (removed from Icons.tsx). - useTheme + app/layout: read DEFAULT_THEME from sections.ts so the inline boot script no longer hard-codes the 'dark' literal. - globals.css: add the modifier classes (.card--lg, .plat--compact, .platforms--start, .block--top-tight, .kicker--center, .hero-cta--center, .hero-note--cta, .grid-3.grid-2, .mini--lg) that replace the previous inline style triplets. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

Summary
Internal cleanups to the landing page (
app/page.tsx+components/*.tsx). The rendered page is the same — same layout, same copy, same animations, same Tailwind/CSS output. Smaller diffs going forward.lib/sections.ts:SECTIONSnow stores plain ids (no leading#); addhash(id),revealClass(delay?, extra?), theRevealDelayunion and aDEFAULT_THEMEconstant. Consumers stop calling.slice(1)to recover the id, and stop building"reveal d1"by hand.lib/links.ts: a sharedEXT_LINK = { target: '_blank', rel: 'noopener noreferrer' } as constthat replaces 12+ hand-written triples across Nav / Footer / Hero / Download / Support.Brandcomponent: factor the logo + wordmark block out ofNavandFooter(the two copies were verbatim).FeatureCard: drop thestyle/titleStyle/descStyle/classNameescape hatches. Exposedelay?: RevealDelay+variant?: 'lg'instead.FocusExportswitches to the variant + newmini--lg/platforms--start/plat--compactCSS modifier classes, removing several inline-style triplets.Stats/Download: render from aSTATS[]/PLATFORMS[]data table instead of repeated JSX blocks.SunSmallIconis dropped fromIcons.tsx;Themes.tsxusesSunIconinstead.useTheme+app/layout.tsx: readDEFAULT_THEMEfromsections.tsso the inline boot script no longer hard-codes the'dark'literal in three places.globals.css: add the new modifier classes (.card--lg,.plat--compact,.platforms--start,.block--top-tight,.kicker--center,.hero-cta--center,.hero-note--cta,.grid-3.grid-2,.mini--lg) that replace inline style triplets.Test plan
pnpm --filter marktext-website type-checkpnpm --filter marktext-website lintpnpm --filter marktext-website build(37 static pages)🤖 Generated with Claude Code