Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added docs/screens/redesign-0-front.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/screens/redesign-1-consent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/screens/redesign-3-write.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/screens/redesign-4-sealed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/screens/redesign-5-envelope.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/screens/redesign-phone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 13 additions & 13 deletions src/reader/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,27 @@
<section class="view view-empty" aria-labelledby="empty-title">
<p id="empty-text" class="front-note" hidden></p>
<header class="front-head">
<p class="smallcaps">Letters sealed with a heartbeat</p>
<h1 id="empty-title" class="wordmark">Heartwritten</h1>
<p class="brand"><span class="brand-dot" aria-hidden="true"></span>Heartwritten</p>
<h1 id="empty-title" class="wordmark">Letters that carry the heartbeat they were written with.</h1>
<p class="front-lede">Write a letter while your camera reads your heartbeat. Whoever you send it to watches it being written again, at your pace, every word in the ink your heart gave it.</p>
</header>
<figure class="specimen">
<p id="specimen-text" class="specimen-text">So, slowly: they called this morning. I got it. I actually got it! You were the first person I wanted to tell.</p>
<div id="specimen-line" class="specimen-line" aria-hidden="true"></div>
<figcaption><span class="smallcaps">From a sample letter</span><span class="specimen-key">steady in navy, racing in red</span></figcaption>
<figcaption><span class="cap">From a sample letter</span><span class="specimen-key"><i class="key-dot calm"></i>steady <i class="key-dot fast"></i>racing</span></figcaption>
</figure>
<p class="front-actions"><a class="ink-button" href="sample">Read a sample letter</a></p>
<ol class="front-steps">
<li><span class="smallcaps">Write</span> in the Heartwritten app on a Mac. The Presage SmartSpectra SDK reads your pulse, breathing and smiles from the camera, on your computer.</li>
<li><span class="smallcaps">Seal</span> it. The letter keeps a few numbers a second, never video, and lives only inside its link or file.</li>
<li><span class="smallcaps">Send</span> the link. It opens here, sending nothing to any server.</li>
<li><span class="step-n">1</span><div><b>Write</b> in the Heartwritten app on a Mac. The Presage SmartSpectra SDK reads your pulse, breathing and smiles from the camera, on your computer.</div></li>
<li><span class="step-n">2</span><div><b>Seal</b> it. The letter keeps a few numbers a second, never video, and lives only inside its link or file.</div></li>
<li><span class="step-n">3</span><div><b>Send</b> the link. It opens here, sending nothing to any server.</div></li>
</ol>
<p class="fine">The writer is a Mac app. Heart rate and breathing are camera estimates, for feeling, not medicine.</p>
</section>

<section class="view view-envelope" aria-labelledby="envelope-to">
<header class="address">
<p class="smallcaps" id="envelope-day"></p>
<p class="cap" id="envelope-day"></p>
<h1 id="envelope-to" class="to"></h1>
<p id="envelope-from" class="from"></p>
</header>
Expand All @@ -48,7 +48,7 @@ <h1 id="envelope-to" class="to"></h1>
<span id="seal" class="seal"></span>
</button>
</div>
<p class="hint smallcaps">Break the seal to read</p>
<div class="open-row"><button id="open-letter" class="btn primary" type="button">Open the letter</button><p class="hint">or press the seal</p></div>
<p id="sim-badge" class="sample-note" hidden>A sample letter. The heartbeat in it was simulated.</p>
<p class="fine">This letter lives only in its link. Opening it sends nothing anywhere.</p>
</section>
Expand All @@ -58,27 +58,27 @@ <h1 id="envelope-to" class="to"></h1>
<aside class="margin" aria-label="Their heartbeat">
<div class="pulse">
<span id="heart" class="heart" aria-hidden="true"></span>
<p class="bpm"><span id="heart-bpm">·</span><small>a minute</small></p>
<p class="bpm"><span id="heart-bpm">·</span><small>beats a minute</small></p>
</div>
<ul id="pauses" class="pauses"></ul>
<p id="took-back" class="took-back"></p>
</aside>
<article id="paper" class="paper">
<header class="letterhead">
<p id="replay-sim" class="sample-note" hidden>Sample · simulated heartbeat</p>
<p class="smallcaps" id="letter-day"></p>
<p class="cap" id="letter-day"></p>
</header>
<div id="body-text" class="body-text"></div>
<p id="signature" class="signature"></p>
<figure class="heartline-wrap">
<div id="heartline" class="heartline-slot"></div>
<figcaption><span id="heartline-who" class="smallcaps"></span><span id="heartline-range" class="range"></span></figcaption>
<figcaption><span id="heartline-who" class="cap"></span><span id="heartline-range" class="range"></span></figcaption>
</figure>
<section id="summary" class="postscript" hidden aria-labelledby="summary-title">
<h2 id="summary-title" class="smallcaps">While this was written</h2>
<h2 id="summary-title" class="cap">While this was written</h2>
<div id="summary-body"></div>
<div class="scale" aria-hidden="true"><span>steadier</span><i></i><span>quicker</span></div>
<p class="links"><button id="replay">Watch it again</button><button id="copy-text">Copy the words</button></p>
<p class="links"><button id="replay" class="btn primary">Watch it again</button><button id="copy-text" class="btn secondary">Copy the words</button></p>
<p class="fine">Heart rate and breathing are camera estimates, for feeling, not medicine. Written with Heartwritten on the Presage SmartSpectra SDK.</p>
</section>
</article>
Expand Down
106 changes: 63 additions & 43 deletions src/reader/reader.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
--stamp: #a8381e;
--glow: rgba(214, 158, 52, 0.2);
--serif: "Iowan Old Style", Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
--sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", sans-serif;
--line: rgba(60, 45, 20, 0.16);
--card: rgba(255, 252, 245, 0.72);
--wax: #9e2b25;
--tooth: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .33 0 0 0 0 .28 0 0 0 0 .2 0 0 0 .05 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
color-scheme: light dark;
}
Expand All @@ -22,6 +26,8 @@
--paper-shade: #e4dccc;
--on-desk: #ebe3d4;
--on-desk-muted: #9b9282;
--line: rgba(236, 228, 213, 0.16);
--card: rgba(255, 250, 240, 0.05);
}
}

Expand All @@ -40,13 +46,21 @@ main { max-width: 900px; margin: 0 auto; padding: 56px 24px 72px; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
button:focus-visible { outline: 1.5px solid currentColor; outline-offset: 4px; }

.smallcaps {
font-variant-caps: all-small-caps;
letter-spacing: 0.09em;
font-size: 17px;
margin: 0;
.cap { font: 500 13px/1.3 var(--sans); margin: 0; }
.brand { display: flex; align-items: center; gap: 9px; font: 600 14px var(--sans); margin: 0 0 20px; color: var(--on-desk); }
.brand-dot { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #c9473d, var(--wax) 60%, #6f1c18); box-shadow: 0 1px 2px rgba(80, 10, 10, 0.3); }
.btn {
display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
font: 600 15px/1 var(--sans); padding: 13px 22px; border-radius: 999px;
transition: background-color 0.15s, border-color 0.15s, transform 0.08s;
}
.fine { color: var(--on-desk-muted); font-size: 13px; line-height: 1.5; margin: 0; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink); color: #fbf8f1; }
.btn.primary:hover { background: #2c3552; }
.btn.secondary { border: 1px solid var(--line); background: var(--card); color: inherit; }
.btn.secondary:hover { border-color: var(--muted); }
@media (prefers-color-scheme: dark) { .view-envelope .btn.primary { background: #f3ede1; color: #1c2234; } .view-envelope .btn.primary:hover { background: #fff; } }
.fine { color: var(--on-desk-muted); font: 12.5px/1.5 var(--sans); margin: 0; }
.sample-note { margin: 0; color: var(--stamp); font-style: italic; font-size: 15px; }

.view { display: none; }
Expand All @@ -58,10 +72,10 @@ body[data-view="letter"] .view-letter { display: block; }
/* The front page: what this is, a specimen of the ink, a way in. */
.view-empty { max-width: 620px; margin: 6vh auto 0; }
.front-note { margin: 0 0 28px; color: var(--stamp); font-style: italic; }
.front-head .smallcaps { color: var(--on-desk-muted); }
.wordmark { font-weight: 400; font-style: italic; font-size: 52px; line-height: 1.05; margin: 6px 0 14px; letter-spacing: -0.015em; color: var(--on-desk); }
.front-lede { font-size: 21px; line-height: 1.5; margin: 0; color: var(--on-desk); max-width: 30em; }
.wordmark { font-weight: 400; font-style: italic; font-size: 44px; line-height: 1.1; margin: 0 0 16px; letter-spacing: -0.015em; color: var(--on-desk); }
.front-lede { font-size: 19px; line-height: 1.5; margin: 0; color: var(--on-desk); max-width: 30em; }
.specimen {
border-radius: 3px;
margin: 36px 0 0; padding: 30px 36px 22px;
background: var(--tooth), var(--paper); color: var(--ink);
box-shadow: 0 0 0 1px rgba(60, 45, 20, 0.07), 0 24px 44px -30px rgba(40, 28, 10, 0.55);
Expand All @@ -70,33 +84,37 @@ body[data-view="letter"] .view-letter { display: block; }
.specimen-text .smiled { background: linear-gradient(transparent 48%, var(--glow) 48%, var(--glow) 94%, transparent 94%); border-radius: 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.specimen-line { height: 40px; margin-top: 18px; }
.specimen-line .heartline { display: block; width: 100%; height: 40px; overflow: visible; }
.specimen figcaption { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 8px; color: var(--muted); }
.specimen figcaption .smallcaps { font-size: 14px; }
.specimen-key { font-size: 14px; font-style: italic; }
.specimen figcaption { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 10px; color: var(--muted); font: 12.5px var(--sans); }
.specimen-key { display: inline-flex; align-items: center; gap: 6px; }
.key-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.key-dot.calm { background: rgb(32, 72, 150); }
.key-dot.fast { background: rgb(184, 52, 28); margin-left: 6px; }
.front-actions { margin: 30px 0 0; }
.ink-button {
display: inline-block; background: var(--ink); color: var(--paper); text-decoration: none;
font-variant-caps: all-small-caps; letter-spacing: 0.1em; font-size: 18px;
padding: 11px 22px 12px; border-radius: 2px;
display: inline-block; background: var(--ink); color: #fbf8f1; text-decoration: none;
font: 600 15px/1 var(--sans); padding: 14px 24px; border-radius: 999px;
}
.ink-button:hover { background: #2b3450; }
.ink-button:focus-visible { outline: 1.5px solid var(--on-desk); outline-offset: 4px; }
@media (prefers-color-scheme: dark) { .ink-button { background: var(--paper); color: var(--ink); } .ink-button:hover { background: #fff; } }
.front-steps { list-style: none; padding: 26px 0 0; margin: 36px 0 0; border-top: 1px solid var(--hair); color: var(--on-desk); }
.front-steps { list-style: none; padding: 26px 0 0; margin: 36px 0 0; border-top: 1px solid var(--line); color: var(--on-desk); font-family: var(--sans); }
@media (prefers-color-scheme: dark) { .front-steps { border-top-color: rgba(235, 227, 212, 0.16); } }
.front-steps li { display: grid; grid-template-columns: 72px 1fr; gap: 16px; margin: 0 0 14px; font-size: 17px; line-height: 1.55; }
.front-steps .smallcaps { color: var(--on-desk-muted); padding-top: 0.15em; font-size: 16px; }
.front-steps li { display: flex; gap: 12px; margin: 0 0 14px; font-size: 14.5px; line-height: 1.55; color: var(--on-desk-muted); }
.front-steps b { color: var(--on-desk); font-weight: 600; }
.step-n { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font: 600 12px var(--sans); color: var(--on-desk-muted); margin-top: 1px; }
.view-empty .fine { margin-top: 22px; }

/* The envelope */
.view-envelope { max-width: 600px; margin: 4vh auto 0; }
.address { margin: 0 0 28px; }
.address .smallcaps { color: var(--on-desk-muted); }
.address .cap { color: var(--on-desk-muted); }
.to { font-weight: 400; font-style: italic; font-size: 46px; line-height: 1.1; margin: 6px 0 4px; letter-spacing: -0.01em; }
.from { margin: 0; color: var(--on-desk-muted); }
.from { margin: 0; color: var(--on-desk-muted); font-size: 17px; }

.envelope {
position: relative;
border-radius: 4px;
overflow: hidden;
aspect-ratio: 1.6;
background: var(--tooth), var(--paper);
box-shadow: 0 0 0 1px rgba(60, 45, 20, 0.07), 0 24px 44px -30px rgba(40, 28, 10, 0.55);
Expand All @@ -116,8 +134,10 @@ body[data-view="letter"] .view-letter { display: block; }
filter: drop-shadow(0 6px 6px rgba(60, 10, 10, 0.18));
}
.seal svg { width: 100%; height: 100%; display: block; }
.hint { margin: 22px 0 0; color: var(--on-desk-muted); text-align: center; }
.view-envelope .sample-note { text-align: center; margin-top: 6px; }
.open-row { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 26px 0 0; }
.hint { margin: 0; color: var(--on-desk-muted); text-align: center; font: 13px var(--sans); }
body[data-view="breaking"] .open-row { opacity: 0; transition: opacity 0.3s; }
.view-envelope .sample-note { text-align: center; margin-top: 14px; }
.view-envelope .fine { text-align: center; margin-top: 40px; }

@keyframes heartbeat {
Expand Down Expand Up @@ -152,15 +172,15 @@ body[data-view="breaking"] .view-envelope { animation: away 0.9s ease forwards;
@keyframes thump { 0% { transform: scale(1); } 20% { transform: scale(1.7); } 45% { transform: scale(0.9); } 70% { transform: scale(1.25); } 100% { transform: scale(1); } }
.bpm { margin: 6px 0 0; line-height: 1; }
.bpm span { display: block; font-size: 34px; color: var(--on-desk); letter-spacing: -0.01em; }
.bpm small { font-variant-caps: all-small-caps; letter-spacing: 0.09em; font-size: 14px; }
.bpm small { display: block; margin-top: 6px; font: 12px/1.3 var(--sans); }
.pauses { list-style: none; padding: 0; margin: 0; }
.pauses li {
position: absolute; right: 0; max-width: 112px; text-align: right;
font-style: italic; font-size: 14px; line-height: 1.35;
font: 12.5px/1.35 var(--sans);
animation: fadein 1s ease;
}
.pauses li::after { content: ""; display: inline-block; width: 14px; height: 1px; background: currentColor; opacity: 0.5; vertical-align: 0.3em; margin-left: 6px; }
.took-back { position: absolute; bottom: 0; right: 0; margin: 0; text-align: right; font-style: italic; font-size: 14px; line-height: 1.35; max-width: 112px; }
.took-back { position: absolute; bottom: 0; right: 0; margin: 0; text-align: right; font: 12.5px var(--sans); line-height: 1.35; max-width: 112px; }
@keyframes fadein { from { opacity: 0; } }

.paper {
Expand All @@ -169,6 +189,7 @@ body[data-view="breaking"] .view-envelope { animation: away 0.9s ease forwards;
background: var(--tooth), var(--paper);
color: var(--ink);
padding: 56px 72px 56px;
border-radius: 3px;
min-height: 72vh;
box-shadow: 0 0 0 1px rgba(60, 45, 20, 0.07), 0 30px 50px -36px rgba(40, 28, 10, 0.6);
transform: translateY(calc(var(--breath) * -2px));
Expand All @@ -177,7 +198,7 @@ body[data-view="breaking"] .view-envelope { animation: away 0.9s ease forwards;
}
@keyframes unfold { from { transform: translateY(16px); opacity: 0; } }
.letterhead { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 40px; color: var(--muted); }
.letterhead .smallcaps { margin-left: auto; }
.letterhead .cap { margin-left: auto; }
.body-text {
font-size: 21px; line-height: 1.62;
white-space: pre-wrap; overflow-wrap: anywhere;
Expand All @@ -201,32 +222,31 @@ body[data-view="breaking"] .view-envelope { animation: away 0.9s ease forwards;
.heartline-wrap { margin: 18px 0 0; }
.heartline-slot { height: 52px; }
.heartline { display: block; width: 100%; height: 52px; overflow: visible; }
.heartline-wrap figcaption { display: flex; justify-content: space-between; color: var(--muted); margin-top: 6px; }
.heartline-wrap .smallcaps { font-size: 14px; }
.range { font-size: 14px; font-style: italic; }
.heartline-wrap figcaption { display: flex; justify-content: space-between; color: var(--muted); margin-top: 6px; font: 12.5px var(--sans); }
.range { font-variant-numeric: tabular-nums; }

/* Postscript */
.postscript { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--hair); animation: fadein 1s ease; }
.postscript h2 { color: var(--muted); font-weight: 400; margin-bottom: 14px; }
.postscript h2 { color: var(--muted); margin-bottom: 14px; }
.postscript p { margin: 0 0 8px; font-size: 18px; }
.postscript .lead { color: var(--muted); }
.postscript q { font-style: italic; }
.postscript q::before { content: "“"; } .postscript q::after { content: "”"; }
.postscript .bpm-tag { color: var(--muted); font-size: 15px; margin-left: 6px; white-space: nowrap; }
.scale { display: flex; align-items: center; gap: 10px; margin: 20px 0 22px; color: var(--muted); font-size: 14px; font-style: italic; }
.postscript .bpm-tag { color: var(--muted); font: 12.5px var(--sans); margin-left: 6px; white-space: nowrap; }
.scale { display: flex; align-items: center; gap: 10px; margin: 20px 0 24px; color: var(--muted); font: 12.5px var(--sans); }
.scale i { flex: 0 1 200px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, rgb(32, 72, 150), rgb(28, 34, 52) 45%, rgb(112, 28, 48) 72%, rgb(184, 52, 28)); }
.links { display: flex; gap: 28px; }
.links button, .controls button {
font-variant-caps: all-small-caps; letter-spacing: 0.09em; font-size: 17px;
text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px;
text-decoration-color: transparent; transition: text-decoration-color 0.2s;
.links { display: flex; gap: 10px; flex-wrap: wrap; }
.controls button {
font: 500 13.5px/1 var(--sans); padding: 9px 14px; border-radius: 999px; color: var(--on-desk-muted);
transition: background-color 0.15s, color 0.15s;
}
.links button { color: var(--ink); }
.links button:hover, .controls button:hover, .controls button[aria-pressed="true"] { text-decoration-color: currentColor; }
.postscript .fine { color: var(--muted); margin-top: 22px; font-size: 13px; }
.controls button:hover { color: var(--on-desk); }
.controls button[aria-pressed="true"] { background: var(--ink); color: #fbf8f1; }
@media (prefers-color-scheme: dark) { .controls button[aria-pressed="true"] { background: #f3ede1; color: #1c2234; } }
.controls button:focus-visible, .btn:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.postscript .fine { color: var(--muted); margin-top: 22px; font-size: 12.5px; }

.controls { display: flex; flex-wrap: wrap; gap: 8px 28px; max-width: 680px; margin: 22px auto 0; padding-left: 140px; color: var(--on-desk-muted); }
.controls button[aria-pressed="true"] { color: var(--on-desk); }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; width: fit-content; margin: 22px auto 0; padding: 4px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); position: sticky; bottom: 16px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.finished .controls { display: none; }

/* Phones: the screen becomes the sheet. */
Expand All @@ -251,7 +271,7 @@ body[data-view="breaking"] .view-envelope { animation: away 0.9s ease forwards;
.paper { padding: 28px 20px 40px; min-height: 0; box-shadow: none; animation: none; transform: none; }
.letterhead { margin-bottom: 26px; }
.body-text { font-size: 19px; }
.controls { padding: 0 20px; margin-top: 18px; gap: 6px 22px; }
.controls { margin: 18px auto 0; }
}
@media (prefers-reduced-motion: reduce) {
.seal, .heart.beat, .paper, .body-text .wet { animation: none !important; }
Expand Down
Loading
Loading