From e79bb71886c7e5715c1f276ff494d76e9629e250 Mon Sep 17 00:00:00 2001 From: Anthony Ettinger Date: Mon, 26 Oct 2026 10:02:21 +0000 Subject: [PATCH 1/2] Bundle a profullstack-footer plugin (webring row, built.indie + pwamart badges) Off by default. Renders @profullstack/footer server-side into the layout:footer slot with css:false, and serves the template CSS from /p/profullstack-footer/footer.css so style-src 'self' holds. Co-Authored-By: Claude Opus 5.5 --- plugins/profullstack-footer/package.json | 11 +++ plugins/profullstack-footer/plugin.json | 8 ++ plugins/profullstack-footer/src/index.ts | 96 ++++++++++++++++++++++++ pnpm-lock.yaml | 21 ++++++ test/plugins.test.ts | 30 +++++++- 5 files changed, 165 insertions(+), 1 deletion(-) create mode 100644 plugins/profullstack-footer/package.json create mode 100644 plugins/profullstack-footer/plugin.json create mode 100644 plugins/profullstack-footer/src/index.ts diff --git a/plugins/profullstack-footer/package.json b/plugins/profullstack-footer/package.json new file mode 100644 index 0000000..4800029 --- /dev/null +++ b/plugins/profullstack-footer/package.json @@ -0,0 +1,11 @@ +{ + "name": "@tsbb/plugin-profullstack-footer", + "version": "0.1.0", + "private": true, + "type": "module", + "main": "./src/index.ts", + "dependencies": { + "@profullstack/footer": "^0.2.6", + "@tsbb/plugin-api": "workspace:*" + } +} diff --git a/plugins/profullstack-footer/plugin.json b/plugins/profullstack-footer/plugin.json new file mode 100644 index 0000000..7158f47 --- /dev/null +++ b/plugins/profullstack-footer/plugin.json @@ -0,0 +1,8 @@ +{ + "slug": "profullstack-footer", + "name": "Profullstack Footer", + "description": "The Profullstack network footer: the << Profullstack >> webring row and the built.indie and pwamart badges. Off by default; for boards run by Profullstack.", + "author": "Profullstack, Inc.", + "homepage": "https://github.com/profullstack/footer", + "license": "MIT" +} diff --git a/plugins/profullstack-footer/src/index.ts b/plugins/profullstack-footer/src/index.ts new file mode 100644 index 0000000..6473bb5 --- /dev/null +++ b/plugins/profullstack-footer/src/index.ts @@ -0,0 +1,96 @@ +import { definePlugin } from '@tsbb/plugin-api'; +import { footerHtml, latestTemplate } from '@profullstack/footer'; + +/** + * The Profullstack network footer (@profullstack/footer), for boards that + * Profullstack runs: the << Profullstack >> webring row, the built.indie and + * pwamart badges and the copyright line, under the board's own footer. + * + * Ships DISABLED. Joining a webring and showing someone else's badges is the + * operator's choice, not something an upgrade should decide for every board. + * + * Two things shape it: + * + * 1. It renders on the server, into the page. The ring's verifier reads the + * HTML and never runs script, so a footer drawn by the browser would never + * count as a ring member. + * + * 2. Its CSS is served from the board, not inlined. The board's policy is + * style-src 'self' with no 'unsafe-inline', which refuses the package's + * inline