diff --git a/bun.lock b/bun.lock index 1822cc9..7ad76ad 100644 --- a/bun.lock +++ b/bun.lock @@ -7,6 +7,7 @@ "dependencies": { "@profullstack/auth-system": "^0.8.3", "@profullstack/emailer": "^1.0.3", + "@profullstack/footer": "latest", "@profullstack/hqtui": "^0.10.3", "@profullstack/player": "^0.14.0", "jsonwebtoken": "^9.0.2", @@ -80,6 +81,8 @@ "@profullstack/emailer": ["@profullstack/emailer@1.0.3", "", {}, "sha512-VyAtCcfnSI6LOwJvWogCr3ZNmEsaZw+iuWrqnosLsdcKsbRyCrCmXigMNZJZEjlgYlR+lK//PwNPG+xtCFvWAw=="], + "@profullstack/footer": ["@profullstack/footer@0.2.4", "", { "peerDependencies": { "react": ">=18" }, "optionalPeers": ["react"], "bin": { "profullstack-footer": "bin/profullstack-footer.js" } }, "sha512-2ErIzHJCDA2baP8aK6f7rCHohW4EX+wnp7D1mrVMQTUxRcyZwKzmho96hhEFJndXRBGgxT3H/78BHOeBfLxTzg=="], + "@profullstack/hqtui": ["@profullstack/hqtui@0.10.3", "", { "bin": { "hqtui": "bin/hqtui.mjs" } }, "sha512-Z2jaDqmiaGyrMy4JXOoPGCyEkei8l3tHoCbmT3/1gAWDl72ynPvMuHcUj+U97KgsF/CFIpZzzBYnYqcOq5e46g=="], "@profullstack/player": ["@profullstack/player@0.14.0", "", { "dependencies": { "hls.js": "^1.7.1", "mpegts.js": "^1.8.2" }, "peerDependencies": { "react": ">=18" }, "optionalPeers": ["react"] }, "sha512-HBDNkb17jGhZrkpksCp1iB07yWjfKIeDQq8LarhA04bKBZdX+vkRRTN1gsxXiAM3T4t0Zxj+99dpTA0uPtKofw=="], diff --git a/package.json b/package.json index 722cd06..7ab6170 100644 --- a/package.json +++ b/package.json @@ -57,6 +57,7 @@ "dependencies": { "@profullstack/auth-system": "^0.8.3", "@profullstack/emailer": "^1.0.3", + "@profullstack/footer": "latest", "@profullstack/hqtui": "^0.10.3", "@profullstack/player": "^0.14.0", "jsonwebtoken": "^9.0.2", diff --git a/src/server/footer.js b/src/server/footer.js index a4d92df..8b50ff8 100644 --- a/src/server/footer.js +++ b/src/server/footer.js @@ -1,8 +1,16 @@ -// The pit.world network footer, fetched server side from -// https://pit.world/snippets/footer.html and rendered into the -// markers of index.html on every page load. It refetches at -// most hourly with a 3-second timeout; on failure it keeps the last good copy, -// or renders nothing, so pit.world being down never breaks the page. +// Two footers render into index.html's markers on every page load: +// +// - : the shared Profullstack footer (@profullstack/footer, +// copyright + webring) from the @latest template on jsDelivr (cached an hour +// by the package; the bundled template if the CDN is down). +// - : the pit.world network footer, fetched server side from +// https://pit.world/snippets/footer.html, last in the page. It refetches at +// most hourly with a 3-second timeout; on failure it keeps the last good +// copy, or renders nothing, so pit.world being down never breaks the page. +import { footerHtml } from '@profullstack/footer'; + +const RING_OPTIONS = { site: 'https://hdtilt.com/' }; +const RING_REGION = /[\s\S]*?/; const URL_ = 'https://pit.world/snippets/footer.html?site=hdtilt.com'; const TTL = 60 * 60 * 1000; const REGION = /[\s\S]*?/; @@ -33,6 +41,14 @@ function refresh() { /** @param {string} html */ export async function withFooter(html) { + if (RING_REGION.test(html)) { + try { + const ring = await footerHtml(RING_OPTIONS); + html = html.replace(RING_REGION, () => `${ring}`); + } catch { + // Leave the markers empty. + } + } if (!REGION.test(html)) return html; await refresh(); return html.replace(REGION, () => `${cached}`); diff --git a/web/public/app.css b/web/public/app.css index a382d62..b5c2bf7 100644 --- a/web/public/app.css +++ b/web/public/app.css @@ -1085,7 +1085,7 @@ body.gated .nav-items button:not(#nav-account) { min-width: 0; } -/* Footer (own copyright row + the pit.world network footer): only while the +/* Footer (@profullstack/footer + the pit.world network footer): only while the sheet is up, docked under it. */ .ring-dock { display: none; @@ -1102,15 +1102,9 @@ body.gated .nav-items button:not(#nav-account) { display: block; color: var(--text); } -.site-foot { - margin: 0; - padding: 0.75rem 1rem 0; - text-align: center; - font-size: 0.85rem; - color: var(--dim); -} -.site-foot a { - color: inherit; +.ring-dock .pfs-footer { + --pfs-footer-muted: var(--dim); + border-top: 0; } /* The pit.world snippet is styled for light pages; this app is always dark. */ .ring-dock .pit-foot { diff --git a/web/public/index.html b/web/public/index.html index 8c1791d..636b27a 100644 --- a/web/public/index.html +++ b/web/public/index.html @@ -85,8 +85,9 @@
-

© 2026 Profullstack, Inc. · Source

+ server renders @profullstack/footer (copyright + webring) and then the + pit.world network footer between the markers. --> +