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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ Every site gets a CrawlProof Surveys link, plus links to Profullstack's Terms,
Privacy and Media pages, GitHub, Discord and X, the Events calendar on Luma, a
Luma event registration link, and the PairUX and Moshcoding profiles. The
copyright line includes the small Profullstack icon.
Every site shows the built.indie and PwaMart OpenIcon HQ marks, linked to its own listing (allow `https://logicsrc.com` in your CSP `img-src`). Publisher and app pages can point them elsewhere:
Every site shows the built.indie and PwaMart icons, linked to its own listing (your CSP `img-src` must allow `https://built.indie.pit.world` and `https://pwamart.com`). Publisher and app pages can point them elsewhere:

```jsx
<Footer
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@profullstack/footer",
"version": "0.6.16",
"version": "0.6.17",
"type": "module",
"description": "Profullstack's distributed footer engine for remote, agent-friendly site branding and navigation.",
"keywords": ["footer", "webring", "openwebring", "copyright", "react", "nextjs", "hono", "ssr"],
Expand Down
4 changes: 2 additions & 2 deletions src/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -458,14 +458,14 @@ export function renderFooter(template, opts) {
const publisherBadges = [
opts.builtIndieHref && {
href: opts.builtIndieHref,
src: 'https://logicsrc.com/openicon/set/hq/svg/built-indie.svg',
src: 'https://built.indie.pit.world/favicon.svg',
alt: 'Find this site on built.indie',
width: 32,
height: 32,
},
opts.pwamartHref && {
href: opts.pwamartHref,
src: 'https://logicsrc.com/openicon/set/hq/svg/pwamart.svg',
src: 'https://pwamart.com/icon.svg',
alt: 'Find this site on PwaMart',
width: 32,
height: 32,
Expand Down
6 changes: 3 additions & 3 deletions src/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// render.js does not fill; older installs then keep their bundled template.

export default {
version: '0.6.16',
version: '0.6.17',
renderer: 1,
css: [
'.pfs-footer{--pfs-footer-muted:color-mix(in srgb,currentColor 62%,transparent);--pfs-footer-gap:.5rem 1.25rem;--pfs-footer-size:.875rem;',
Expand Down Expand Up @@ -68,8 +68,8 @@ export default {
// not the renderer, so every install gets them from the CDN with no redeploy. A site that passes its own
// pwamartHref/builtIndieHref (renderer 0.6.5+) gets those instead: CSS hides these defaults then.
'<div class="pfs-footer__badges">',
'<a class="pfs-footer__badge pfs-footer__badge--publisher pfs-footer__badge--default" href="https://built.indie.pit.world/for?site={{site}}"><img src="https://logicsrc.com/openicon/set/hq/svg/built-indie.svg" alt="Find this site on built.indie" width="32" height="32" loading="lazy"></a>',
'<a class="pfs-footer__badge pfs-footer__badge--publisher pfs-footer__badge--default" href="https://pwamart.com/for?site={{site}}"><img src="https://logicsrc.com/openicon/set/hq/svg/pwamart.svg" alt="Find this site on PwaMart" width="32" height="32" loading="lazy"></a>',
'<a class="pfs-footer__badge pfs-footer__badge--publisher pfs-footer__badge--default" href="https://built.indie.pit.world/for?site={{site}}"><img src="https://built.indie.pit.world/favicon.svg" alt="Find this site on built.indie" width="32" height="32" loading="lazy"></a>',
'<a class="pfs-footer__badge pfs-footer__badge--publisher pfs-footer__badge--default" href="https://pwamart.com/for?site={{site}}"><img src="https://pwamart.com/icon.svg" alt="Find this site on PwaMart" width="32" height="32" loading="lazy"></a>',
'{{{badges}}}</div>',
'<p class="pfs-footer__copy"><a href="tel:+18885264640">Phone: +1-888-526-4640</a></p>',
'<p class="pfs-footer__copy">&copy; {{years}} <a class="pfs-footer__brand" href="https://profullstack.com/" title="Profullstack, Inc."><img src="https://profullstack.com/assets/logo.svg" alt="" width="20" height="11" loading="lazy"></a> <a href="{{owner_url}}">{{owner_name}}</a>{{#tagline}} <span class="pfs-footer__tagline">&middot; {{tagline}}</span>{{/tagline}}</p>',
Expand Down
4 changes: 2 additions & 2 deletions template.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"version": "0.6.16",
"version": "0.6.17",
"renderer": 1,
"css": ".pfs-footer{--pfs-footer-muted:color-mix(in srgb,currentColor 62%,transparent);--pfs-footer-gap:.5rem 1.25rem;--pfs-footer-size:.875rem;border-top:1px solid color-mix(in srgb,currentColor 14%,transparent);font-size:var(--pfs-footer-size);line-height:1.5;color:inherit}html:has([data-pfs-footer]) [data-pit-footer],html:has([data-profullstack-footer]) [data-pit-footer],html:has([data-pfs-footer]) [data-net-footer],html:has([data-profullstack-footer]) [data-net-footer],html:has([data-pfs-footer]) footer:not([data-pfs-footer]):not([data-profullstack-footer]),html:has([data-profullstack-footer]) footer:not([data-pfs-footer]):not([data-profullstack-footer]){display:none!important}.pfs-footer__inner{max-width:72rem;margin:0 auto;padding:.85rem 1rem;display:flex;flex-direction:column;align-items:center;gap:.4rem;text-align:center}.pfs-footer a{color:var(--pfs-footer-muted);text-decoration:none}.pfs-footer a:hover,.pfs-footer a:focus-visible{color:inherit;text-decoration:underline}.pfs-footer__links{display:flex;flex-wrap:wrap;justify-content:center;gap:.35rem 1rem}.pfs-footer__ring{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:.4rem}.pfs-footer__badges{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:.4rem}.pfs-footer__badges:has(.pfs-footer__badge--publisher:not(.pfs-footer__badge--default)) .pfs-footer__badge--default{display:none!important}.pfs-footer a.pfs-footer__badge{display:inline-block;line-height:0}.pfs-footer__badge img{display:block;width:200px;height:44px;max-width:100%}.pfs-footer__badge--site img{width:auto;height:auto}.pfs-footer__badge--publisher img{width:32px;height:32px;max-width:none;object-fit:contain}.pfs-footer__badge--square img{width:32px;height:32px;max-width:none;object-fit:contain}.pfs-footer__news{display:flex;justify-content:center}.pfs-footer__sub{display:flex;align-items:center;gap:.35rem;margin:0;flex-wrap:wrap;justify-content:center}.pfs-footer__sub label{font:inherit;font-size:.8125rem;color:var(--pfs-footer-muted)}.pfs-footer__sub input[type=email]{box-sizing:border-box;appearance:none;font:inherit;font-size:.875rem;line-height:1.4;color:inherit;background:color-mix(in srgb,currentColor 8%,transparent);width:13.5rem;max-width:62vw;padding:.4rem .65rem;border:0;border-radius:.35rem}.pfs-footer__sub input[type=email]:hover{background:color-mix(in srgb,currentColor 11%,transparent)}.pfs-footer__sub input[type=email]::placeholder{color:var(--pfs-footer-muted);opacity:1}.pfs-footer__sub input[type=email]:focus-visible{outline:2px solid color-mix(in srgb,currentColor 58%,transparent);outline-offset:2px}.pfs-footer__sub button{font:inherit;font-size:.8125rem;color:var(--pfs-footer-muted);background:transparent;padding:.2rem .6rem;border:1px solid color-mix(in srgb,currentColor 25%,transparent);border-radius:.35rem;cursor:pointer}.pfs-footer__sub button:hover,.pfs-footer__sub button:focus-visible{color:inherit}.pfs-footer__hp{position:absolute!important;left:-9999px!important;width:1px;height:1px;opacity:0}.pfs-footer__sub+.pfs-footer__sublink{display:none}.pfs-footer__msg{flex-basis:100%;text-align:center;font-size:.8125rem;color:var(--pfs-footer-muted)}.pfs-footer__msg:empty{display:none}.pfs-footer__msg[data-state=ok]{color:inherit}.pfs-footer__msg[data-state=error]{color:#d92d20;color:light-dark(#b42318,#f97066)}.pfs-footer__copy{margin:0;color:var(--pfs-footer-muted)}.pfs-footer__copy a{color:inherit}.pfs-footer__tagline{display:inline-block;white-space:nowrap}.pfs-footer__brand{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;margin-inline:.35rem;padding:2px 4px;border-radius:3px;background:#202124;line-height:0}.pfs-footer__brand img{display:block;width:20px;height:11px;max-width:none}",
"link": "<a href=\"{{href}}\"{{#rel}} rel=\"{{rel}}\"{{/rel}}>{{label}}</a>",
"footer": "<footer class=\"pfs-footer\" data-pfs-footer=\"{{version}}\">{{#css}}<style{{#nonce}} nonce=\"{{nonce}}\"{{/nonce}}>{{{css}}}</style>{{/css}}<div class=\"pfs-footer__inner\">{{#links}}<nav class=\"pfs-footer__links\" aria-label=\"Footer\">{{{links}}}</nav>{{/links}}<nav class=\"pfs-footer__links\" aria-label=\"Profullstack products\"><a href=\"https://profullstack.com/stack/build\">Agentic site builder</a><a href=\"https://crawlproof.com/surveys\">CrawlProof Surveys</a></nav><nav class=\"webring pfs-footer__ring\" aria-label=\"{{ring_name}} webring\"><a href=\"{{previous}}\" rel=\"prev\" title=\"Previous site\">&lt;&lt;</a><a href=\"{{ring}}\">{{ring_name}}</a><a href=\"{{next}}\" rel=\"next\" title=\"Next site\">&gt;&gt;</a></nav><div class=\"pfs-footer__news\">{{{subscribe}}}<a class=\"pfs-footer__sublink\" href=\"https://pit.world/subscribe?site={{site}}\">Newsletter</a></div><div class=\"pfs-footer__badges\"><a class=\"pfs-footer__badge pfs-footer__badge--publisher pfs-footer__badge--default\" href=\"https://built.indie.pit.world/for?site={{site}}\"><img src=\"https://logicsrc.com/openicon/set/hq/svg/built-indie.svg\" alt=\"Find this site on built.indie\" width=\"32\" height=\"32\" loading=\"lazy\"></a><a class=\"pfs-footer__badge pfs-footer__badge--publisher pfs-footer__badge--default\" href=\"https://pwamart.com/for?site={{site}}\"><img src=\"https://logicsrc.com/openicon/set/hq/svg/pwamart.svg\" alt=\"Find this site on PwaMart\" width=\"32\" height=\"32\" loading=\"lazy\"></a>{{{badges}}}</div><p class=\"pfs-footer__copy\"><a href=\"tel:+18885264640\">Phone: +1-888-526-4640</a></p><p class=\"pfs-footer__copy\">&copy; {{years}} <a class=\"pfs-footer__brand\" href=\"https://profullstack.com/\" title=\"Profullstack, Inc.\"><img src=\"https://profullstack.com/assets/logo.svg\" alt=\"\" width=\"20\" height=\"11\" loading=\"lazy\"></a> <a href=\"{{owner_url}}\">{{owner_name}}</a>{{#tagline}} <span class=\"pfs-footer__tagline\">&middot; {{tagline}}</span>{{/tagline}}</p></div></footer>",
"footer": "<footer class=\"pfs-footer\" data-pfs-footer=\"{{version}}\">{{#css}}<style{{#nonce}} nonce=\"{{nonce}}\"{{/nonce}}>{{{css}}}</style>{{/css}}<div class=\"pfs-footer__inner\">{{#links}}<nav class=\"pfs-footer__links\" aria-label=\"Footer\">{{{links}}}</nav>{{/links}}<nav class=\"pfs-footer__links\" aria-label=\"Profullstack products\"><a href=\"https://profullstack.com/stack/build\">Agentic site builder</a><a href=\"https://crawlproof.com/surveys\">CrawlProof Surveys</a></nav><nav class=\"webring pfs-footer__ring\" aria-label=\"{{ring_name}} webring\"><a href=\"{{previous}}\" rel=\"prev\" title=\"Previous site\">&lt;&lt;</a><a href=\"{{ring}}\">{{ring_name}}</a><a href=\"{{next}}\" rel=\"next\" title=\"Next site\">&gt;&gt;</a></nav><div class=\"pfs-footer__news\">{{{subscribe}}}<a class=\"pfs-footer__sublink\" href=\"https://pit.world/subscribe?site={{site}}\">Newsletter</a></div><div class=\"pfs-footer__badges\"><a class=\"pfs-footer__badge pfs-footer__badge--publisher pfs-footer__badge--default\" href=\"https://built.indie.pit.world/for?site={{site}}\"><img src=\"https://built.indie.pit.world/favicon.svg\" alt=\"Find this site on built.indie\" width=\"32\" height=\"32\" loading=\"lazy\"></a><a class=\"pfs-footer__badge pfs-footer__badge--publisher pfs-footer__badge--default\" href=\"https://pwamart.com/for?site={{site}}\"><img src=\"https://pwamart.com/icon.svg\" alt=\"Find this site on PwaMart\" width=\"32\" height=\"32\" loading=\"lazy\"></a>{{{badges}}}</div><p class=\"pfs-footer__copy\"><a href=\"tel:+18885264640\">Phone: +1-888-526-4640</a></p><p class=\"pfs-footer__copy\">&copy; {{years}} <a class=\"pfs-footer__brand\" href=\"https://profullstack.com/\" title=\"Profullstack, Inc.\"><img src=\"https://profullstack.com/assets/logo.svg\" alt=\"\" width=\"20\" height=\"11\" loading=\"lazy\"></a> <a href=\"{{owner_url}}\">{{owner_name}}</a>{{#tagline}} <span class=\"pfs-footer__tagline\">&middot; {{tagline}}</span>{{/tagline}}</p></div></footer>",
"houseLinks": [
{
"label": "Find a pro",
Expand Down
8 changes: 4 additions & 4 deletions test/render.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ test('every site shows the built.indie and PwaMart icons, linked to its own list
// The PwaMart link is the site's PwaMart ownership proof: https origin, path "/".
assert.ok(html.includes('href="https://pwamart.com/for?site=https://www.a.test/"'));
assert.ok(html.includes('href="https://built.indie.pit.world/for?site=https://www.a.test/"'));
assert.ok(html.includes('src="https://logicsrc.com/openicon/set/hq/svg/pwamart.svg"'));
assert.ok(html.includes('src="https://logicsrc.com/openicon/set/hq/svg/built-indie.svg"'));
assert.ok(html.includes('src="https://pwamart.com/icon.svg"'));
assert.ok(html.includes('src="https://built.indie.pit.world/favicon.svg"'));
});

test('sanitizeTemplate strips script, handlers and javascript: urls', () => {
Expand Down Expand Up @@ -179,9 +179,9 @@ test('a site can point the publisher icons elsewhere; CSS then hides the default
builtIndieHref: 'https://built.indie.pit.world/p/a',
});
assert.ok(html.includes('class="pfs-footer__badge pfs-footer__badge--publisher" href="https://pwamart.com/publishers/a"'));
assert.ok(html.includes('src="https://logicsrc.com/openicon/set/hq/svg/pwamart.svg"'));
assert.ok(html.includes('src="https://pwamart.com/icon.svg"'));
assert.ok(html.includes('class="pfs-footer__badge pfs-footer__badge--publisher" href="https://built.indie.pit.world/p/a"'));
assert.ok(html.includes('src="https://logicsrc.com/openicon/set/hq/svg/built-indie.svg"'));
assert.ok(html.includes('src="https://built.indie.pit.world/favicon.svg"'));
assert.ok(template.css.includes('.pfs-footer__badge--publisher img{width:32px;height:32px'));
});

Expand Down
Loading