Skip to content

feat(home): CRA lab culture typewriter mottos - #102

Merged
swear01 merged 3 commits into
mainfrom
cursor/typewriter-mottos-5109
Oct 1, 2026
Merged

swear01 merged 3 commits into
mainfrom
cursor/typewriter-mottos-5109

Conversation

@swear01

@swear01 swear01 commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Restores the legacy CRA lab culture rotating typewriter from About/index.js (typewriter-effect on LAB_CULTURE.SUBTITLE in frontend.json).

Placement

  • Homepage #lab-introduction (.home-mission), below the mission paragraphs and above NEWS & AWARDS — same narrative order as CRA About (intro text → culture motto → gallery; we omit the gallery carousel for now).

Copy

  • Three English mottos (CRA had no zh variants): home.{zh,en}.cultureMottos in src/data/page-copy.mjs
  • Both locales render lang="en" on the typewriter line.

Behavior

  • Client: src/scripts/home-culture-typewriter.mjs — type (20ms/char) → pause → delete (30ms/char) → next, loop, cursor _ with CSS blink (matches CRA options).
  • prefers-reduced-motion: reduce: no typing; full strings rotate every 5s; cursor blink disabled (is-reduced-motion class).
  • SSR fallback: first motto in HTML for smoke/SEO.

Tests / docs

  • Smoke: motto string in dist/index.html (zh + en).
  • Browser home logo test: [data-culture-typewriter] visible + data-strings payload.
  • docs/content-guide.md updated.

PUBLIC_SITE_URL=https://dvlab-ntu.github.io npm run verify passes locally.

Do not merge (per request).

Open in Web Open in Cursor 

cursoragent and others added 3 commits October 1, 2026 05:06
Cycle the three English culture slogans from legacy About/LAB_CULTURE with
vanilla type/delete loop, blinking underscore cursor, and reduced-motion
instant rotation. Placed below mission copy in #lab-introduction.

Co-authored-by: SSU-WEI HUANG <stanley.yellow1@gmail.com>
Co-authored-by: SSU-WEI HUANG <stanley.yellow1@gmail.com>
95867e9 accidentally emptied cra-layout.css on the remote. Restore full
stylesheet from bbc6ca0 and add white-space: nowrap on .home-culture-typewriter.

Co-authored-by: SSU-WEI HUANG <stanley.yellow1@gmail.com>
@swear01
swear01 marked this pull request as ready for review October 1, 2026 10:38
@swear01
swear01 merged commit 2d370c3 into main Oct 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants