Skip to content

Commit 259eb38

Browse files
authored
Reduce landing page typography and add active endpoints list (#22)
1 parent 32ee0e3 commit 259eb38

2 files changed

Lines changed: 36 additions & 15 deletions

File tree

src/ignition.ts

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const ignition = () => {
3333
}
3434
h1 {
3535
margin: 0 0 8px;
36-
font-size: clamp(40px, 8vw, 84px);
36+
font-size: clamp(28px, 5vw, 44px);
3737
line-height: 1;
3838
letter-spacing: -0.08em;
3939
}
@@ -42,39 +42,51 @@ export const ignition = () => {
4242
}
4343
.tagline {
4444
margin: 0 0 44px;
45-
font-size: 22px;
46-
text-align: center;
45+
font-size: 14px;
46+
text-align: left;
4747
}
4848
h2 {
4949
margin: 36px 0 10px;
50-
font-size: 28px;
50+
font-size: 16px;
5151
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
5252
text-transform: uppercase;
5353
}
5454
a {
5555
color: inherit;
5656
}
5757
.endpoint {
58-
margin: 0 0 34px 64px;
58+
margin: 0 0 34px;
59+
}
60+
.endpoint-list {
61+
margin: 0 0 28px;
62+
padding: 0;
63+
list-style: none;
64+
font-size: 14px;
65+
}
66+
.endpoint-list li {
67+
margin: 0 0 6px;
68+
}
69+
.endpoint-list a {
70+
font-weight: 700;
5971
}
6072
.curl {
6173
margin: 0 0 12px;
6274
color: #000;
63-
font-size: clamp(20px, 3vw, 30px);
75+
font-size: clamp(14px, 1.8vw, 16px);
6476
font-weight: 700;
6577
white-space: pre-wrap;
6678
word-break: break-word;
6779
}
6880
pre {
69-
margin: 0 0 26px 88px;
81+
margin: 0 0 26px;
7082
color: #444;
71-
font-size: clamp(16px, 2.5vw, 26px);
83+
font-size: clamp(12px, 1.5vw, 14px);
7284
line-height: 1.45;
7385
white-space: pre-wrap;
7486
}
7587
.links {
7688
margin-top: 44px;
77-
font-size: 18px;
89+
font-size: 14px;
7890
}
7991
@media (max-width: 640px) {
8092
body {
@@ -83,12 +95,6 @@ export const ignition = () => {
8395
.tagline {
8496
text-align: left;
8597
}
86-
.endpoint {
87-
margin-left: 0;
88-
}
89-
pre {
90-
margin-left: 24px;
91-
}
9298
}
9399
</style>
94100
</head>
@@ -97,6 +103,13 @@ export const ignition = () => {
97103
<h1>version<span>-</span>vault</h1>
98104
<p class="tagline">Version metadata responses are JSON-encoded.</p>
99105
106+
<h2>ENDPOINTS</h2>
107+
<ul class="endpoint-list">
108+
<li><a href="/">/</a> This page.</li>
109+
<li><a href="/python/pyenv">/python/pyenv</a> Pyenv Python versions.</li>
110+
<li><a href="/python/uv-build">/python/uv-build</a> Python Build Standalone assets.</li>
111+
</ul>
112+
100113
<h2>Examples</h2>
101114
<section class="endpoint" aria-label="pyenv Python versions">
102115
<p class="curl">$ curl https://vault.vfox.dev/python/pyenv</p>

tests/root.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ test("root route renders landing page with examples and endpoint links", async (
99
assert.equal(response.status, 200);
1010
assert.match(response.headers.get("content-type") ?? "", /^text\/html/);
1111
assert.match(body, /https:\/\/github\.com\/version-fox\/version-vault/);
12+
assert.match(body, /<h2>ENDPOINTS<\/h2>/);
13+
assert.match(body, /<a href="\/">\/<\/a>/);
14+
assert.match(body, /This page\./);
15+
assert.match(body, /href="\/python\/pyenv"/);
16+
assert.match(body, /Pyenv Python versions\./);
17+
assert.match(body, /href="\/python\/uv-build"/);
18+
assert.match(body, /Python Build Standalone assets\./);
19+
assert.doesNotMatch(body, /\/pyenv-versions/);
1220
assert.match(body, /\$ curl https:\/\/vault\.vfox\.dev\/python\/pyenv/);
1321
assert.match(body, /\$ curl https:\/\/vault\.vfox\.dev\/python\/uv-build/);
1422
assert.match(body, /https:\/\/vault\.vfox\.dev\/python\/uv-build\?os=linux&amp;arch=aarch64&amp;libc=gnu/);

0 commit comments

Comments
 (0)