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