feat(colophon): add a Ko-fi link, and group the author's links together
The link sits last in the existing row beside @StereotypicalCat and Source code, in that row's own muted grey, with the same hover and the same small mark. No accent colour, no button, no sentence asking for anything, and the footer still contains no appeal anywhere — a test asserts that. This page earns its keep by being trusted about dates, and a tip jar competing with the disclaimer two paragraphs above spends that trust to make an ask. As one more link it costs nothing and is there for a reader already looking. The row also moves above "Additional ideas and design from". That row is who built this and where to find them; the credit below it is other people. Reading order now follows that split, instead of routing a reader past five strangers' handles to reach the author's own links. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5
parent
6552528acb
commit
72d57dd02a
+25
-1
@@ -3,7 +3,7 @@ import { renderToStaticMarkup } from "react-dom/server";
|
||||
import { EventForm } from "../src/client/components/CustomForms.tsx";
|
||||
import { YourOwn } from "../src/client/components/YourOwn.tsx";
|
||||
import { EventRow } from "../src/client/components/EventRow.tsx";
|
||||
import { Colophon } from "../src/client/components/Colophon.tsx";
|
||||
import { AUTHOR, Colophon, REPO_URL } from "../src/client/components/Colophon.tsx";
|
||||
import { GameMetaProvider } from "../src/client/state/gameMeta.tsx";
|
||||
import {
|
||||
asDisplayEvent,
|
||||
@@ -280,4 +280,28 @@ describe("Colophon freshness notice (PRD F7)", () => {
|
||||
);
|
||||
expect(html).toContain("Reverse: 1999 (never)");
|
||||
});
|
||||
|
||||
test("the author's links sit together, above the ideas credit", () => {
|
||||
// The row is who built this and where to find them; the credit below it is
|
||||
// other people. Reading order follows that, so a reader scanning the footer
|
||||
// does not pass a stranger's handle on the way to the author's own links.
|
||||
const html = renderToStaticMarkup(<Colophon sources={[fresh]} now={NOW} />);
|
||||
const links = html.indexOf("@StereotypicalCat");
|
||||
const ideas = html.indexOf("Additional ideas");
|
||||
expect(links).toBeGreaterThan(-1);
|
||||
expect(ideas).toBeGreaterThan(-1);
|
||||
expect(links).toBeLessThan(ideas);
|
||||
});
|
||||
|
||||
test("carries the Ko-fi link, in the row and not as an appeal", () => {
|
||||
const html = renderToStaticMarkup(<Colophon sources={[fresh]} now={NOW} />);
|
||||
expect(html).toContain(AUTHOR.kofi);
|
||||
// Last in the author's row, so it never lands between the disclaimer and
|
||||
// the reader — and never louder than the links beside it.
|
||||
expect(html.indexOf(AUTHOR.kofi)).toBeGreaterThan(html.indexOf(REPO_URL));
|
||||
expect(html.indexOf(AUTHOR.kofi)).toBeLessThan(html.indexOf("Additional ideas"));
|
||||
// Unobtrusive is a property of the markup, not a matter of taste: the same
|
||||
// muted class as its neighbours, and no ask anywhere in the footer.
|
||||
expect(html).not.toMatch(/support me|buy me|donate|tip jar/i);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user