Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion apps/web/src/lib/pfs-footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,35 @@
*/
import { createHash } from 'node:crypto';
import { footerHtml, footerHtmlSync, subscribeForm } from '@profullstack/footer';
import { config } from '@r4ck/config';
import { raw } from 'hono/html';

const options = { site: 'https://r4ck.dev/' };
const options = {
site: 'https://r4ck.dev/',
tagline: 'Data under CC BY 4.0; prices estimated using ECB daily rates.',
links: [
{ label: 'Servers', href: '/servers' },
{ label: 'Providers', href: '/providers' },
{ label: 'Compare', href: '/compare' },
{ label: 'Deals', href: '/deals' },
{ label: 'Pricing', href: '/pricing' },
{ label: 'API', href: '/docs/api' },
{ label: 'CLI', href: '/docs/cli' },
{ label: 'MCP', href: '/docs/mcp' },
{ label: 'About', href: '/about' },
{
label: 'Source',
href: 'https://github.com/profullstack/r4ck.dev',
rel: 'noopener noreferrer',
},
{
label: 'NicheDB hosting data',
href: `${config.nichedb.url}/c/hosting`,
rel: 'noopener noreferrer',
},
{ label: 'Findhost', href: 'https://www.findhost.app/', rel: 'noopener noreferrer' },
],
};

/**
* The CSP source for the footer's inline newsletter script (wireSubscribe, footer 0.4.0+), as
Expand Down
40 changes: 0 additions & 40 deletions apps/web/src/lib/pit-footer.js

This file was deleted.

30 changes: 1 addition & 29 deletions apps/web/src/views/Layout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { config } from '@r4ck/config';
import { raw } from 'hono/html';
import { assetUrl } from '../lib/assets.js';
import { PfsFooter } from '../lib/pfs-footer.js';
import { PitFooter } from '../lib/pit-footer.js';

/**
* The one HTML shell. Dark ground by default, a light theme on request,
Expand Down Expand Up @@ -157,32 +156,7 @@ export function Layout({
<main id="main" class={wide ? 'wide' : 'wrap'}>
{children}
</main>
<footer class="footer">
<nav class="footer-links" aria-label="Footer">
<a class="brand" href="/">
<span class="wordmark">
r<em>4</em>ck
</span>
</a>
<a href="/servers">Servers</a>
<a href="/providers">Providers</a>
<a href="/compare">Compare</a>
<a href="/deals">Deals</a>
<a href="/pricing">Pricing</a>
<a href="/docs/api">API</a>
<a href="/docs/cli">CLI</a>
<a href="/docs/mcp">MCP</a>
<a href="/about">About</a>
<a href="https://github.com/profullstack/r4ck.dev">Source</a>
</nav>
<p class="footer-note muted small">
Plan data mirrored from the{' '}
<a href={`${config.nichedb.url}/c/hosting`}>NicheDB hosting collection</a>; provider
descriptions from <a href="https://www.findhost.app/">findhost.app</a>, CC BY 4.0. USD
prices are estimates from daily ECB rates.
</p>
</footer>
{/* Copyright and the Profullstack webring: lib/pfs-footer.js. */}
{/* Site links, data attribution, copyright, and the webring use one shared footer. */}
<PfsFooter />
<nav class="bottomnav" aria-label="Sections">
{[
Expand Down Expand Up @@ -216,8 +190,6 @@ export function Layout({
</dialog>
<script src={vendor} defer></script>
<script src={js} defer></script>
{/* The pit.world global footer, last in <body>: lib/pit-footer.js. */}
<PitFooter />
</body>
</html>
);
Expand Down
2 changes: 1 addition & 1 deletion test/crawl.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('/crawl page', () => {
expect(html.startsWith('<!doctype html>')).toBe(true);
expect(html).toContain('<title>Crawl pass · r4ck</title>');
expect(html).toContain('class="topbar"');
expect(html).toContain('class="footer"');
expect(html).toContain('data-pfs-footer=');
expect(html).toContain('/styles.css?v=');
expect(html).toContain('<meta name="robots" content="noindex"');
expect(html).toContain('Training crawlers pay for access here.');
Expand Down
Loading