Voxley / website · voxley.si / tools / social-card.html
| 1 | <!doctype html> |
| 2 | <!-- Source for /social-card.png (1200 × 630). Render with tools/render-social-card.js. Not deployed. --> |
| 3 | <html lang="en"> |
| 4 | <head> |
| 5 | <meta charset="utf-8"> |
| 6 | <style> |
| 7 | @font-face { font-family: "Bricolage Grotesque"; src: url("../assets/fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; } |
| 8 | @font-face { font-family: "Geist"; src: url("../assets/fonts/geist-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; } |
| 9 | @font-face { font-family: "Geist Mono"; src: url("../assets/fonts/geist-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; } |
| 10 | * { box-sizing: border-box; margin: 0; } |
| 11 | body { width: 1200px; height: 630px; overflow: hidden; background: #0f1218; color: #f6f3eb; font-family: "Geist", sans-serif; -webkit-font-smoothing: antialiased; } |
| 12 | .card { position: relative; width: 1200px; height: 630px; display: grid; grid-template-columns: 540px 1fr; align-items: center; gap: 44px; padding: 0 64px 0 72px; |
| 13 | background: |
| 14 | radial-gradient(760px 520px at 86% 50%, rgba(255, 179, 71, .2), transparent 70%), |
| 15 | repeating-linear-gradient(to right, transparent 0 15px, rgba(255, 201, 119, .035) 15px 16px), |
| 16 | #0f1218; } |
| 17 | .brand { display: flex; align-items: center; gap: 14px; font: 700 36px/1 "Bricolage Grotesque"; letter-spacing: -.035em; } |
| 18 | .brand img { width: 56px; height: 56px; display: block; } |
| 19 | h1 { margin-top: 34px; font: 700 90px/1 "Bricolage Grotesque"; white-space: nowrap; letter-spacing: -.045em; } |
| 20 | h1 em { font-style: normal; color: #ffc977; } |
| 21 | .copy p { margin-top: 26px; font-size: 27px; line-height: 1.4; color: #c6cbd5; } |
| 22 | .pill { display: inline-block; margin-top: 30px; padding: 7px 16px; border: 1px solid #3d4658; border-radius: 999px; background: rgba(25, 30, 41, .7); font: 500 15px/1.4 "Geist Mono"; letter-spacing: .1em; color: #ffc977; } |
| 23 | |
| 24 | /* The app at work: a draft receiving text, and the recorder card in front of it. */ |
| 25 | .scene { position: relative; height: 470px; font-family: -apple-system, "Geist", sans-serif; } |
| 26 | .win { position: absolute; left: 0; right: 0; top: 0; height: 330px; border: 1px solid #3b3b3b; border-radius: 14px; overflow: hidden; background: #1e1e1e; box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .8); } |
| 27 | .win-title { display: flex; align-items: center; gap: 9px; height: 42px; padding: 0 15px; background: #2a2a2a; color: #b4b4b4; font-size: 16px; font-weight: 600; } |
| 28 | .lights { display: flex; gap: 8px; margin-right: 8px; } |
| 29 | .lights i { width: 13px; height: 13px; border-radius: 50%; background: #ff5f57; } |
| 30 | .lights i:nth-child(2) { background: #febc2e; } |
| 31 | .lights i:nth-child(3) { background: #28c840; } |
| 32 | .field { display: flex; gap: 9px; align-items: center; padding: 10px 18px; border-bottom: 1px solid #333; font-size: 16px; color: #ececec; } |
| 33 | .field span { color: #9a9a9a; } |
| 34 | .field b { padding: 1px 11px; border-radius: 999px; background: #2f3d5e; font-weight: 500; } |
| 35 | .body { padding: 18px; font-size: 18px; line-height: 1.55; color: #ececec; } |
| 36 | .body i { display: inline-block; width: 2px; height: 1.1em; margin-left: 2px; vertical-align: -.18em; background: #4aa3ff; } |
| 37 | .recorder { position: absolute; left: 22px; right: 22px; bottom: 0; padding: 16px 20px 14px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 24px; background: rgba(31, 35, 43, .96); box-shadow: 0 26px 60px -12px rgba(0, 0, 0, .85); } |
| 38 | .recorder p { font-size: 19px; line-height: 1.38; font-weight: 500; color: #fff; text-align: left; } |
| 39 | .row { display: flex; align-items: center; gap: 26px; height: 84px; margin-top: 8px; } |
| 40 | .row > svg:first-child, .stop { flex: none; } |
| 41 | #wave { flex: 1 1 0; min-width: 0; height: 84px; mask-image: linear-gradient(to right, transparent, #000 50%, transparent); -webkit-mask-image: linear-gradient(to right, transparent, #000 50%, transparent); } |
| 42 | .stop { display: grid; place-items: center; width: 46px; height: 32px; border-radius: 8px; background: rgba(255, 255, 255, .16); } |
| 43 | .stop i { width: 12px; height: 12px; border-radius: 3px; background: #fff; } |
| 44 | </style> |
| 45 | <!-- no-orphans --><link rel="stylesheet" href="/no-orphans.css"><script src="/no-orphans.js" defer></script><!-- /no-orphans --></head> |
| 46 | <body> |
| 47 | <div class="card"> |
| 48 | <div class="copy"> |
| 49 | <div class="brand"><img src="../assets/icon.png" alt="">Voxley</div> |
| 50 | <h1>Speak where<br><em>you type.</em></h1> |
| 51 | <p>Private dictation for your Mac.<br>Free and open source.</p> |
| 52 | <div class="pill">VOXLEY.SI</div> |
| 53 | </div> |
| 54 | <div class="scene"> |
| 55 | <div class="win"> |
| 56 | <div class="win-title"><span class="lights"><i></i><i></i><i></i></span>New Message</div> |
| 57 | <div class="field"><span>To:</span><b>Dana</b></div> |
| 58 | <div class="field"><span>Subject:</span>Launch timing</div> |
| 59 | <div class="body">I just got out of the meeting with Dana, and the launch is moving to Thursday.<i></i></div> |
| 60 | </div> |
| 61 | <div class="recorder"> |
| 62 | <p>We need the release notes by Wednesday noon and I’ll send the final build tonight</p> |
| 63 | <div class="row"> |
| 64 | <svg width="22" height="22" viewBox="0 0 16 16" fill="#fff"><rect x="5.5" y="1.5" width="5" height="8" rx="2.5"/><path d="M3.5 7.5a4.5 4.5 0 0 0 9 0M8 12v2.5" fill="none" stroke="#fff" stroke-width="1.4" stroke-linecap="round"/></svg> |
| 65 | <svg id="wave" viewBox="0 0 1200 130" preserveAspectRatio="none" fill="none"></svg> |
| 66 | <span class="stop"><i></i></span> |
| 67 | </div> |
| 68 | </div> |
| 69 | </div> |
| 70 | </div> |
| 71 | <script> |
| 72 | // The recorder's trace, drawn as the app draws it: a smoothed envelope with a faint fill and bright edges. |
| 73 | var seed = 7; |
| 74 | function random() { seed = (seed * 16807) % 2147483647; return seed / 2147483647; } |
| 75 | function height(a) { var audible = Math.min(1, Math.max(0, a - .0025)); return 1 - Math.exp(-2.52 * Math.pow(audible, .58)); } |
| 76 | var N = 96, raw = []; |
| 77 | for (var i = 0; i < N; i++) { |
| 78 | var t = i * .014 * 1.6; |
| 79 | var syllable = Math.pow(Math.abs(Math.sin(t * 11 + 1) * Math.sin(t * 4.3 + 2)), .8); |
| 80 | var a = syllable * .42 + .004; |
| 81 | raw.push({ low: -a * (.4 + .6 * random()), high: a * (.4 + .6 * random()) }); |
| 82 | } |
| 83 | var W = [1, 2, 3, 2, 1]; |
| 84 | function smooth(i) { var lo = 0, hi = 0, s = 0; for (var o = -2; o <= 2; o++) if (raw[i + o]) { lo += raw[i + o].low * W[o + 2]; hi += raw[i + o].high * W[o + 2]; s += W[o + 2]; } return { low: lo / s, high: hi / s }; } |
| 85 | var c = 65, most = 60, up = [], down = []; |
| 86 | for (var i = 0; i < N; i++) { var p = smooth(i), x = i * 1200 / (N - 1); up.push([x, c - height(p.high) * most]); down.unshift([x, c + height(-p.low) * most]); } |
| 87 | function curve(points) { var d = ''; for (var i = 0; i < points.length - 1; i++) d += 'Q' + points[i][0].toFixed(1) + ' ' + points[i][1].toFixed(1) + ' ' + ((points[i][0] + points[i + 1][0]) / 2).toFixed(1) + ' ' + ((points[i][1] + points[i + 1][1]) / 2).toFixed(1); var l = points[points.length - 1]; return d + 'L' + l[0].toFixed(1) + ' ' + l[1].toFixed(1); } |
| 88 | var upper = 'M' + up[0][0] + ' ' + up[0][1].toFixed(1) + curve(up), bottom = 'M' + down[0][0] + ' ' + down[0][1].toFixed(1) + curve(down); |
| 89 | document.getElementById('wave').innerHTML = |
| 90 | '<path d="M0 65H1200" stroke="rgba(255,255,255,.18)" stroke-width="1" vector-effect="non-scaling-stroke"/>' + |
| 91 | '<path d="' + upper + 'L' + down[0][0] + ' ' + down[0][1].toFixed(1) + curve(down) + 'Z" fill="rgba(255,255,255,.2)"/>' + |
| 92 | '<path d="' + upper + bottom + '" stroke="rgba(255,255,255,.92)" stroke-width="2.4" vector-effect="non-scaling-stroke"/>'; |
| 93 | </script> |
| 94 | </body> |
| 95 | </html> |