c1-ios-prototype.html 34 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142
  1. <!doctype html>
  2. <html lang="zh-Hans">
  3. <head>
  4. <meta charset="utf-8" />
  5. <title>huashu-design V2 · c1-ios-prototype · 中文版</title>
  6. <link rel="preconnect" href="https://fonts.googleapis.com">
  7. <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  8. <link href="https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,300..700;1,8..60,300..700&family=Noto+Serif+SC:wght@300;400;500;600&family=Inter:wght@100;200;300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
  9. <style>
  10. :root {
  11. --bg: #000000;
  12. --ink: #FFFFFF;
  13. --ink-80: rgba(255,255,255,0.82);
  14. --ink-60: rgba(255,255,255,0.58);
  15. --muted: rgba(255,255,255,0.40);
  16. --dim: rgba(255,255,255,0.18);
  17. --hairline: rgba(255,255,255,0.12);
  18. --accent: #D97757;
  19. --accent-deep: #B85D3D;
  20. --cd-bg: #F5F4F0;
  21. --cd-ink: #1A1918;
  22. --cd-dim: #8B867E;
  23. --cd-green: #2D4A3A;
  24. --serif-en: "Source Serif 4", Georgia, serif;
  25. --serif-cn: "Noto Serif SC", "Songti SC", serif;
  26. --sans: "Inter", -apple-system, "PingFang SC", sans-serif;
  27. --mono: "JetBrains Mono", "SF Mono", ui-monospace, monospace;
  28. }
  29. html, body {
  30. margin: 0; padding: 0;
  31. background: #000;
  32. overflow: hidden;
  33. font-family: var(--sans);
  34. color: var(--ink);
  35. -webkit-font-smoothing: antialiased;
  36. }
  37. * { box-sizing: border-box; }
  38. .stage {
  39. position: fixed;
  40. top: 50%; left: 50%;
  41. width: 1920px; height: 1080px;
  42. transform-origin: center center;
  43. background: var(--bg);
  44. overflow: hidden;
  45. }
  46. /* Film grain */
  47. .stage::after {
  48. content: '';
  49. position: absolute; inset: 0;
  50. background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='200' height='200' filter='url(%23n)' opacity='0.4'/></svg>");
  51. opacity: 0.02;
  52. pointer-events: none;
  53. mix-blend-mode: overlay;
  54. z-index: 200;
  55. }
  56. /* Watermark — always on top, adapts in brand reveal (handled by JS) */
  57. .watermark {
  58. position: absolute;
  59. top: 36px; left: 48px;
  60. font-family: var(--mono);
  61. font-size: 13px;
  62. letter-spacing: 0.2em;
  63. color: rgba(255,255,255,0.16);
  64. text-transform: uppercase;
  65. z-index: 400;
  66. pointer-events: none;
  67. transition: color 0.4s;
  68. }
  69. .watermark.on-light { color: rgba(26,25,24,0.22); }
  70. /* ============ Terminal (left) ============ */
  71. .terminal {
  72. position: absolute;
  73. top: 50%;
  74. left: 120px;
  75. transform: translateY(-50%);
  76. width: 620px;
  77. background: rgba(18, 18, 18, 1);
  78. border: 1px solid var(--hairline);
  79. border-radius: 14px;
  80. overflow: hidden;
  81. opacity: 0;
  82. will-change: opacity, transform;
  83. box-shadow:
  84. 0 0 0 1px rgba(255,255,255,0.02),
  85. 0 40px 80px -20px rgba(217,119,87,0.12);
  86. }
  87. .tty-head {
  88. display: flex; align-items: center; gap: 8px;
  89. padding: 14px 18px;
  90. border-bottom: 1px solid var(--hairline);
  91. background: rgba(255,255,255,0.02);
  92. }
  93. .tty-head .d { width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,0.1); }
  94. .tty-head .d.r { background: #5a2a2a; }
  95. .tty-head .d.y { background: #5a4a2a; }
  96. .tty-head .d.g { background: #2a5a35; }
  97. .tty-head .title {
  98. margin-left: 14px;
  99. font-family: var(--mono);
  100. font-size: 12px;
  101. color: var(--muted);
  102. letter-spacing: 0.04em;
  103. }
  104. .tty-body {
  105. padding: 32px 28px;
  106. font-family: var(--mono);
  107. font-size: 20px;
  108. line-height: 1.7;
  109. color: rgba(255,255,255,0.88);
  110. min-height: 220px;
  111. }
  112. .prompt { color: var(--accent); margin-right: 10px; }
  113. .comment { color: var(--ink-60); font-size: 16px; margin-bottom: 10px; }
  114. .typed { white-space: pre; }
  115. .cursor {
  116. display: inline-block;
  117. width: 10px; height: 24px;
  118. background: var(--accent);
  119. vertical-align: -4px;
  120. margin-left: 2px;
  121. animation: blink 1s steps(2) infinite;
  122. }
  123. @keyframes blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }
  124. /* Arrow connector terminal → iPhone */
  125. .connector {
  126. position: absolute;
  127. top: 50%;
  128. left: 740px;
  129. width: 160px;
  130. height: 2px;
  131. transform: translateY(-50%);
  132. opacity: 0;
  133. background: linear-gradient(90deg, var(--accent) 0%, rgba(217,119,87,0) 100%);
  134. transform-origin: left center;
  135. will-change: opacity, transform;
  136. }
  137. /* ============ iPhone ============ */
  138. .phone-wrap {
  139. position: absolute;
  140. top: 50%;
  141. left: 1020px;
  142. transform: translateY(-50%);
  143. opacity: 0;
  144. will-change: opacity, transform;
  145. }
  146. .phone {
  147. width: 440px;
  148. height: 900px;
  149. background: #0e0e10;
  150. border-radius: 58px;
  151. padding: 12px;
  152. position: relative;
  153. box-shadow:
  154. 0 0 0 1.5px rgba(255,255,255,0.14),
  155. 0 0 0 8px rgba(30,30,32,1),
  156. 0 80px 160px -20px rgba(0,0,0,0.85),
  157. 0 30px 70px -20px rgba(217,119,87,0.1);
  158. }
  159. .phone::before {
  160. /* subtle metallic ring */
  161. content: '';
  162. position: absolute;
  163. inset: -4px;
  164. border-radius: 62px;
  165. background: linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0) 40%, rgba(217,119,87,0.05) 80%, rgba(255,255,255,0.08));
  166. z-index: -1;
  167. }
  168. .screen {
  169. width: 416px;
  170. height: 876px;
  171. border-radius: 46px;
  172. overflow: hidden;
  173. position: relative;
  174. background: #F5F4F0; /* default: claude mist */
  175. }
  176. .screen.dark { background: #0a0a0a; }
  177. /* Dynamic island */
  178. .island {
  179. position: absolute;
  180. top: 14px;
  181. left: 50%;
  182. transform: translateX(-50%);
  183. width: 120px;
  184. height: 34px;
  185. background: #000;
  186. border-radius: 999px;
  187. z-index: 30;
  188. }
  189. /* Status bar */
  190. .status-bar {
  191. position: absolute;
  192. top: 0; left: 0; right: 0;
  193. height: 54px;
  194. display: flex;
  195. align-items: center;
  196. justify-content: space-between;
  197. padding: 18px 34px 0 34px;
  198. font-family: -apple-system, "SF Pro Text", sans-serif;
  199. font-size: 15px;
  200. font-weight: 600;
  201. z-index: 20;
  202. pointer-events: none;
  203. color: inherit;
  204. }
  205. .status-bar .icons {
  206. display: flex; align-items: center; gap: 6px;
  207. }
  208. .status-bar .icons .bars {
  209. display: flex; align-items: flex-end; gap: 2px; height: 11px;
  210. }
  211. .status-bar .icons .bars div {
  212. width: 3px; background: currentColor; border-radius: 1px;
  213. }
  214. .status-bar .icons .bat {
  215. width: 26px; height: 12px;
  216. border: 1.2px solid currentColor; border-radius: 3px; padding: 1px;
  217. position: relative;
  218. opacity: 0.9;
  219. }
  220. .status-bar .icons .bat::after {
  221. content: ''; position: absolute; top: 3px; right: -3px; width: 2px; height: 6px;
  222. background: currentColor; border-radius: 0 1px 1px 0;
  223. }
  224. .status-bar .icons .bat .fill {
  225. width: 84%; height: 100%; background: currentColor; border-radius: 1px;
  226. }
  227. .home-indicator {
  228. position: absolute;
  229. bottom: 10px;
  230. left: 50%;
  231. transform: translateX(-50%);
  232. width: 140px;
  233. height: 5px;
  234. background: rgba(0,0,0,0.3);
  235. border-radius: 999px;
  236. z-index: 10;
  237. }
  238. .screen.dark .home-indicator { background: rgba(255,255,255,0.5); }
  239. /* Content area (below status bar) */
  240. .content {
  241. position: absolute;
  242. top: 64px; left: 0; right: 0; bottom: 30px;
  243. overflow: hidden;
  244. z-index: 5;
  245. }
  246. /* Screen views */
  247. .screen-view {
  248. position: absolute;
  249. inset: 0;
  250. opacity: 0;
  251. will-change: opacity, transform;
  252. }
  253. /* 1. Wireframe (ghost) */
  254. .wire {
  255. padding: 40px 28px;
  256. }
  257. .wire .ghost {
  258. background: rgba(26, 25, 24, 0.08);
  259. border-radius: 10px;
  260. margin-bottom: 14px;
  261. }
  262. .wire .g1 { height: 36px; width: 60%; }
  263. .wire .g2 { height: 180px; }
  264. .wire .g3 { height: 20px; width: 80%; }
  265. .wire .g4 { height: 20px; width: 50%; }
  266. .wire .g5 { height: 52px; margin-top: 24px; }
  267. /* 2. Home screen — 主屏 · pomodoro */
  268. .home-screen { padding: 40px 28px; color: var(--cd-ink); }
  269. .home-screen .kicker {
  270. font-family: var(--mono);
  271. font-size: 12px;
  272. letter-spacing: 0.22em;
  273. color: var(--cd-dim);
  274. text-transform: uppercase;
  275. }
  276. .home-screen .title {
  277. font-family: var(--serif-cn);
  278. font-size: 40px;
  279. font-weight: 500;
  280. line-height: 1.15;
  281. margin-top: 10px;
  282. letter-spacing: -0.01em;
  283. }
  284. .home-screen .time-big {
  285. margin-top: 50px;
  286. font-family: var(--serif-en);
  287. font-size: 168px;
  288. font-weight: 200;
  289. line-height: 0.95;
  290. letter-spacing: -0.04em;
  291. color: var(--cd-ink);
  292. }
  293. .home-screen .time-big .sep { color: var(--accent); }
  294. .home-screen .sub {
  295. font-family: var(--sans);
  296. font-size: 15px;
  297. color: var(--cd-dim);
  298. margin-top: 18px;
  299. letter-spacing: 0.02em;
  300. }
  301. .home-screen .cta {
  302. margin-top: 64px;
  303. height: 62px;
  304. background: var(--cd-ink);
  305. color: #fff;
  306. border-radius: 999px;
  307. display: flex; align-items: center; justify-content: center;
  308. font-family: var(--sans);
  309. font-size: 17px;
  310. font-weight: 500;
  311. letter-spacing: 0.04em;
  312. position: relative;
  313. }
  314. .home-screen .cta::before {
  315. content: '';
  316. width: 0; height: 0;
  317. border-left: 10px solid #fff;
  318. border-top: 7px solid transparent;
  319. border-bottom: 7px solid transparent;
  320. margin-right: 10px;
  321. }
  322. /* 3. Timer · 计时 · ring */
  323. .timer-screen {
  324. padding: 40px 28px;
  325. color: var(--cd-ink);
  326. text-align: center;
  327. }
  328. .timer-screen .phase {
  329. font-family: var(--mono);
  330. font-size: 12px;
  331. letter-spacing: 0.24em;
  332. color: var(--accent);
  333. text-transform: uppercase;
  334. text-align: left;
  335. }
  336. .ring-wrap {
  337. margin: 80px auto 0;
  338. width: 320px; height: 320px;
  339. position: relative;
  340. }
  341. .ring-wrap svg {
  342. width: 100%; height: 100%;
  343. transform: rotate(-90deg);
  344. }
  345. .ring-wrap .bg-ring {
  346. fill: none; stroke: rgba(26,25,24,0.08); stroke-width: 14;
  347. }
  348. .ring-wrap .fg-ring {
  349. fill: none; stroke: #D97757; stroke-width: 14; stroke-linecap: round;
  350. stroke-dasharray: 880;
  351. stroke-dashoffset: 880;
  352. }
  353. .ring-wrap .ring-label {
  354. position: absolute;
  355. top: 50%; left: 50%;
  356. transform: translate(-50%, -50%);
  357. text-align: center;
  358. }
  359. .ring-wrap .rl-time {
  360. font-family: var(--serif-en);
  361. font-size: 86px;
  362. font-weight: 200;
  363. line-height: 1;
  364. letter-spacing: -0.03em;
  365. color: var(--cd-ink);
  366. }
  367. .ring-wrap .rl-tag {
  368. margin-top: 10px;
  369. font-family: var(--mono);
  370. font-size: 12px;
  371. letter-spacing: 0.2em;
  372. color: var(--cd-dim);
  373. text-transform: uppercase;
  374. }
  375. .timer-screen .actions {
  376. margin-top: 60px;
  377. display: flex; gap: 14px; justify-content: center;
  378. }
  379. .timer-screen .act-btn {
  380. padding: 14px 32px;
  381. border-radius: 999px;
  382. background: rgba(26,25,24,0.05);
  383. font-family: var(--sans);
  384. font-size: 14px;
  385. font-weight: 500;
  386. color: var(--cd-ink);
  387. letter-spacing: 0.04em;
  388. border: 1px solid rgba(26,25,24,0.08);
  389. }
  390. .timer-screen .act-btn.primary {
  391. background: var(--cd-ink);
  392. color: #fff;
  393. border-color: transparent;
  394. }
  395. /* 4. Stats · 统计 · bar chart */
  396. .stats-screen { padding: 40px 28px; color: var(--cd-ink); }
  397. .stats-screen .stats-label {
  398. font-family: var(--mono);
  399. font-size: 12px;
  400. letter-spacing: 0.24em;
  401. color: var(--cd-dim);
  402. text-transform: uppercase;
  403. }
  404. .stats-screen .stats-hero {
  405. font-family: var(--serif-en);
  406. font-size: 120px;
  407. font-weight: 200;
  408. line-height: 1;
  409. letter-spacing: -0.04em;
  410. margin-top: 10px;
  411. }
  412. .stats-screen .stats-hero .unit {
  413. font-size: 28px;
  414. color: var(--cd-dim);
  415. margin-left: 8px;
  416. font-weight: 300;
  417. }
  418. .stats-screen .stats-sub {
  419. font-family: var(--sans);
  420. font-size: 14px;
  421. color: var(--cd-dim);
  422. margin-top: 6px;
  423. letter-spacing: 0.02em;
  424. }
  425. .chart {
  426. margin-top: 52px;
  427. display: flex;
  428. gap: 10px;
  429. align-items: flex-end;
  430. height: 200px;
  431. padding: 0 4px;
  432. }
  433. .chart .bar {
  434. flex: 1;
  435. background: var(--accent);
  436. border-radius: 6px 6px 0 0;
  437. opacity: 0.85;
  438. transform-origin: bottom;
  439. will-change: transform;
  440. }
  441. .chart .bar.dim { background: rgba(26,25,24,0.15); }
  442. .chart-x {
  443. display: flex;
  444. justify-content: space-between;
  445. margin-top: 12px;
  446. font-family: var(--mono);
  447. font-size: 10px;
  448. color: var(--cd-dim);
  449. letter-spacing: 0.08em;
  450. padding: 0 4px;
  451. }
  452. /* 5. Settings · 设置 · list */
  453. .settings-screen { padding: 40px 28px; color: var(--cd-ink); }
  454. .settings-screen .title-row {
  455. font-family: var(--serif-cn);
  456. font-size: 40px;
  457. font-weight: 500;
  458. letter-spacing: -0.01em;
  459. }
  460. .settings-screen .list {
  461. margin-top: 40px;
  462. background: #FFFFFF;
  463. border-radius: 14px;
  464. overflow: hidden;
  465. border: 1px solid rgba(26,25,24,0.06);
  466. }
  467. .settings-screen .row {
  468. padding: 22px 24px;
  469. display: flex;
  470. align-items: center;
  471. justify-content: space-between;
  472. border-bottom: 1px solid rgba(26,25,24,0.06);
  473. }
  474. .settings-screen .row:last-child { border-bottom: none; }
  475. .settings-screen .row .k {
  476. font-family: var(--sans);
  477. font-size: 16px;
  478. color: var(--cd-ink);
  479. }
  480. .settings-screen .row .v {
  481. font-family: var(--mono);
  482. font-size: 13px;
  483. color: var(--cd-dim);
  484. letter-spacing: 0.04em;
  485. }
  486. .toggle {
  487. width: 48px; height: 28px;
  488. border-radius: 999px;
  489. background: var(--cd-green);
  490. position: relative;
  491. }
  492. .toggle::after {
  493. content: ''; position: absolute;
  494. top: 3px; right: 3px;
  495. width: 22px; height: 22px;
  496. background: #fff;
  497. border-radius: 50%;
  498. box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  499. }
  500. .toggle.off { background: rgba(26,25,24,0.15); }
  501. .toggle.off::after { left: 3px; right: auto; }
  502. /* Tab bar (bottom of home-like screens) */
  503. .tab-bar {
  504. position: absolute;
  505. bottom: 30px; left: 28px; right: 28px;
  506. height: 58px;
  507. background: #FFFFFF;
  508. border-radius: 999px;
  509. border: 1px solid rgba(26,25,24,0.08);
  510. display: flex;
  511. justify-content: space-around;
  512. align-items: center;
  513. padding: 0 14px;
  514. box-shadow: 0 10px 28px -10px rgba(0,0,0,0.15);
  515. }
  516. .tab-bar .tab {
  517. display: flex;
  518. flex-direction: column;
  519. align-items: center;
  520. gap: 2px;
  521. font-family: var(--mono);
  522. font-size: 10px;
  523. color: var(--cd-dim);
  524. letter-spacing: 0.1em;
  525. text-transform: uppercase;
  526. padding: 8px 14px;
  527. border-radius: 999px;
  528. }
  529. .tab-bar .tab.active {
  530. background: var(--cd-ink);
  531. color: #fff;
  532. }
  533. .tab-bar .tab .ico {
  534. width: 18px; height: 18px;
  535. border-radius: 4px;
  536. background: currentColor;
  537. opacity: 0.9;
  538. margin-bottom: 3px;
  539. }
  540. /* Finger / tap */
  541. .tap {
  542. position: absolute;
  543. z-index: 40;
  544. width: 64px; height: 64px;
  545. pointer-events: none;
  546. opacity: 0;
  547. will-change: opacity, transform;
  548. }
  549. .tap .core {
  550. position: absolute;
  551. inset: 18px;
  552. background: rgba(217, 119, 87, 0.85);
  553. border-radius: 50%;
  554. box-shadow: 0 0 0 2px rgba(255,255,255,0.5), 0 0 24px rgba(217,119,87,0.5);
  555. }
  556. .tap .ring {
  557. position: absolute;
  558. inset: 0;
  559. border: 2px solid rgba(217,119,87,0.6);
  560. border-radius: 50%;
  561. animation: tapring 0.6s ease-out;
  562. }
  563. @keyframes tapring {
  564. 0% { transform: scale(0.4); opacity: 1; }
  565. 100% { transform: scale(1.3); opacity: 0; }
  566. }
  567. /* ============ Brand Reveal ============ */
  568. .brand-wall {
  569. position: absolute;
  570. inset: 0;
  571. background: var(--cd-bg);
  572. z-index: 300;
  573. opacity: 0;
  574. transform: translateY(100%);
  575. will-change: transform, opacity;
  576. display: flex;
  577. flex-direction: column;
  578. align-items: center;
  579. justify-content: center;
  580. }
  581. .brand-wordmark {
  582. font-family: var(--serif-en);
  583. font-size: 132px;
  584. font-weight: 200;
  585. color: var(--cd-ink);
  586. letter-spacing: -0.04em;
  587. line-height: 1;
  588. opacity: 0;
  589. transform: scale(0.92);
  590. will-change: opacity, transform;
  591. }
  592. .brand-wordmark .dot { color: var(--accent); padding: 0 10px; font-weight: 300; }
  593. .brand-underline {
  594. margin-top: 28px;
  595. height: 2px;
  596. width: 0;
  597. background: var(--accent);
  598. will-change: width;
  599. }
  600. .brand-cn {
  601. margin-top: 30px;
  602. font-family: var(--serif-cn);
  603. font-size: 18px;
  604. font-weight: 300;
  605. color: var(--cd-dim);
  606. letter-spacing: 0.4em;
  607. opacity: 0;
  608. will-change: opacity;
  609. }
  610. </style>
  611. </head>
  612. <body>
  613. <div class="stage" id="stage">
  614. <div class="watermark">HUASHU · DESIGN</div>
  615. <!-- Terminal -->
  616. <div class="terminal" id="terminal">
  617. <div class="tty-head">
  618. <div class="d r"></div>
  619. <div class="d y"></div>
  620. <div class="d g"></div>
  621. <div class="title">~/projects</div>
  622. </div>
  623. <div class="tty-body">
  624. <div class="comment" id="comment" style="opacity:0">&gt; 说一句话,拿回一个能点的 App</div>
  625. <div style="margin-top:6px">
  626. <span class="prompt">$</span><span class="typed" id="typed"></span><span class="cursor" id="ttyCursor"></span>
  627. </div>
  628. </div>
  629. </div>
  630. <div class="connector" id="connector"></div>
  631. <!-- Phone -->
  632. <div class="phone-wrap" id="phoneWrap">
  633. <div class="phone">
  634. <div class="screen" id="screen">
  635. <!-- Status bar -->
  636. <div class="status-bar" id="statusBar" style="color:#1A1918">
  637. <span>9:41</span>
  638. <div class="icons">
  639. <div class="bars">
  640. <div style="height:4px"></div>
  641. <div style="height:6px"></div>
  642. <div style="height:8px"></div>
  643. <div style="height:10px"></div>
  644. </div>
  645. <div class="bat"><div class="fill"></div></div>
  646. </div>
  647. </div>
  648. <div class="island"></div>
  649. <div class="content">
  650. <!-- 1. Wireframe -->
  651. <div class="screen-view" id="view-wire">
  652. <div class="wire">
  653. <div class="ghost g1"></div>
  654. <div class="ghost g2"></div>
  655. <div class="ghost g3"></div>
  656. <div class="ghost g4"></div>
  657. <div class="ghost g5"></div>
  658. </div>
  659. </div>
  660. <!-- 2. Home -->
  661. <div class="screen-view" id="view-home">
  662. <div class="home-screen">
  663. <div class="kicker">POMODORO · 专注</div>
  664. <div class="title">下一件要做的事</div>
  665. <div class="time-big">25<span class="sep">:</span>00</div>
  666. <div class="sub">写完这一节,休息 5 分钟</div>
  667. <div class="cta">开始专注</div>
  668. </div>
  669. </div>
  670. <!-- 3. Timer -->
  671. <div class="screen-view" id="view-timer">
  672. <div class="timer-screen">
  673. <div class="phase">FOCUS · 第 1 轮</div>
  674. <div class="ring-wrap">
  675. <svg viewBox="0 0 320 320">
  676. <circle class="bg-ring" cx="160" cy="160" r="140"/>
  677. <circle class="fg-ring" id="fgRing" cx="160" cy="160" r="140"/>
  678. </svg>
  679. <div class="ring-label">
  680. <div class="rl-time" id="ringTime">24:12</div>
  681. <div class="rl-tag">剩余</div>
  682. </div>
  683. </div>
  684. <div class="actions">
  685. <div class="act-btn">暂停</div>
  686. <div class="act-btn primary">跳过</div>
  687. </div>
  688. </div>
  689. </div>
  690. <!-- 4. Stats -->
  691. <div class="screen-view" id="view-stats">
  692. <div class="stats-screen">
  693. <div class="stats-label">本周 · 统计</div>
  694. <div class="stats-hero">23<span class="unit">轮</span></div>
  695. <div class="stats-sub">比上周多出 5 轮</div>
  696. <div class="chart" id="chart">
  697. <div class="bar dim" style="height:30%"></div>
  698. <div class="bar" style="height:52%"></div>
  699. <div class="bar" style="height:70%"></div>
  700. <div class="bar" style="height:42%"></div>
  701. <div class="bar" style="height:86%"></div>
  702. <div class="bar" style="height:95%"></div>
  703. <div class="bar" style="height:64%"></div>
  704. </div>
  705. <div class="chart-x">
  706. <span>M</span><span>T</span><span>W</span><span>T</span><span>F</span><span>S</span><span>S</span>
  707. </div>
  708. </div>
  709. </div>
  710. <!-- 5. Settings -->
  711. <div class="screen-view" id="view-settings">
  712. <div class="settings-screen">
  713. <div class="title-row">设置</div>
  714. <div class="list">
  715. <div class="row">
  716. <span class="k">专注时长</span>
  717. <span class="v">25 MIN</span>
  718. </div>
  719. <div class="row">
  720. <span class="k">白噪音</span>
  721. <div class="toggle"></div>
  722. </div>
  723. <div class="row">
  724. <span class="k">提醒铃声</span>
  725. <div class="toggle off"></div>
  726. </div>
  727. <div class="row">
  728. <span class="k">主题</span>
  729. <span class="v">CLAUDE MIST</span>
  730. </div>
  731. </div>
  732. </div>
  733. </div>
  734. <!-- Tab bar (shared, appears on home/stats/settings) -->
  735. <div class="tab-bar" id="tabBar" style="display:none">
  736. <div class="tab active" data-tab="home">
  737. <div class="ico"></div>
  738. <span>HOME</span>
  739. </div>
  740. <div class="tab" data-tab="timer">
  741. <div class="ico"></div>
  742. <span>TIMER</span>
  743. </div>
  744. <div class="tab" data-tab="stats">
  745. <div class="ico"></div>
  746. <span>STATS</span>
  747. </div>
  748. <div class="tab" data-tab="settings">
  749. <div class="ico"></div>
  750. <span>SET</span>
  751. </div>
  752. </div>
  753. </div>
  754. <div class="home-indicator"></div>
  755. <!-- Tap overlay (inside screen so z-index > content) -->
  756. <div class="tap" id="tap">
  757. <div class="ring"></div>
  758. <div class="core"></div>
  759. </div>
  760. </div>
  761. </div>
  762. </div>
  763. <!-- Brand reveal -->
  764. <div class="brand-wall" id="brandWall">
  765. <div class="brand-wordmark" id="brandWord">huashu<span class="dot">·</span>design</div>
  766. <div class="brand-underline" id="brandLine"></div>
  767. <div class="brand-cn" id="brandCn">说一句话 · 拿回一个 App</div>
  768. </div>
  769. </div>
  770. <script>
  771. (() => {
  772. // ── Scale to viewport (1920×1080 canvas) ─────────────────────────
  773. function fit() {
  774. const stage = document.getElementById('stage');
  775. const s = Math.min(window.innerWidth / 1920, window.innerHeight / 1080);
  776. stage.style.transform = `translate(-50%, -50%) scale(${s})`;
  777. }
  778. fit();
  779. window.addEventListener('resize', fit);
  780. // ── Easing ───────────────────────────────────────────────────────
  781. const expoOut = t => (t <= 0 ? 0 : t >= 1 ? 1 : 1 - Math.pow(2, -10 * t));
  782. const expoIn = t => (t <= 0 ? 0 : t >= 1 ? 1 : Math.pow(2, 10 * (t - 1)));
  783. const cubicInOut = t => t < 0.5 ? 4*t*t*t : 1 - Math.pow(-2*t+2, 3)/2;
  784. const cubicOut = t => 1 - Math.pow(1 - t, 3);
  785. const clamp = (v, a, b) => Math.max(a, Math.min(b, v));
  786. const lerp = (a, b, t) => a + (b - a) * t;
  787. // Animate a value by requestAnimationFrame between timeline markers
  788. function seg(t, start, end) {
  789. return clamp((t - start) / (end - start), 0, 1);
  790. }
  791. // ── Elements ─────────────────────────────────────────────────────
  792. const el = (id) => document.getElementById(id);
  793. const terminal = el('terminal');
  794. const comment = el('comment');
  795. const typed = el('typed');
  796. const ttyCursor = el('ttyCursor');
  797. const connector = el('connector');
  798. const phoneWrap = el('phoneWrap');
  799. const views = {
  800. wire: el('view-wire'),
  801. home: el('view-home'),
  802. timer: el('view-timer'),
  803. stats: el('view-stats'),
  804. settings: el('view-settings'),
  805. };
  806. const tap = el('tap');
  807. const tabBar = el('tabBar');
  808. const fgRing = el('fgRing');
  809. const ringTime = el('ringTime');
  810. const brandWall = el('brandWall');
  811. const brandWord = el('brandWord');
  812. const brandLine = el('brandLine');
  813. const brandCn = el('brandCn');
  814. // Typing text
  815. const typeStr = 'make a pomodoro app';
  816. function setTyping(progress) {
  817. const n = Math.floor(typeStr.length * progress);
  818. typed.textContent = typeStr.slice(0, n);
  819. }
  820. // Show/hide views — hard swap (no cross-fade overlap)
  821. function showView(name) {
  822. Object.keys(views).forEach(k => {
  823. const isActive = (k === name);
  824. views[k].style.opacity = isActive ? '1' : '0';
  825. views[k].style.visibility = isActive ? 'visible' : 'hidden';
  826. views[k].style.transform = isActive ? 'translateY(0)' : 'translateY(0)';
  827. views[k].style.transition = isActive ? 'opacity 0.22s ease-out' : 'none';
  828. });
  829. }
  830. // Active tab
  831. function setActiveTab(name) {
  832. document.querySelectorAll('.tab-bar .tab').forEach(t => {
  833. t.classList.toggle('active', t.dataset.tab === name);
  834. });
  835. }
  836. // Play tap at screen coords (relative to .screen: 416×876)
  837. function playTap(x, y) {
  838. tap.style.left = (x - 32) + 'px';
  839. tap.style.top = (y - 32) + 'px';
  840. tap.style.opacity = '1';
  841. // restart keyframe animation
  842. const ring = tap.querySelector('.ring');
  843. ring.style.animation = 'none';
  844. ring.offsetHeight; // reflow
  845. ring.style.animation = '';
  846. // fade out
  847. setTimeout(() => { tap.style.opacity = '0'; }, 550);
  848. }
  849. // ── SFX via WebAudio ─────────────────────────────────────────────
  850. let audioCtx = null;
  851. function ac() {
  852. if (!audioCtx) {
  853. try { audioCtx = new (window.AudioContext || window.webkitAudioContext)(); } catch(e){}
  854. }
  855. return audioCtx;
  856. }
  857. function sfxClick(vol = 0.16) {
  858. const c = ac(); if (!c) return;
  859. const o = c.createOscillator();
  860. const g = c.createGain();
  861. o.type = 'square';
  862. o.frequency.setValueAtTime(1200, c.currentTime);
  863. o.frequency.exponentialRampToValueAtTime(500, c.currentTime + 0.04);
  864. g.gain.setValueAtTime(vol, c.currentTime);
  865. g.gain.exponentialRampToValueAtTime(0.001, c.currentTime + 0.05);
  866. o.connect(g); g.connect(c.destination);
  867. o.start(); o.stop(c.currentTime + 0.06);
  868. }
  869. function sfxEnter() {
  870. const c = ac(); if (!c) return;
  871. const o = c.createOscillator();
  872. const g = c.createGain();
  873. o.type = 'sine';
  874. o.frequency.setValueAtTime(180, c.currentTime);
  875. o.frequency.exponentialRampToValueAtTime(440, c.currentTime + 0.25);
  876. g.gain.setValueAtTime(0.22, c.currentTime);
  877. g.gain.exponentialRampToValueAtTime(0.001, c.currentTime + 0.3);
  878. o.connect(g); g.connect(c.destination);
  879. o.start(); o.stop(c.currentTime + 0.32);
  880. }
  881. function sfxChime() {
  882. const c = ac(); if (!c) return;
  883. [523.25, 783.99].forEach((f, i) => {
  884. const o = c.createOscillator();
  885. const g = c.createGain();
  886. o.type = 'sine';
  887. o.frequency.value = f;
  888. g.gain.setValueAtTime(0, c.currentTime + i * 0.08);
  889. g.gain.linearRampToValueAtTime(0.18, c.currentTime + i * 0.08 + 0.04);
  890. g.gain.exponentialRampToValueAtTime(0.001, c.currentTime + i * 0.08 + 1.2);
  891. o.connect(g); g.connect(c.destination);
  892. o.start(c.currentTime + i * 0.08);
  893. o.stop(c.currentTime + i * 0.08 + 1.25);
  894. });
  895. }
  896. // ── Timeline ─────────────────────────────────────────────────────
  897. const DURATION = 10.0;
  898. const sfxFired = new Set();
  899. function fireOnce(id, fn) {
  900. if (sfxFired.has(id)) return;
  901. sfxFired.add(id);
  902. fn();
  903. }
  904. // Screen switch schedule (within Beat 2, 2.0s → 8.0s)
  905. // Tap coords are relative to the 416×876 .screen
  906. const schedule = [
  907. { t: 2.0, view: 'wire', tabIco: null, tap: null },
  908. { t: 3.1, view: 'home', tabIco: 'home', tap: null }, // home materializes (no tap — it's the fill moment)
  909. { t: 4.4, view: 'timer', tabIco: 'timer', tap: {x: 208, y: 624} }, // tap "开始专注" CTA
  910. { t: 6.3, view: 'stats', tabIco: 'stats', tap: {x: 300, y: 810} }, // tap stats tab
  911. { t: 7.5, view: 'settings', tabIco: 'settings', tap: {x: 370, y: 810} }, // tap settings tab
  912. ];
  913. let scheduleIdx = 0;
  914. let startTime = null;
  915. let raf = null;
  916. function tick(now) {
  917. if (!startTime) startTime = now;
  918. const t = (now - startTime) / 1000;
  919. // ── Beat 1: 0-2s ─────────────────────────────────────────
  920. // Terminal fade in (0 → 0.4s)
  921. {
  922. const k = expoOut(seg(t, 0.0, 0.4));
  923. terminal.style.opacity = k;
  924. terminal.style.transform = `translateY(-50%) translateX(${lerp(-30, 0, k)}px)`;
  925. }
  926. // iPhone fade in (0.2 → 0.9s)
  927. {
  928. const k = expoOut(seg(t, 0.2, 0.9));
  929. phoneWrap.style.opacity = k;
  930. phoneWrap.style.transform = `translateY(-50%) translateX(${lerp(60, 0, k)}px) scale(${lerp(0.96, 1, k)})`;
  931. if (t > 0.25) fireOnce('enter', sfxEnter);
  932. }
  933. // Connector fade
  934. {
  935. const k = expoOut(seg(t, 0.7, 1.2));
  936. connector.style.opacity = k;
  937. connector.style.transform = `translateY(-50%) scaleX(${k})`;
  938. }
  939. // Comment
  940. {
  941. const k = expoOut(seg(t, 0.8, 1.2));
  942. comment.style.opacity = k * 0.82;
  943. }
  944. // Typing (0.6 → 1.9s)
  945. {
  946. const k = cubicInOut(seg(t, 0.6, 1.9));
  947. setTyping(k);
  948. // key click SFX at certain progress points
  949. if (t > 0.8 && t < 1.85) {
  950. const charsShown = Math.floor(typeStr.length * k);
  951. const key = 'typ' + charsShown;
  952. if (!sfxFired.has(key) && charsShown > 0 && charsShown % 3 === 0) {
  953. fireOnce(key, () => sfxClick(0.08));
  954. }
  955. }
  956. }
  957. // Hide cursor when typing done
  958. ttyCursor.style.opacity = t > 1.85 ? '0' : '1';
  959. // ── Beat 2: 2-8s ─────────────────────────────────────────
  960. // Execute scheduled screen transitions
  961. while (scheduleIdx < schedule.length && t >= schedule[scheduleIdx].t) {
  962. const s = schedule[scheduleIdx];
  963. showView(s.view);
  964. // status bar color: dark-text on light screens, but wire also light, keep dark
  965. if (s.view === 'wire') {
  966. tabBar.style.display = 'none';
  967. } else {
  968. tabBar.style.display = 'flex';
  969. setActiveTab(s.tabIco);
  970. }
  971. if (s.tap) {
  972. // small delay so tap appears at moment of switch
  973. setTimeout(() => playTap(s.tap.x, s.tap.y), 120);
  974. if (s.view !== 'wire') fireOnce('click_' + s.view, () => sfxClick(0.18));
  975. }
  976. scheduleIdx++;
  977. }
  978. // Timer ring animation: once timer appears (4.4s), animate ring from empty → 42% filled
  979. if (t >= 4.4 && t < 6.3) {
  980. const ringT = clamp((t - 4.5) / 1.2, 0, 1);
  981. const fillPct = expoOut(ringT) * 0.42;
  982. const offset = 880 * (1 - fillPct);
  983. // Set as both style AND attr so neither overrides the other
  984. fgRing.style.strokeDashoffset = offset;
  985. fgRing.setAttribute('stroke-dashoffset', offset);
  986. // Count down visually: 24:12 → 14:03
  987. const mins = Math.floor(lerp(24, 14, expoOut(ringT)));
  988. const secs = Math.floor(lerp(12, 3, expoOut(ringT)));
  989. ringTime.textContent = String(mins).padStart(2,'0') + ':' + String(secs).padStart(2,'0');
  990. }
  991. // ── Beat 3: 8-10s ────────────────────────────────────────
  992. // Phone + terminal fade out fast (7.5 → 7.9) so wall doesn't guillotine
  993. if (t >= 7.5) {
  994. const k = cubicOut(seg(t, 7.5, 7.9));
  995. phoneWrap.style.opacity = String(1 - k);
  996. phoneWrap.style.transform = `translateY(-50%) scale(${lerp(1, 0.94, k)})`;
  997. terminal.style.opacity = String(1 - k);
  998. terminal.style.transform = `translateY(-50%) scale(${lerp(1, 0.96, k)})`;
  999. connector.style.opacity = String(1 - k);
  1000. }
  1001. // Brand wall slides up (7.9 → 8.6) — starts AFTER phone is gone
  1002. {
  1003. const k = expoOut(seg(t, 7.9, 8.6));
  1004. brandWall.style.transform = `translateY(${lerp(100, 0, k)}%)`;
  1005. brandWall.style.opacity = k > 0 ? '1' : '0';
  1006. const watermark = document.querySelector('.watermark');
  1007. if (k > 0.6) watermark.classList.add('on-light');
  1008. else watermark.classList.remove('on-light');
  1009. }
  1010. // Wordmark appears
  1011. {
  1012. const k = expoOut(seg(t, 8.5, 9.2));
  1013. brandWord.style.opacity = k;
  1014. brandWord.style.transform = `scale(${lerp(0.92, 1, k)})`;
  1015. if (t > 8.55) fireOnce('chime', sfxChime);
  1016. }
  1017. // Underline
  1018. {
  1019. const k = expoOut(seg(t, 9.0, 9.6));
  1020. brandLine.style.width = (280 * k) + 'px';
  1021. }
  1022. // CN label
  1023. {
  1024. const k = cubicOut(seg(t, 9.3, 9.9));
  1025. brandCn.style.opacity = k * 0.9;
  1026. }
  1027. if (t < DURATION) {
  1028. raf = requestAnimationFrame(tick);
  1029. } else {
  1030. // Hold final frame
  1031. if (!window.__recording) {
  1032. // loop for preview
  1033. setTimeout(() => {
  1034. startTime = null;
  1035. scheduleIdx = 0;
  1036. sfxFired.clear();
  1037. // Reset views
  1038. showView('wire');
  1039. tabBar.style.display = 'none';
  1040. fgRing.style.strokeDashoffset = 880;
  1041. fgRing.setAttribute('stroke-dashoffset', 880);
  1042. ringTime.textContent = '24:12';
  1043. // Reset brand
  1044. brandWall.style.transform = 'translateY(100%)';
  1045. brandWall.style.opacity = '0';
  1046. brandWord.style.opacity = '0';
  1047. brandWord.style.transform = 'scale(0.92)';
  1048. brandLine.style.width = '0';
  1049. brandCn.style.opacity = '0';
  1050. // Reset terminal typing
  1051. typed.textContent = '';
  1052. ttyCursor.style.opacity = '1';
  1053. comment.style.opacity = '0';
  1054. terminal.style.opacity = '0';
  1055. phoneWrap.style.opacity = '0';
  1056. connector.style.opacity = '0';
  1057. document.querySelector('.watermark').classList.remove('on-light');
  1058. raf = requestAnimationFrame(tick);
  1059. }, 600);
  1060. }
  1061. }
  1062. }
  1063. // seek(0) helper for render-video.js
  1064. window.__seek = function(s) {
  1065. startTime = performance.now() - s * 1000;
  1066. };
  1067. // Initial state
  1068. showView('wire');
  1069. tabBar.style.display = 'none';
  1070. // Wait for fonts, then start animation
  1071. (document.fonts ? document.fonts.ready : Promise.resolve()).then(() => {
  1072. requestAnimationFrame((now) => {
  1073. startTime = now;
  1074. window.__ready = true;
  1075. raf = requestAnimationFrame(tick);
  1076. });
  1077. });
  1078. })();
  1079. </script>
  1080. </body>
  1081. </html>