Skip to content

Commit 353dc96

Browse files
Zhuoming Chenclaude
andcommitted
site: force subtitle onto one line + add copy-citation button
Subtitle now uses white-space:nowrap with a viewport-scaled font (was wrapping because the 760px cap was narrower than the line). Add a Copy button on the citation panel with clipboard API + execCommand fallback and a 'Copied!' state. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 12ec1df commit 353dc96

1 file changed

Lines changed: 41 additions & 3 deletions

File tree

docs/landing/index.html

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
.eyebrow { display: inline-block; font-weight: 700; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-deep); background: var(--bg-soft); border: 1px solid var(--border); padding: 6px 14px; border-radius: 999px; }
7171
h1.title { font-family: var(--serif); font-size: clamp(3rem, 7vw, 5rem); line-height: 1.02; letter-spacing: -.03em; margin: 18px 0 8px; font-weight: 900; }
7272
h1.title .grad { background: linear-gradient(110deg, var(--accent-deep), var(--accent) 45%, var(--accent-2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
73-
.subtitle { font-family: var(--serif); font-style: italic; font-size: clamp(1.15rem, 2.6vw, 1.55rem); font-weight: 500; color: var(--fg); margin: 8px auto 0; max-width: 760px; letter-spacing: -.01em; }
73+
.subtitle { font-family: var(--serif); font-style: italic; font-size: clamp(0.66rem, 2.7vw, 1.5rem); font-weight: 500; color: var(--fg); margin: 8px auto 0; max-width: none; letter-spacing: -.01em; white-space: nowrap; }
7474
.tagline { color: var(--muted); font-size: 1.06rem; margin: 16px auto 0; max-width: 680px; }
7575
.tagline strong { color: var(--accent-deep); }
7676

@@ -171,6 +171,13 @@
171171
/* install */
172172
.panel { margin-top: 28px; background: linear-gradient(180deg, #fff, #fff6fa); border: 1px solid var(--border); border-radius: 18px; padding: 24px; box-shadow: var(--shadow-soft); }
173173
.panel h3 { margin: 0 0 12px; font-size: 1.05rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
174+
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
175+
.panel-head h3 { margin: 0 0 12px; }
176+
.copy-btn { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font: inherit; font-weight: 700; font-size: .86rem; color: #fff; background: linear-gradient(120deg, var(--accent), var(--accent-2)); border: 1px solid transparent; border-radius: 10px; padding: 8px 14px; box-shadow: var(--shadow-soft); transition: transform .12s ease, filter .12s ease; }
177+
.copy-btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
178+
.copy-btn:active { transform: none; }
179+
.copy-btn svg { width: 15px; height: 15px; }
180+
.copy-btn.copied { background: #2ea44f; }
174181
pre { background: #2c0f1c; border: 1px solid #45172a; border-radius: 14px; padding: 18px 20px; overflow-x: auto; font-size: .9rem; line-height: 1.6; color: #ffe3ef; margin: 0; }
175182
code { font-family: "JetBrains Mono", "SFMono-Regular", Consolas, Menlo, monospace; }
176183
.panel .cmt { color: #ff9ec4; }
@@ -363,8 +370,14 @@ <h3>Install</h3>
363370
pip install -e .</code></pre>
364371
</div>
365372
<div class="panel cite reveal">
366-
<h3>Cite</h3>
367-
<pre><code>@misc{chen2026vortexefficientprogrammablesparse,
373+
<div class="panel-head">
374+
<h3>Cite</h3>
375+
<button class="copy-btn" id="copyCite" type="button" aria-label="Copy citation">
376+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg>
377+
<span>Copy</span>
378+
</button>
379+
</div>
380+
<pre><code id="citeText">@misc{chen2026vortexefficientprogrammablesparse,
368381
title = {Vortex: Efficient and Programmable Sparse Attention Serving for AI Agents},
369382
author = {Zhuoming Chen and Xinrui Zhong and Qilong Feng and Ranajoy Sadhukhan and
370383
Yang Zhou and Michael Qizhe Shieh and Zhihao Jia and Beidi Chen},
@@ -401,6 +414,31 @@ <h3>Cite</h3>
401414
}, { threshold: 0.12 });
402415
els.forEach(function (e) { io.observe(e); });
403416
})();
417+
418+
(function () {
419+
var btn = document.getElementById('copyCite');
420+
var src = document.getElementById('citeText');
421+
if (!btn || !src) return;
422+
var label = btn.querySelector('span');
423+
btn.addEventListener('click', function () {
424+
var text = src.innerText;
425+
var done = function () {
426+
btn.classList.add('copied');
427+
if (label) label.textContent = 'Copied!';
428+
setTimeout(function () { btn.classList.remove('copied'); if (label) label.textContent = 'Copy'; }, 1800);
429+
};
430+
if (navigator.clipboard && navigator.clipboard.writeText) {
431+
navigator.clipboard.writeText(text).then(done, function () { fallback(text, done); });
432+
} else { fallback(text, done); }
433+
});
434+
function fallback(text, done) {
435+
var ta = document.createElement('textarea');
436+
ta.value = text; ta.style.position = 'fixed'; ta.style.opacity = '0';
437+
document.body.appendChild(ta); ta.select();
438+
try { document.execCommand('copy'); done(); } catch (e) {}
439+
document.body.removeChild(ta);
440+
}
441+
})();
404442
</script>
405443
</body>
406444
</html>

0 commit comments

Comments
 (0)