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 package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@profullstack/footer",
"version": "0.6.17",
"version": "0.6.18",
"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/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.17',
version: '0.6.18',
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 All @@ -21,7 +21,7 @@ export default {
'.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__badges:has(.pfs-footer__badge--publisher:not(.pfs-footer__badge--default)[href*="pwamart.com"]) .pfs-footer__badge--default[href^="https://pwamart.com/"],.pfs-footer__badges:has(.pfs-footer__badge--publisher:not(.pfs-footer__badge--default)[href*="built.indie"]) .pfs-footer__badge--default[href^="https://built.indie.pit.world/"]{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}',
Expand Down
4 changes: 2 additions & 2 deletions template.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": "0.6.17",
"version": "0.6.18",
"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}",
"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)[href*=\"pwamart.com\"]) .pfs-footer__badge--default[href^=\"https://pwamart.com/\"],.pfs-footer__badges:has(.pfs-footer__badge--publisher:not(.pfs-footer__badge--default)[href*=\"built.indie\"]) .pfs-footer__badge--default[href^=\"https://built.indie.pit.world/\"]{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://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": [
Expand Down
4 changes: 3 additions & 1 deletion test/render.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,9 @@ test('an install that predates the form (no {{{subscribe}}} filler) shows the pl
});

test('a site can point the publisher icons elsewhere; CSS then hides the defaults', () => {
assert.ok(template.css.includes('.pfs-footer__badges:has(.pfs-footer__badge--publisher:not(.pfs-footer__badge--default)) .pfs-footer__badge--default{display:none!important}'));
// Per icon: a site that points only its built.indie icon elsewhere keeps the default PwaMart icon.
assert.ok(template.css.includes('.pfs-footer__badges:has(.pfs-footer__badge--publisher:not(.pfs-footer__badge--default)[href*="pwamart.com"]) .pfs-footer__badge--default[href^="https://pwamart.com/"]'));
assert.ok(template.css.includes('.pfs-footer__badges:has(.pfs-footer__badge--publisher:not(.pfs-footer__badge--default)[href*="built.indie"]) .pfs-footer__badge--default[href^="https://built.indie.pit.world/"]'));

const html = renderFooter(template, {
site: 'https://a.test/',
Expand Down
Loading