Skip to content

Commit 3559e5b

Browse files
Strawbangclaude
andcommitted
Add Stats section, tersify/aimemo install switcher in Hero
- Hero: tab switcher between tersify and aimemo install commands, copy button now copies whichever tab is active - Stats: new section (By the numbers) between Projects and Releases - index: plug Stats into the home page layout Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent ba90f8b commit 3559e5b

3 files changed

Lines changed: 145 additions & 3 deletions

File tree

src/components/Hero.astro

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,13 @@
1515
Rust tools built for the reality of AI-assisted development.
1616
</p>
1717

18+
<div class="install-tabs">
19+
<button class="itab active" data-cmd="cargo install tersify">tersify</button>
20+
<button class="itab" data-cmd="cargo install aimemo">aimemo</button>
21+
</div>
1822
<div class="install-block">
1923
<span class="install-prompt">$</span>
20-
<code id="install-cmd">cargo install aimemo</code>
24+
<code id="install-cmd">cargo install tersify</code>
2125
<button class="copy-btn" id="copy-btn" aria-label="Copy install command">
2226
<svg id="icon-copy" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2327
<rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/>
@@ -132,6 +136,37 @@
132136
}
133137

134138
/* Install block */
139+
.install-tabs {
140+
display: inline-flex;
141+
gap: 0;
142+
margin-bottom: 0.5rem;
143+
opacity: 0;
144+
animation: fadeUp 0.7s ease forwards 0.4s;
145+
}
146+
147+
.itab {
148+
font-family: 'IBM Plex Mono', monospace;
149+
font-size: 0.72rem;
150+
padding: 0.3rem 0.75rem;
151+
background: none;
152+
border: 1px solid var(--border);
153+
color: var(--text-dim);
154+
cursor: pointer;
155+
letter-spacing: 0.06em;
156+
transition: color 0.2s, background 0.2s, border-color 0.2s;
157+
}
158+
159+
.itab:first-child { border-radius: 3px 0 0 3px; }
160+
.itab:last-child { border-radius: 0 3px 3px 0; margin-left: -1px; }
161+
162+
.itab.active {
163+
background: var(--rust-glow);
164+
border-color: var(--rust-dim);
165+
color: var(--rust);
166+
}
167+
168+
.itab:not(.active):hover { color: var(--text); border-color: var(--border-hi); }
169+
135170
.install-block {
136171
display: inline-flex;
137172
align-items: center;
@@ -230,8 +265,19 @@
230265
const iconCopy = document.getElementById('icon-copy');
231266
const iconCheck = document.getElementById('icon-check');
232267

268+
const tabs = document.querySelectorAll<HTMLButtonElement>('.itab');
269+
const cmdEl = document.getElementById('install-cmd')!;
270+
271+
tabs.forEach((tab) => {
272+
tab.addEventListener('click', () => {
273+
tabs.forEach((t) => t.classList.remove('active'));
274+
tab.classList.add('active');
275+
cmdEl.textContent = tab.dataset.cmd!;
276+
});
277+
});
278+
233279
btn?.addEventListener('click', () => {
234-
navigator.clipboard.writeText('cargo install aimemo');
280+
navigator.clipboard.writeText(cmdEl.textContent!);
235281
btn.classList.add('copied');
236282
iconCopy!.style.display = 'none';
237283
iconCheck!.style.display = 'block';

src/components/Stats.astro

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
---
2+
const facts = [
3+
{
4+
value: '50%',
5+
label: 'fewer tokens',
6+
desc: 'tersify strips noise from code and text before it reaches your LLM — without losing meaning.',
7+
},
8+
{
9+
value: '1 cmd',
10+
label: 'to install',
11+
desc: 'cargo install aimemo or cargo install tersify. No config files, no manual steps.',
12+
},
13+
{
14+
value: '4',
15+
label: 'AI editors',
16+
desc: 'aimemo works with Claude Code, Cursor, Windsurf, and GitHub Copilot — out of the box, zero configuration.',
17+
},
18+
{
19+
value: 'v0.5',
20+
label: 'tersify',
21+
desc: 'tersify v0.5.0 — language-aware compression for Rust, Python, JavaScript, and more.',
22+
},
23+
];
24+
---
25+
26+
<section class="stats">
27+
<div class="section-inner">
28+
<div class="section-label reveal">By the numbers</div>
29+
<h2 class="reveal">Built to perform</h2>
30+
<p class="section-sub reveal">No benchmarks against imaginary competitors — just what our tools actually do.</p>
31+
32+
<div class="facts-grid">
33+
{facts.map((f) => (
34+
<div class="fact-item reveal">
35+
<div class="fact-value">{f.value}</div>
36+
<div class="fact-label">{f.label}</div>
37+
<p class="fact-desc">{f.desc}</p>
38+
</div>
39+
))}
40+
</div>
41+
</div>
42+
</section>
43+
44+
<style>
45+
.stats {
46+
background: var(--bg-2);
47+
border-top: 1px solid var(--border);
48+
border-bottom: 1px solid var(--border);
49+
}
50+
51+
.facts-grid {
52+
display: grid;
53+
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
54+
gap: 0;
55+
margin-top: 3rem;
56+
border: 1px solid var(--border);
57+
border-radius: 6px;
58+
overflow: hidden;
59+
}
60+
61+
.fact-item {
62+
padding: 2rem 1.75rem;
63+
border-right: 1px solid var(--border);
64+
border-bottom: 1px solid var(--border);
65+
transition: background 0.2s;
66+
}
67+
68+
.fact-item:hover { background: var(--bg-3); }
69+
70+
.fact-value {
71+
font-family: 'Space Mono', monospace;
72+
font-size: 2rem;
73+
font-weight: 700;
74+
color: var(--rust);
75+
letter-spacing: -0.04em;
76+
line-height: 1;
77+
margin-bottom: 0.3rem;
78+
}
79+
80+
.fact-label {
81+
font-family: 'IBM Plex Mono', monospace;
82+
font-size: 0.72rem;
83+
color: var(--text-dim);
84+
text-transform: uppercase;
85+
letter-spacing: 0.1em;
86+
margin-bottom: 1rem;
87+
}
88+
89+
.fact-desc {
90+
font-size: 0.83rem;
91+
color: var(--text-muted);
92+
line-height: 1.65;
93+
}
94+
</style>

src/pages/index.astro

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import Layout from '../layouts/Layout.astro';
33
import Nav from '../components/Nav.astro';
44
import Hero from '../components/Hero.astro';
55
import Projects from '../components/Projects.astro';
6+
import Stats from '../components/Stats.astro';
67
import Releases from '../components/Releases.astro';
78
import Footer from '../components/Footer.astro';
89
---
@@ -11,7 +12,8 @@ import Footer from '../components/Footer.astro';
1112
<Nav />
1213
<Hero />
1314
<Projects />
14-
<Releases />
15+
<Stats />
16+
<Releases />
1517
<Footer />
1618
</Layout>
1719

0 commit comments

Comments
 (0)