Skip to content

Commit 1518355

Browse files
authored
site: add Approved on SaaSHub badge to footer (#207)
* site: add Approved on SaaSHub badge to footer Add a small SaaSHub badge under the beta status pill in the footer brand block, linking to the Varve listing in a new tab. The image is committed under apps/website/public/badges instead of hotlinked from SaaSHub's CDN, so the page makes no third-party request and the existing CSP (img-src 'self' data:) and Lighthouse third-party budget of 0 still hold. Explicit width and height avoid layout shift. Signed-off-by: K-Arthur <58142087+K-Arthur@users.noreply.github.com> * test(website): refresh mobile full-page baselines for footer badge The footer badge adds about 51px to the single-column mobile footer. Desktop layouts are unchanged. Regenerated with Playwright Chromium on Linux using the pinned fonts.conf. Signed-off-by: K-Arthur <58142087+K-Arthur@users.noreply.github.com> * fix(website): load footer badge eagerly so image-loaded checks pass * test(website): refresh mobile baselines for footer badge; decline consent in background-removal capture The footer badge makes the footer 51px taller, so the mobile full-page captures for background removal, feedback and press need new baselines. CI builds the site with ANALYTICS_DOMAIN, which shows the fixed analytics consent banner. The background-removal mobile test did not decline it (feedback and press already do), so its capture included the banner. On master that stayed under the 2% tolerance; with a new baseline it would have been baked in. The test now declines consent before navigation. Feedback and press baselines are the CI actuals from run 41089160745. They also pick up copy from #159 that the old baselines predate. Signed-off-by: K-Arthur <58142087+K-Arthur@users.noreply.github.com> --------- Signed-off-by: K-Arthur <58142087+K-Arthur@users.noreply.github.com>
1 parent 0a874ac commit 1518355

13 files changed

Lines changed: 43 additions & 0 deletions
15 KB
Loading

‎apps/website/src/components/SiteFooter.astro‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,20 @@ const statusLabel = release.hasRelease && release.version
5858
<span class="footer-status-dot" aria-hidden="true"></span>
5959
{statusLabel}
6060
</p>
61+
<a
62+
class="footer-badge"
63+
href="https://www.saashub.com/varve-studio?utm_source=badge&utm_campaign=badge&utm_content=varve-studio&badge_variant=color&badge_kind=approved"
64+
target="_blank"
65+
rel="noopener noreferrer"
66+
>
67+
<img
68+
src={sitePath('/badges/saashub-approved.png')}
69+
alt="Varve is approved on SaaSHub"
70+
width="120"
71+
height="40"
72+
decoding="async"
73+
/>
74+
</a>
6175
</div>
6276

6377
<nav class="footer-columns" aria-label="Footer">
@@ -306,6 +320,30 @@ const statusLabel = release.hasRelease && release.version
306320
background: var(--status-partial);
307321
}
308322

323+
/* Third-party listing badge. Self-hosted from public/badges so the page
324+
makes no request to SaaSHub; kept small and slightly muted so it reads
325+
as a footnote, not a call to action. */
326+
.footer-badge {
327+
display: block;
328+
width: fit-content;
329+
margin-top: var(--space-4);
330+
border-radius: var(--space-2);
331+
opacity: 0.85;
332+
transition: opacity 150ms ease;
333+
}
334+
335+
.footer-badge:hover,
336+
.footer-badge:focus-visible {
337+
opacity: 1;
338+
}
339+
340+
.footer-badge img {
341+
display: block;
342+
width: 120px;
343+
max-width: 100%;
344+
height: auto;
345+
}
346+
309347
.footer-columns {
310348
display: grid;
311349
grid-template-columns: repeat(5, minmax(0, 1fr));

‎apps/website/tests/e2e/background-removal-feature.spec.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ import { expect, test } from '@playwright/test';
33
test('background-removal feature page is accurate and usable on mobile', async ({ page }) => {
44
await page.setViewportSize({ width: 390, height: 844 });
55
await page.emulateMedia({ colorScheme: 'dark', reducedMotion: 'reduce' });
6+
// CI builds with ANALYTICS_DOMAIN, so the fixed consent banner would cover
7+
// part of the full-page capture. Decline it up front, as feedback and press do.
8+
await page.addInitScript(() => {
9+
window.localStorage.setItem('varve:website-analytics-consent', 'denied');
10+
});
611
await page.goto('/features/background-removal');
712

813
await expect(page.getByRole('heading', { name: /cut out subjects/i })).toBeVisible();
-17.9 KB
Loading
-17.9 KB
Loading
5.25 KB
Loading
5.25 KB
Loading
-44.7 KB
Loading
6.13 KB
Loading
6.13 KB
Loading

0 commit comments

Comments
 (0)