From 8250555be71894a3ba1e79991d52821dee0bc007 Mon Sep 17 00:00:00 2001 From: ulziibay-kernel <253135130+ulziibay-kernel@users.noreply.github.com> Date: Wed, 28 Oct 2026 19:27:02 +0000 Subject: [PATCH 1/2] Default the site chrome to the system UI sans stack The man-page chrome rendered all prose in 14px monospace, which is hard to read on desktop and mobile. Switch the default reading face to the tried-and-tested system UI stack (native SF / Segoe UI / Roboto per platform, nothing to download) at 16px/1.6, and convert the pre-based prose to real paragraphs. Monospace stays where it means something: prompt boxes, inline code, and diffs. The space-padded footer becomes a flex row so it stays flush at any width. This overrides the earlier 'always monospace' chrome decision; the man-page structure (headline, uppercase sections, hanging indent, footer) is unchanged. Auth emails and the OG preview image keep their own fonts. --- app/[...path]/route.ts | 8 ++-- app/bookmarks/route.ts | 13 +++--- app/d/[slug]/CommentsShell.tsx | 26 ++++++----- app/d/[slug]/history/HistoryClient.tsx | 17 ++++--- app/d/[slug]/history/not-found.tsx | 43 ++++++++++-------- app/d/[slug]/history/page.tsx | 2 +- app/d/[slug]/not-found.tsx | 55 +++++++++++----------- app/d/[slug]/page.tsx | 2 +- app/docs/route.ts | 10 ++-- app/layout.tsx | 5 +- app/login/route.ts | 63 ++++++++++---------------- app/route.ts | 40 ++++++++-------- lib/auth/verify-pages.ts | 27 +++++------ lib/docs/bookmarks-view.ts | 4 +- lib/docs/overlay.ts | 4 +- lib/page.ts | 59 +++++++++++++----------- 16 files changed, 191 insertions(+), 187 deletions(-) diff --git a/app/[...path]/route.ts b/app/[...path]/route.ts index 99ac094..aef4584 100644 --- a/app/[...path]/route.ts +++ b/app/[...path]/route.ts @@ -21,11 +21,13 @@ const PAGE = manPage({ title: "404 — justhtml.sh", bodyHtml: `
404 — there is nothing at this path.
404 — there is nothing at this path.
/ what justhtml.sh is -/api/health service + database health
/ — what justhtml.sh is
+/api/health — service + database health
+` (title + dimmed tail) and a +// Rows lay out as a flex line: the row's main text (title + dimmed tail) and a // quiet inline `remove` form sitting on the same baseline. const ROW_STYLE = ` -`, }); @@ -86,14 +83,14 @@ export function deadLinkPage(next?: string): string { title: "justhtml.sh — link expired", bodyHtml: `JUSTHTML.SH(1)+JUSTHTML.SH(1)NAME
-+justhtml.sh — a place for agents to publish and discuss HTML documentsjusthtml.sh — a place for agents to publish and discuss HTML documents
SYNOPSIS
@@ -96,21 +98,19 @@ ${COPY_BTN}DESCRIPTION
-+The agent self-onboards, gets an API key, and publishes HTML to stable -URLs like https://justhtml.sh/d/fierce-tiger-12345. Once published, -documents can be edited and commented on, by you (via the web UI) or an -agent (via API). Docs are private by default. There is no build step, no -framework — the document you publish is the document people see.The agent self-onboards, gets an API key, and publishes HTML to stable URLs like https://justhtml.sh/d/fierce-tiger-12345. Once published, documents can be edited and commented on, by you (via the web UI) or an agent (via API). Docs are private by default. There is no build step, no framework — the document you publish is the document people see.
SEE ALSO
-+/auth.md how agents sign up + authenticate -/llms.txt agent-facing usage -/openapi.json OpenAPI spec -/docs your documents -/bookmarks bookmarked docs -github source+- + `, }); @@ -57,14 +56,12 @@ export function confirmSignInPage(token: string, next: string): string { title: "justhtml.sh — confirm sign-in", bodyHtml: `/auth.md — how agents sign up + authenticate
+/llms.txt — agent-facing usage
+/openapi.json — OpenAPI spec
+/docs — your documents
+/bookmarks — bookmarked docs
+github — source
+ALMOST THERE
-+Tap the button to finish signing in on this device. This link is -single-use — if it's expired or already used you'll be asked to -request a new one.Tap the button to finish signing in on this device. This link is single-use — if it's expired or already used you'll be asked to request a new one.
This login link is expired or already used. - -Request a new one at justhtml.sh/login${ +++ } +This login link is expired or already used.
+Request a new one at justhtml.sh/login${ dest - ? ` — signing in again -will take you straight to where this link was headed.` + ? ` — signing in again will take you straight to where this link was headed.` : "." - }
${esc(label)} revoked · ${esc(fmtDate(m.bookmarkedAt))}${removeForm(m.docId)}
${esc(label)} ${esc(m.access)} ${vis} · ${esc(fmtDate(m.bookmarkedAt))}${removeForm(m.docId)}
;
is code.
+
+// The site-wide default reading face.
+export const SANS = `-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif`;
+// Code only: prompts, inline code, diffs.
+export const MONO = `ui-monospace, "SF Mono", Menlo, Consolas, "Courier New", monospace`;
const STYLE = `
:root { color-scheme: light; }
@@ -14,42 +25,38 @@ const STYLE = `
body {
margin: 0 auto;
padding: 2rem 1.5rem 3rem;
- font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Courier New", monospace;
- font-size: 14px;
- line-height: 1.55;
+ font-family: ${SANS};
+ font-size: 16px;
+ line-height: 1.6;
color: #111;
background: #fff;
max-width: 760px;
}
.headline { font-weight: 700; margin: 0 0 1.5rem; }
h1, h2 {
- font-size: 14px; font-weight: 700; margin: 1.6rem 0 0.3rem;
- text-transform: uppercase; letter-spacing: 0.03em;
+ font-size: 14px; font-weight: 700; margin: 1.6rem 0 0.4rem;
+ text-transform: uppercase; letter-spacing: 0.05em;
}
- pre { white-space: pre-wrap; margin: 0; }
+ p { margin: 0 0 0.4rem; }
+ pre { white-space: pre-wrap; margin: 0; font-family: ${MONO}; font-size: 14px; }
.body { padding-left: 3.5ch; }
a { color: #0000ee; }
.hint { color: #666; margin: 0 0 0.5rem; }
.err { color: #b00020; margin: 0 0 0.5rem; }
- code { background: rgba(127,127,127,0.12); padding: 0.05rem 0.3rem; border-radius: 3px; }
+ code { font-family: ${MONO}; font-size: 0.9em; background: rgba(127,127,127,0.12); padding: 0.05rem 0.3rem; border-radius: 3px; }
input, button { font: inherit; }
input[type=email] { padding: 2px 6px; border: 1px solid #999; background: #fff; color: #111; }
button { padding: 2px 12px; border: 1px solid #999; background: #f6f6f6; color: #111; cursor: pointer; border-radius: 3px; }
button:hover { background: #ededed; }
footer { margin-top: 2.5rem; color: #666; }
+ footer .foot { display: flex; justify-content: space-between; gap: 1rem; }
`;
-// One quiet justified footer line: `justhtml.sh … … JUSTHTML.SH(1)`.
-// Spacing is in characters so it reads true in the monospace column. Mirrors the
-// homepage footer (which hardcodes the same shape at the design's wrap width).
-function footerLine(date: string): string {
- const left = "justhtml.sh";
- const right = "JUSTHTML.SH(1)";
- const width = 78;
- const gaps = Math.max(2, width - left.length - right.length - date.length);
- const l = Math.ceil(gaps / 2);
- const r = gaps - l;
- return `${left}${" ".repeat(l)}${date}${" ".repeat(r)}${right}`;
+// One quiet justified footer line: `justhtml.sh … … JUSTHTML.SH(1)`,
+// laid out with flexbox space-between so it stays flush at any wrap width.
+// Mirrors the homepage footer.
+function footerRow(date: string): string {
+ return `justhtml.sh${date}JUSTHTML.SH(1)`;
}
export function manPage(opts: {
@@ -67,9 +74,9 @@ export function manPage(opts: {
-JUSTHTML.SH(1)
+JUSTHTML.SH(1)
${opts.bodyHtml}
-
+