From 7af21af58076e03a903bdea89b39e79f9b500d6b Mon Sep 17 00:00:00 2001 From: Eric Fennis Date: Thu, 26 Nov 2026 10:32:25 +0100 Subject: [PATCH] feat(site): Add lucide merch ad fallback (#5299) * feat(site): Show merch from merch.lucide.dev when Carbon Ads are blocked When an adblocker stops Carbon (failed script request, no window._carbonads after 3s, or the ad hidden by a cosmetic filter), the ad slot shows a merch card instead of an empty box. Doc pages and the icons overlay get a 3:4 slider with bullets (10s, crossfade); the home page shows two products. Products come from the Fourthwall Storefront API at build time (prebuild:merch, FOURTHWALL_STOREFRONT_TOKEN), in USD, so the token never reaches the browser. Without a token the card links to the store. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01G9u8FiGcimashQWZ7MEP1h * refactor(site): Load merch with a VitePress data loader instead of a prebuild script Moves the Fourthwall fetch into merch.data.ts, so the products come from the same .data.ts pattern as the other build-time data. Drops the prebuild:merch script and the gitignored merchData.json. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01G9u8FiGcimashQWZ7MEP1h * Dynamic load merch component --------- Co-authored-by: Claude --- .../theme/components/home/HomeTeamSection.vue | 6 +- .../components/icons/CarbonAdOverlay.vue | 14 +- .../theme/components/merch/MerchAd.vue | 322 ++++++++++++++++++ .../theme/components/merch/merch.data.ts | 125 +++++++ .../theme/components/merch/merch.ts | 26 ++ .../components/overrides/VPCarbonAds.vue | 38 ++- 6 files changed, 514 insertions(+), 17 deletions(-) create mode 100644 docs/.vitepress/theme/components/merch/MerchAd.vue create mode 100644 docs/.vitepress/theme/components/merch/merch.data.ts create mode 100644 docs/.vitepress/theme/components/merch/merch.ts diff --git a/docs/.vitepress/theme/components/home/HomeTeamSection.vue b/docs/.vitepress/theme/components/home/HomeTeamSection.vue index e00240530..01e4f31c3 100644 --- a/docs/.vitepress/theme/components/home/HomeTeamSection.vue +++ b/docs/.vitepress/theme/components/home/HomeTeamSection.vue @@ -6,9 +6,13 @@ import TeamMemberCard, { TeamMember } from './TeamMemberCard.vue' import teamData from '../../../data/teamData.json' import HomeSponsorCard from './HomeSponsorCard.vue'; import VPDocAsideCarbonAds from 'vitepress/dist/client/theme-default/components/VPDocAsideCarbonAds.vue' - +import { provide } from 'vue' +import { merchLayoutKey } from '../merch/merch' const { theme } = useData() + +// The wide ad card here shows two merch items side by side when Carbon is blocked. +provide(merchLayoutKey, 'pair')