From acbde7bcf8783834eea8d30c32ba73da1480c09f Mon Sep 17 00:00:00 2001
From: Ngo Quoc Dat
Date: Sat, 28 Nov 2026 19:54:23 +0700
Subject: [PATCH 1/2] feat(campaign): a Black Friday notice on load, and no
dot, arrow or glow on the sale
- CampaignNotice opens once per page load while the sale is live: a modal
dialog from 640px (the two offers, the countdown, Buy Pro one-time, See both
offers, Not now), a non-blocking card at the bottom below it.
- It stays shut on /black-friday and Pricing (the banner prop's `notice`),
while the consent bar asks, for a reader whose regional discount takes
more off, and once closed: `tablepro:campaign-closed` holds `{id}:notice`,
which keeps the banner; closing the banner still closes both.
- The sale's banner, the license banner, the language bar and /black-friday
lose the accent dot, the trailing arrows, the glow and the light under the
pointer. The banner writes its call to action out at every width.
- The language bar now takes the slot from the sale's banner: the rule that
hid it lost on specificity, so both bars stacked.
---
app/Support/Banner.php | 24 +-
docs/architecture.md | 6 +-
docs/rebuild/design/design-system.md | 2 +-
docs/rebuild/design/positioning.md | 9 +
resources/css/app.css | 48 +--
.../components/campaign/campaign-banner.tsx | 19 +-
.../components/campaign/campaign-ground.tsx | 26 +-
.../components/campaign/campaign-notice.tsx | 372 ++++++++++++++++++
.../js/components/campaign/countdown.tsx | 25 +-
.../js/components/campaign/pro-features.tsx | 5 +-
resources/js/components/site/language-bar.tsx | 3 +-
.../js/components/site/support-banner.tsx | 4 +-
resources/js/hooks/use-regional-pricing.ts | 19 +-
resources/js/i18n/messages/de/campaign.ts | 14 +
resources/js/i18n/messages/en/campaign.ts | 17 +-
resources/js/i18n/messages/es/campaign.ts | 14 +
resources/js/i18n/messages/fr/campaign.ts | 14 +
resources/js/i18n/messages/id/campaign.ts | 14 +
resources/js/i18n/messages/it/campaign.ts | 14 +
resources/js/i18n/messages/ja/campaign.ts | 14 +
resources/js/i18n/messages/ko/campaign.ts | 14 +
resources/js/i18n/messages/pt-BR/campaign.ts | 14 +
resources/js/i18n/messages/vi/campaign.ts | 14 +
.../js/i18n/messages/zh-Hans/campaign.ts | 14 +
.../js/i18n/messages/zh-Hant/campaign.ts | 14 +
resources/js/layouts/landing-layout.tsx | 2 +
resources/js/lib/campaign.ts | 25 ++
resources/js/pages/BlackFriday.tsx | 6 +-
resources/js/types/shared-props.ts | 6 +-
tests/Feature/Pages/CampaignTest.php | 6 +-
tests/js/campaign.test.ts | 37 +-
31 files changed, 713 insertions(+), 102 deletions(-)
create mode 100644 resources/js/components/campaign/campaign-notice.tsx
diff --git a/app/Support/Banner.php b/app/Support/Banner.php
index 48594c10..ef7a2bc2 100644
--- a/app/Support/Banner.php
+++ b/app/Support/Banner.php
@@ -44,6 +44,14 @@ final class Banner
*/
public const CAMPAIGN_PAGE = 'landing.black-friday';
+ /**
+ * Base route names where the sale's banner shows but its notice does not
+ * open over the page: Pricing already carries the sale on its plan cards.
+ *
+ * @var list
+ */
+ public const CAMPAIGN_NOTICE_HIDDEN_ON = ['landing.pricing'];
+
public const KIND_CAMPAIGN = 'campaign';
public const KIND_LICENSE = 'license';
@@ -75,15 +83,23 @@ public static function hiddenOnIosDevices(Request $request): bool
/**
* The shared `banner` prop, or null where no banner is on this page. Null
* rather than a flag, so the component renders nothing at all. Only which
- * banner and its link: the words are the `banner` and `campaign` catalogs',
- * and neither banner can be closed, so there is no version to close it at.
+ * banner and its link: the words are the `banner` and `campaign` catalogs'.
+ * The license banner cannot be closed, so there is no version to close it at.
+ *
+ * The sale's carries `notice`: whether its notice (`CampaignNotice`) may
+ * open over this page on load. Whether it does is the reader's browser's
+ * call, since the page sits in the edge cache.
*
- * @return array{kind: string, href: string}|null
+ * @return array{kind: string, href: string, notice?: bool}|null
*/
public static function forRequest(Request $request): ?array
{
return match (self::kind($request)) {
- self::KIND_CAMPAIGN => ['kind' => self::KIND_CAMPAIGN, 'href' => '/black-friday'],
+ self::KIND_CAMPAIGN => [
+ 'kind' => self::KIND_CAMPAIGN,
+ 'href' => '/black-friday',
+ 'notice' => ! in_array(self::page($request), self::CAMPAIGN_NOTICE_HIDDEN_ON, true),
+ ],
self::KIND_LICENSE => ['kind' => self::KIND_LICENSE, 'href' => (string) config('banner.href')],
default => null,
};
diff --git a/docs/architecture.md b/docs/architecture.md
index 42638dd9..3e54448e 100644
--- a/docs/architecture.md
+++ b/docs/architecture.md
@@ -400,7 +400,11 @@ Events keep the names the Plausible goals had: `download_click` (`location`,
`newsletter_signup_clicked` (`source`). The license banner adds
`license_banner_view` and `license_banner_click`, without parameters, so a
banner's clicks can be compared with its views and with `checkout_started`.
-It cannot be closed, so there is no dismiss event. GA4 stores the parameters
+It cannot be closed, so there is no dismiss event. The dated sale's banner sends
+`campaign_banner_view`, `campaign_banner_click` and `campaign_banner_close`;
+its notice (`CampaignNotice`) sends `campaign_notice_view` (`kind`: `dialog`
+or `card`), `campaign_notice_click` (`action`: `buy`, `both` or `deal`) and
+`campaign_notice_close` (`action`: what closed it). GA4 stores the parameters
from the first hit but only shows them in reports once each is registered as
an event-scoped custom dimension under Admin → Custom definitions. Page changes
between Inertia visits are counted by enhanced measurement's "page changes
diff --git a/docs/rebuild/design/design-system.md b/docs/rebuild/design/design-system.md
index 1a043c1c..b7bb758f 100644
--- a/docs/rebuild/design/design-system.md
+++ b/docs/rebuild/design/design-system.md
@@ -1040,6 +1040,7 @@ One shared file, `components/shared/theme-control.tsx` (architecture §1.10 and
- Actions are right-aligned: **Cancel** (`quiet`, default focus on destructive dialogs), then **confirm** (`danger` or `primary`).
- Below 480 the actions stack full width in the same order.
- Escape cancels. The confirm button shows a busy state; on error the dialog stays open with an inline `Callout danger`.
+- The dated sale's notice (`CampaignNotice`, positioning "Dated sales") is the one dialog outside this shape: 520px, on the sale's black ground, focus on the dialog itself when it opens, one `primary` action full width and `Not now` as `quiet`. Escape, the backdrop and every action close it.
**Toast:**
@@ -1325,7 +1326,6 @@ The ceiling drops from 320ms to 240ms, and `--dur-row` goes with the row bar.
- **The load sequence,** once per visit: the headline settles (`sale-rise`, 560ms, `--ease-panel`), a drawn line strikes the list prices, then the sale prices arrive. Under a second in all.
- **The countdown digits roll**, each one only when it changes (`roll-in`, `roll-out`, 320ms).
-- **The light under the pointer** (`campaign-spot`): a 30rem accent radial at 13% that follows a mouse, never a finger, and fades out when the pointer leaves.
- **The Pro capture crossfade** (`sale-stage`, `--dur-panel`): only when the reader picks another feature.
**Pricing** (owner decision, 2026-11-06), on the plan block wherever it shows (/pricing, the homepage, /teams), never under reduced motion:
diff --git a/docs/rebuild/design/positioning.md b/docs/rebuild/design/positioning.md
index 711c254e..2ba09cc4 100644
--- a/docs/rebuild/design/positioning.md
+++ b/docs/rebuild/design/positioning.md
@@ -446,6 +446,15 @@ says what a discount takes off and how long is left. It is a real discount at th
prices, with a code that works only inside the window (`App\Support\Pricing\Campaign`, `lib/campaign.ts`).
- **Where, while it is live:** the banner slot on every page but the sale's own, and the plan cards of the cycles it
covers. No band above a page's hero (owner, 2026-11-23). Checkout from the site attaches the code.
+- **The notice** (owner, 2026-11-28, `CampaignNotice`): once per page load, as the page opens. From 640px a modal
+ dialog on the black ground: the percentage off, the two offers as ruled rows with their struck prices, the
+ countdown, a button that buys Pro one-time at its sale price, a link to the sale's page and "Not now". Below
+ 640px a card at the bottom of the screen that blocks nothing (Google's guidance on intrusive dialogs): the
+ percentage, Pro one-time's sale price, the countdown and the sale's page. It never opens on the sale's page or
+ Pricing, while the consent bar is asking (one thing asks at a time), for a reader whose regional discount takes
+ more off, or again once the reader has answered it, a click on an offer included: closing it or the banner closes
+ it for the rest of the sale (`tablepro:campaign-closed`). No coloured dot, glow or accent rule on it; the accent
+ is the one button.
Before and after the window, only the sale's own page mentions it.
- **The sale's own page,** `/black-friday`, keeps one URL from year to year and is black throughout, in both themes. Before the sale it states the window and
the prices, and offers a calendar file for the start instead of a button that cannot be pressed; during it the offers
diff --git a/resources/css/app.css b/resources/css/app.css
index 7a2e6826..345281d7 100644
--- a/resources/css/app.css
+++ b/resources/css/app.css
@@ -222,7 +222,13 @@ html.has-language-bar .support-banner {
* The banner and the sale page's ground are an island of the dark theme
* whatever the reader chose: the element carries `.dark`, so every token
* inside resolves to its dark value and the design system's text pairs hold.
- * The glow is the brand hue thinning out from the top right. Positioning §12.2.
+ * Flat black: no glow and no light under the pointer (owner, 2026-11-28), as
+ * the accent never colours a glow (design-system §1). Positioning §12.2.
+ *
+ * The slot holds one bar: the language bar, when it shows, takes it from the
+ * sale's banner as it does from the license banner. The rule names all three
+ * classes so it outweighs the one that shows the banner; with only
+ * `has-language-bar` it lost on specificity and both bars stacked.
*/
.campaign-banner {
display: none;
@@ -233,7 +239,7 @@ html.has-banner.campaign-live .campaign-banner {
height: var(--banner-h);
}
-html.has-language-bar .campaign-banner {
+html.has-language-bar.has-banner.campaign-live .campaign-banner {
display: none;
}
@@ -259,20 +265,6 @@ html[data-theme-forced] .theme-setting {
border-bottom: 1px solid color-mix(in oklab, var(--accent) 45%, var(--rule));
}
-.campaign-glow {
- background-image: radial-gradient(
- 56rem 28rem at 100% 0%,
- color-mix(in oklab, var(--accent) 16%, transparent),
- transparent 70%
- );
-}
-
-@media (forced-colors: active) {
- .campaign-glow {
- background-image: none;
- }
-}
-
/* The global rails are drawn in the page's theme; on the black ground they would be a light line in the light theme. */
.campaign-rails {
position: absolute;
@@ -302,30 +294,6 @@ html[data-theme-forced] .theme-setting {
}
}
-/* The light under the pointer on the sale's black ground. Mouse only. */
-.campaign-spot {
- position: absolute;
- inset: 0;
- pointer-events: none;
- opacity: 0;
- background: radial-gradient(
- 30rem circle at var(--spot-x, 50%) var(--spot-y, 50%),
- color-mix(in oklab, var(--accent) 13%, transparent),
- transparent 70%
- );
- transition: opacity var(--dur-panel) var(--ease-feedback);
-}
-
-[data-spot="on"] > .campaign-spot {
- opacity: 1;
-}
-
-@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce), (forced-colors: active) {
- .campaign-spot {
- display: none;
- }
-}
-
.sale-display {
font-size: clamp(3.5rem, 15vw, 9.5rem);
line-height: 0.92;
diff --git a/resources/js/components/campaign/campaign-banner.tsx b/resources/js/components/campaign/campaign-banner.tsx
index 2a754976..4f49c8c6 100644
--- a/resources/js/components/campaign/campaign-banner.tsx
+++ b/resources/js/components/campaign/campaign-banner.tsx
@@ -8,7 +8,8 @@ import { trackEvent } from '@/lib/analytics';
import { PRICING } from '@/lib/data/pricing';
import Countdown from './countdown';
-// Local storage: the id of the sale whose banner the reader closed. Listed in the privacy policy.
+// Local storage: the id of the sale whose banner the reader closed, or `{id}:notice` once they closed only its notice
+// (`noticeClosedValue`, CampaignNotice). Listed in the privacy policy as the closed sale notice.
export const CLOSED_KEY = 'tablepro:campaign-closed';
// Closable, because its countdown updates by itself on every page (WCAG 2.2.2).
@@ -55,19 +56,15 @@ export default function CampaignBanner() {
trackEvent('campaign_banner_click')}
- className="type-small flex h-full min-w-0 flex-1 items-center gap-x-3 whitespace-nowrap no-underline"
+ className="type-small flex h-full min-w-0 flex-1 items-center gap-x-2 whitespace-nowrap no-underline sm:gap-x-3"
>
-
-
- {m.campaign.name}
-
+ {m.campaign.name}{fmt(copy.message, { percent: campaign.percent })}
- {fmt(copy.short, { percent: campaign.percent })}
+ {/* Below 360px the name and the call to action are what fits. */}
+ {fmt(copy.short, { percent: campaign.percent })}
-
- {copy.cta}
- →
-
+ {/* Written out at every width, with no arrow or dot: the words say where it leads. */}
+ {copy.cta}
trackEvent('license_banner_click')}
- className={textLinkClasses('standalone', 'relative whitespace-nowrap after:absolute after:-inset-x-1 after:-inset-y-3')}
+ // Underlined, with no arrow: it follows the banner's sentence, so colour alone would not mark it (WCAG 1.4.1).
+ className={textLinkClasses('standalone', 'relative whitespace-nowrap underline underline-offset-3 after:absolute after:-inset-x-1 after:-inset-y-3')}
>
{m.banner.cta}
- →
diff --git a/resources/js/hooks/use-regional-pricing.ts b/resources/js/hooks/use-regional-pricing.ts
index 0c89003a..14bd7b6a 100644
--- a/resources/js/hooks/use-regional-pricing.ts
+++ b/resources/js/hooks/use-regional-pricing.ts
@@ -7,9 +7,12 @@ interface PricingAnswer {
regional: Regional | null;
teamMaxSeats: Partial>;
educationOpen: boolean;
+ /** False until GET /v2/pricing answers or fails. */
+ settled: boolean;
}
-const NO_ANSWER: PricingAnswer = { regional: null, teamMaxSeats: {}, educationOpen: false };
+const NO_ANSWER: PricingAnswer = { regional: null, teamMaxSeats: {}, educationOpen: false, settled: true };
+const WAITING: PricingAnswer = { ...NO_ANSWER, settled: false };
let pending: Promise | null = null;
@@ -30,6 +33,7 @@ function fetchPricing(api: (path: ApiPath) => string): Promise {
regional: parseRegional(body, LIST_CENTS),
teamMaxSeats: parseSeatMaximums(body, 'team', PRICING.tiers.team.seats.min),
educationOpen: parseEducationOpen(body),
+ settled: true,
}))
.catch(() => NO_ANSWER);
@@ -38,7 +42,7 @@ function fetchPricing(api: (path: ApiPath) => string): Promise {
function usePricingAnswer(): PricingAnswer {
const api = useApi();
- const [answer, setAnswer] = useState(NO_ANSWER);
+ const [answer, setAnswer] = useState(WAITING);
useEffect(() => {
let active = true;
@@ -62,6 +66,17 @@ export function useRegionalPricing(): Regional | null {
return usePricingAnswer().regional;
}
+/**
+ * The regional discount once GET /v2/pricing has answered, or failed (then
+ * null): undefined until then. For what must not show a sale price before it
+ * knows whether a larger regional discount applies (`CampaignNotice`).
+ */
+export function useSettledRegionalPricing(): Regional | null | undefined {
+ const answer = usePricingAnswer();
+
+ return answer.settled ? answer.regional : undefined;
+}
+
// Empty until GET /v2/pricing answers, and for a cycle Polar sets no limit for: the seat field then has no maximum.
export function useTeamMaxSeats(): Partial> {
return usePricingAnswer().teamMaxSeats;
diff --git a/resources/js/i18n/messages/de/campaign.ts b/resources/js/i18n/messages/de/campaign.ts
index 3c49ebdd..98c0747a 100644
--- a/resources/js/i18n/messages/de/campaign.ts
+++ b/resources/js/i18n/messages/de/campaign.ts
@@ -33,5 +33,19 @@ export default {
"minutes": "Min.",
"seconds": "Sek."
}
+ },
+ "notice": {
+ "headline": "{percent} % Rabatt",
+ "product": "TablePro Pro",
+ "window": "Pro einmalig und Pro jährlich, bis zum {endsOn}, {endsAtTime} UTC.",
+ "lifetime": "Pro einmalig",
+ "lifetimeDetail": "Einmalige Zahlung. Alle Updates und neuen Pro-Funktionen.",
+ "yearly": "Pro jährlich",
+ "buy": "Pro einmalig für {price} kaufen",
+ "both": "Beide Angebote ansehen",
+ "later": "Nicht jetzt",
+ "footnote": "Pro monatlich und Team sind nicht reduziert. Reguläre Preise seit dem {listPriceSince}.",
+ "card": "Black Friday: {percent} % Rabatt auf Pro",
+ "cardPrice": "Pro einmalig für {price}."
}
} satisfies Messages['campaign'];
diff --git a/resources/js/i18n/messages/en/campaign.ts b/resources/js/i18n/messages/en/campaign.ts
index 77ed3c22..d247faf1 100644
--- a/resources/js/i18n/messages/en/campaign.ts
+++ b/resources/js/i18n/messages/en/campaign.ts
@@ -1,5 +1,5 @@
// Positioning "Dated sales": say what it takes off as "% off" and how long is left. Never "save N%", never the regional discount.
-// Display columns (CJK counts two): `name` + `banner.message` + `banner.cta` within 64 from 1024px, `banner.short` within 14 below it.
+// Display columns (CJK counts two): `name` + `banner.message` + `banner.cta` within 64 from 1024px; below it `name` + `banner.short` + `banner.cta` within 36, to fit 360px.
export default {
name: 'Black Friday',
banner: {
@@ -31,4 +31,19 @@ export default {
seconds: 'sec',
},
},
+ // The sale's notice (CampaignNotice): a dialog from 640px, a card at the bottom below it. Plan names stay as on the sale's page.
+ notice: {
+ headline: '{percent}% off',
+ product: 'TablePro Pro',
+ window: 'Pro one-time and Pro yearly, until {endsOn}, {endsAtTime} UTC.',
+ lifetime: 'Pro one-time',
+ lifetimeDetail: 'Paid once. Every update and new Pro feature.',
+ yearly: 'Pro yearly',
+ buy: 'Buy Pro one-time for {price}',
+ both: 'See both offers',
+ later: 'Not now',
+ footnote: 'Pro monthly and Team are not on sale. Regular prices since {listPriceSince}.',
+ card: 'Black Friday: {percent}% off Pro',
+ cardPrice: 'Pro one-time for {price}.',
+ },
};
diff --git a/resources/js/i18n/messages/es/campaign.ts b/resources/js/i18n/messages/es/campaign.ts
index 38e35c46..8b3fa506 100644
--- a/resources/js/i18n/messages/es/campaign.ts
+++ b/resources/js/i18n/messages/es/campaign.ts
@@ -33,5 +33,19 @@ export default {
"minutes": "min",
"seconds": "s"
}
+ },
+ "notice": {
+ "headline": "−{percent}%",
+ "product": "TablePro Pro",
+ "window": "Pro de pago único y Pro anual, hasta las {endsAtTime} UTC del {endsOn}.",
+ "lifetime": "Pro de pago único",
+ "lifetimeDetail": "Pago único. Todas las actualizaciones y funciones nuevas de Pro.",
+ "yearly": "Pro anual",
+ "buy": "Comprar Pro de pago único por {price}",
+ "both": "Ver las dos ofertas",
+ "later": "Ahora no",
+ "footnote": "Pro mensual y Team no tienen descuento. Precios habituales desde el {listPriceSince}.",
+ "card": "Black Friday: −{percent}% en Pro",
+ "cardPrice": "Pro de pago único por {price}."
}
} satisfies Messages['campaign'];
diff --git a/resources/js/i18n/messages/fr/campaign.ts b/resources/js/i18n/messages/fr/campaign.ts
index 89530d2f..2e84a5f3 100644
--- a/resources/js/i18n/messages/fr/campaign.ts
+++ b/resources/js/i18n/messages/fr/campaign.ts
@@ -33,5 +33,19 @@ export default {
"minutes": "min",
"seconds": "s"
}
+ },
+ "notice": {
+ "headline": "−{percent} %",
+ "product": "TablePro Pro",
+ "window": "Pro en paiement unique et Pro annuel, jusqu’au {endsOn} à {endsAtTime} UTC.",
+ "lifetime": "Pro en paiement unique",
+ "lifetimeDetail": "Paiement unique. Toutes les mises à jour et nouvelles fonctions Pro.",
+ "yearly": "Pro annuel",
+ "buy": "Acheter Pro en paiement unique pour {price}",
+ "both": "Voir les deux offres",
+ "later": "Pas maintenant",
+ "footnote": "Pro mensuel et Team ne sont pas en promotion. Prix habituels depuis le {listPriceSince}.",
+ "card": "Black Friday : −{percent} % sur Pro",
+ "cardPrice": "Pro en paiement unique pour {price}."
}
} satisfies Messages['campaign'];
diff --git a/resources/js/i18n/messages/id/campaign.ts b/resources/js/i18n/messages/id/campaign.ts
index dfe17b9f..75a91dec 100644
--- a/resources/js/i18n/messages/id/campaign.ts
+++ b/resources/js/i18n/messages/id/campaign.ts
@@ -33,4 +33,18 @@ export default {
"seconds": "detik",
},
},
+ "notice": {
+ "headline": "Diskon {percent}%",
+ "product": "TablePro Pro",
+ "window": "Pro sekali bayar dan Pro tahunan, hingga {endsOn}, pukul {endsAtTime} UTC.",
+ "lifetime": "Pro sekali bayar",
+ "lifetimeDetail": "Sekali bayar. Semua pembaruan dan fitur Pro baru.",
+ "yearly": "Pro tahunan",
+ "buy": "Beli Pro sekali bayar seharga {price}",
+ "both": "Lihat kedua penawaran",
+ "later": "Nanti saja",
+ "footnote": "Pro bulanan dan Team tidak termasuk promo. Harga normal sejak {listPriceSince}.",
+ "card": "Black Friday: diskon {percent}% Pro",
+ "cardPrice": "Pro sekali bayar seharga {price}."
+ },
} satisfies Messages['campaign'];
diff --git a/resources/js/i18n/messages/it/campaign.ts b/resources/js/i18n/messages/it/campaign.ts
index f328b445..0a4b7683 100644
--- a/resources/js/i18n/messages/it/campaign.ts
+++ b/resources/js/i18n/messages/it/campaign.ts
@@ -33,5 +33,19 @@ export default {
"minutes": "min",
"seconds": "sec"
}
+ },
+ "notice": {
+ "headline": "−{percent}%",
+ "product": "TablePro Pro",
+ "window": "Pro una tantum e Pro annuale, fino al {endsOn} alle {endsAtTime} UTC.",
+ "lifetime": "Pro una tantum",
+ "lifetimeDetail": "Un solo pagamento. Tutti gli aggiornamenti e le nuove funzionalità Pro.",
+ "yearly": "Pro annuale",
+ "buy": "Acquista Pro una tantum a {price}",
+ "both": "Vedi le due offerte",
+ "later": "Non ora",
+ "footnote": "Pro mensile e Team non sono in promozione. Prezzi di listino dal {listPriceSince}.",
+ "card": "Black Friday: −{percent}% su Pro",
+ "cardPrice": "Pro una tantum a {price}."
}
} satisfies Messages['campaign'];
diff --git a/resources/js/i18n/messages/ja/campaign.ts b/resources/js/i18n/messages/ja/campaign.ts
index 55578081..6958eeb0 100644
--- a/resources/js/i18n/messages/ja/campaign.ts
+++ b/resources/js/i18n/messages/ja/campaign.ts
@@ -33,4 +33,18 @@ export default {
"seconds": "秒",
},
},
+ "notice": {
+ "headline": "{percent}% オフ",
+ "product": "TablePro Pro",
+ "window": "Pro 買い切りと Pro 年払い、{endsOn} {endsAtTime} UTC まで。",
+ "lifetime": "Pro 買い切り",
+ "lifetimeDetail": "一度のお支払い。すべてのアップデートと Pro の新機能。",
+ "yearly": "Pro 年払い",
+ "buy": "Pro 買い切りを {price} で購入",
+ "both": "両方のプランを見る",
+ "later": "今はしない",
+ "footnote": "Pro 月払いと Team はセールの対象外です。通常価格は {listPriceSince} から適用されています。",
+ "card": "Black Friday:Pro {percent}% オフ",
+ "cardPrice": "Pro 買い切りが {price}。"
+ },
} satisfies Messages['campaign'];
diff --git a/resources/js/i18n/messages/ko/campaign.ts b/resources/js/i18n/messages/ko/campaign.ts
index 72ad80e8..72617a93 100644
--- a/resources/js/i18n/messages/ko/campaign.ts
+++ b/resources/js/i18n/messages/ko/campaign.ts
@@ -33,4 +33,18 @@ export default {
"seconds": "초",
},
},
+ "notice": {
+ "headline": "{percent}% 할인",
+ "product": "TablePro Pro",
+ "window": "Pro 일회성과 Pro 연간, {endsOn} {endsAtTime} UTC까지.",
+ "lifetime": "Pro 일회성",
+ "lifetimeDetail": "일회 결제. 모든 업데이트와 새로운 Pro 기능.",
+ "yearly": "Pro 연간",
+ "buy": "Pro 일회성을 {price}에 구매",
+ "both": "두 가지 혜택 보기",
+ "later": "나중에",
+ "footnote": "Pro 월간과 Team은 할인 대상이 아닙니다. 정가는 {listPriceSince}부터 적용되었습니다.",
+ "card": "Black Friday: Pro {percent}% 할인",
+ "cardPrice": "Pro 일회성 {price}."
+ },
} satisfies Messages['campaign'];
diff --git a/resources/js/i18n/messages/pt-BR/campaign.ts b/resources/js/i18n/messages/pt-BR/campaign.ts
index 72668a04..061f5f52 100644
--- a/resources/js/i18n/messages/pt-BR/campaign.ts
+++ b/resources/js/i18n/messages/pt-BR/campaign.ts
@@ -33,5 +33,19 @@ export default {
"minutes": "min",
"seconds": "seg"
}
+ },
+ "notice": {
+ "headline": "−{percent}%",
+ "product": "TablePro Pro",
+ "window": "Pro de pagamento único e Pro anual, até {endsOn}, às {endsAtTime} UTC.",
+ "lifetime": "Pro de pagamento único",
+ "lifetimeDetail": "Pagamento único. Todas as atualizações e novos recursos do Pro.",
+ "yearly": "Pro anual",
+ "buy": "Comprar Pro de pagamento único por {price}",
+ "both": "Ver as duas ofertas",
+ "later": "Agora não",
+ "footnote": "O Pro mensal e o Team não estão em promoção. Preços normais desde {listPriceSince}.",
+ "card": "Black Friday: −{percent}% no Pro",
+ "cardPrice": "Pro de pagamento único por {price}."
}
} satisfies Messages['campaign'];
diff --git a/resources/js/i18n/messages/vi/campaign.ts b/resources/js/i18n/messages/vi/campaign.ts
index 15356182..c043c3d8 100644
--- a/resources/js/i18n/messages/vi/campaign.ts
+++ b/resources/js/i18n/messages/vi/campaign.ts
@@ -31,4 +31,18 @@ export default {
seconds: 'giây',
},
},
+ notice: {
+ headline: 'Giảm {percent}%',
+ product: 'TablePro Pro',
+ window: 'Pro mua một lần và Pro theo năm, đến {endsAtTime} UTC ngày {endsOn}.',
+ lifetime: 'Pro mua một lần',
+ lifetimeDetail: 'Trả một lần. Mọi bản cập nhật và tính năng Pro mới.',
+ yearly: 'Pro theo năm',
+ buy: 'Mua gói Pro mua một lần với giá {price}',
+ both: 'Xem cả hai ưu đãi',
+ later: 'Để sau',
+ footnote: 'Pro theo tháng và Team không được giảm giá. Giá thường áp dụng từ {listPriceSince}.',
+ card: 'Black Friday: giảm {percent}% Pro',
+ cardPrice: 'Pro mua một lần giá {price}.',
+ },
} satisfies Messages['campaign'];
diff --git a/resources/js/i18n/messages/zh-Hans/campaign.ts b/resources/js/i18n/messages/zh-Hans/campaign.ts
index 78ef33d6..ef47063b 100644
--- a/resources/js/i18n/messages/zh-Hans/campaign.ts
+++ b/resources/js/i18n/messages/zh-Hans/campaign.ts
@@ -33,4 +33,18 @@ export default {
"seconds": "秒",
},
},
+ "notice": {
+ "headline": "{percent}% 折扣",
+ "product": "TablePro Pro",
+ "window": "Pro 一次性和 Pro 年付,{endsOn} {endsAtTime} UTC 截止。",
+ "lifetime": "Pro 一次性",
+ "lifetimeDetail": "一次付费。包含所有更新和新增的 Pro 功能。",
+ "yearly": "Pro 年付",
+ "buy": "以 {price} 购买 Pro 一次性",
+ "both": "查看两种优惠",
+ "later": "以后再说",
+ "footnote": "Pro 月付和 Team 不参加此次优惠。原价自 {listPriceSince} 起执行。",
+ "card": "Black Friday:Pro {percent}% 折扣",
+ "cardPrice": "Pro 一次性 {price}。"
+ },
} satisfies Messages['campaign'];
diff --git a/resources/js/i18n/messages/zh-Hant/campaign.ts b/resources/js/i18n/messages/zh-Hant/campaign.ts
index 87e2af94..30bf5c47 100644
--- a/resources/js/i18n/messages/zh-Hant/campaign.ts
+++ b/resources/js/i18n/messages/zh-Hant/campaign.ts
@@ -33,4 +33,18 @@ export default {
"seconds": "秒",
},
},
+ "notice": {
+ "headline": "{percent}% 折扣",
+ "product": "TablePro Pro",
+ "window": "Pro 一次性與 Pro 年付,{endsOn} {endsAtTime} UTC 截止。",
+ "lifetime": "Pro 一次性",
+ "lifetimeDetail": "一次付費。包含所有更新和新增的 Pro 功能。",
+ "yearly": "Pro 年付",
+ "buy": "以 {price} 購買 Pro 一次性",
+ "both": "查看兩種優惠",
+ "later": "以後再說",
+ "footnote": "Pro 月付與 Team 不在此次優惠範圍內。原價自 {listPriceSince} 起實施。",
+ "card": "Black Friday:Pro {percent}% 折扣",
+ "cardPrice": "Pro 一次性 {price}。"
+ },
} satisfies Messages['campaign'];
diff --git a/resources/js/layouts/landing-layout.tsx b/resources/js/layouts/landing-layout.tsx
index b731e815..25956b9f 100644
--- a/resources/js/layouts/landing-layout.tsx
+++ b/resources/js/layouts/landing-layout.tsx
@@ -1,5 +1,6 @@
import { useEffect, useLayoutEffect, type ReactNode } from 'react';
import { useLiveChat } from '@/components/site/chat-button';
+import CampaignNotice from '@/components/campaign/campaign-notice';
import ConsentBar from '@/components/site/consent-bar';
import FrameRails from '@/components/shared/frame-rails';
import SiteFooter from '@/components/site/site-footer';
@@ -48,6 +49,7 @@ export default function LandingLayout({ children, footerNewsletter = true, alway
+
);
}
diff --git a/resources/js/lib/campaign.ts b/resources/js/lib/campaign.ts
index f8a14e4c..d9bc134e 100644
--- a/resources/js/lib/campaign.ts
+++ b/resources/js/lib/campaign.ts
@@ -81,6 +81,31 @@ export function offerFor(
return { code: campaign.code, percent: campaign.percent, firstChargeOnly: cycle !== 'lifetime' };
}
+/**
+ * What `tablepro:campaign-closed` holds once a reader closes the sale's notice
+ * (`CampaignNotice`): the notice stays closed for the rest of the sale, and the
+ * banner stays. Closing the banner stores the bare id, which closes both.
+ */
+export function noticeClosedValue(campaign: CampaignData): string {
+ return `${campaign.id}:notice`;
+}
+
+/** Whether the stored value closes the sale's notice: the reader closed it, or the banner. */
+export function noticeClosed(campaign: CampaignData, stored: string | null): boolean {
+ return stored === campaign.id || stored === noticeClosedValue(campaign);
+}
+
+/**
+ * Whether the sale's notice may open for this reader: the sale is live and
+ * its lead offer, Pro one-time, applies to them. A reader whose regional
+ * discount takes more off would be shown a price checkout does not charge,
+ * and the regional discount is never named outside the plan block, so for
+ * them the notice stays shut.
+ */
+export function noticeOpens(campaign: CampaignData | null, phase: CampaignPhase | null, regionalPercent: number | null): boolean {
+ return offerFor(campaign, phase, campaign?.tier ?? '', 'lifetime', regionalPercent) !== null;
+}
+
export interface Remaining {
days: number;
hours: number;
diff --git a/resources/js/pages/BlackFriday.tsx b/resources/js/pages/BlackFriday.tsx
index 195ff7dc..ed4b669f 100644
--- a/resources/js/pages/BlackFriday.tsx
+++ b/resources/js/pages/BlackFriday.tsx
@@ -138,10 +138,7 @@ export default function BlackFriday({ content, paidFeatures, organizationProfile
) : (
diff --git a/resources/js/types/shared-props.ts b/resources/js/types/shared-props.ts
index 4c816fde..cfc6b629 100644
--- a/resources/js/types/shared-props.ts
+++ b/resources/js/types/shared-props.ts
@@ -38,12 +38,14 @@ export interface SwitcherItem {
/**
* Which banner holds the slot above the header, and its link: the license
* banner, or the dated sale's while it is live (`App\Support\Banner`). The
- * words are the `banner` and `campaign` catalogs'. Neither can be closed, so
- * there is no version.
+ * words are the `banner` and `campaign` catalogs'. The license banner cannot
+ * be closed, so there is no version.
*/
export interface BannerProp {
kind: 'license' | 'campaign';
href: string;
+ /** The sale's banner only: whether its notice (`CampaignNotice`) may open over this page. */
+ notice?: boolean;
}
/**
diff --git a/tests/Feature/Pages/CampaignTest.php b/tests/Feature/Pages/CampaignTest.php
index c72f635f..8ed4436b 100644
--- a/tests/Feature/Pages/CampaignTest.php
+++ b/tests/Feature/Pages/CampaignTest.php
@@ -74,14 +74,14 @@ function afterSale(): void
'at the end' => ['end', Campaign::ENDED],
]);
-it('takes the banner slot while it is live, on every page but its own', function (string $prefix): void {
+it('takes the banner slot while it is live, on every page but its own, with its notice on all but Pricing', function (string $prefix): void {
travelTo(saleCampaign()->startsAt);
- foreach (['/download', '/pricing', ''] as $path) {
+ foreach (['/download' => true, '/pricing' => false, '' => true] as $path => $notice) {
$response = get("{$prefix}{$path}" ?: '/')->assertOk();
expect($response->getContent())->toMatch('/]*class="has-banner campaign-live"/');
- $response->assertInertia(fn(AssertableInertia $page) => $page->where('banner', ['kind' => 'campaign', 'href' => '/black-friday']));
+ $response->assertInertia(fn(AssertableInertia $page) => $page->where('banner', ['kind' => 'campaign', 'href' => '/black-friday', 'notice' => $notice]));
}
$own = get("{$prefix}/black-friday")->assertOk();
diff --git a/tests/js/campaign.test.ts b/tests/js/campaign.test.ts
index 3671b871..0bc43207 100644
--- a/tests/js/campaign.test.ts
+++ b/tests/js/campaign.test.ts
@@ -1,7 +1,8 @@
import { test } from 'node:test';
import assert from 'node:assert/strict';
+import { readFileSync } from 'node:fs';
-import { calendarHref, offerFor, phaseAt, remaining, shownPhase, type CampaignData } from '../../resources/js/lib/campaign.ts';
+import { calendarHref, noticeClosed, noticeClosedValue, noticeOpens, offerFor, phaseAt, remaining, shownPhase, type CampaignData } from '../../resources/js/lib/campaign.ts';
// The phase must match App\Support\Pricing\Campaign, and the offer the provider's discount.
const campaign: CampaignData = {
@@ -73,3 +74,37 @@ test('the calendar file is a half-hour event at the start, with an alert and esc
assert.ok(lines.includes('TRIGGER:PT0M'));
assert.equal(lines.at(-2), 'END:VCALENDAR');
});
+
+test('the notice opens only while the sale is live and its one-time offer applies', () => {
+ assert.equal(noticeOpens(campaign, 'live', null), true);
+ assert.equal(noticeOpens(campaign, 'live', 40), true);
+ assert.equal(noticeOpens(campaign, 'live', 50), false, 'a larger regional discount is never contradicted by the notice');
+ assert.equal(noticeOpens(campaign, 'upcoming', null), false);
+ assert.equal(noticeOpens(campaign, 'ended', null), false);
+ assert.equal(noticeOpens(null, 'live', null), false);
+ assert.equal(noticeOpens({ ...campaign, cycles: ['yearly'] }, 'live', null), false);
+});
+
+test('closing the notice keeps the banner, and closing the banner closes the notice too', () => {
+ assert.equal(noticeClosedValue(campaign), 'sale:notice');
+ assert.notEqual(noticeClosedValue(campaign), campaign.id, 'the head script hides the banner only for the bare id');
+ assert.equal(noticeClosed(campaign, null), false);
+ assert.equal(noticeClosed(campaign, 'sale:notice'), true);
+ assert.equal(noticeClosed(campaign, 'sale'), true);
+ assert.equal(noticeClosed(campaign, 'last-year'), false);
+ assert.equal(noticeClosed(campaign, 'last-year:notice'), false);
+});
+
+// The rule that shows the sale's banner names three classes; the one that hands its slot to the language bar must outweigh it.
+test('the language bar takes the slot from the sale\'s banner, so the two never stack', () => {
+ const css = readFileSync(new URL('../../resources/css/app.css', import.meta.url), 'utf8');
+ const specificity = (selector: string): number => (selector.match(/\.[\w-]+/g) ?? []).length;
+ const rule = (display: string): string | undefined =>
+ [...css.matchAll(/([^{}]+)\{([^{}]*)\}/g)].find(([, selector, body]) => selector.includes('.campaign-banner') && selector.includes('html.') && body.includes(`display: ${display}`))?.[1].trim();
+
+ const shows = rule('block');
+ const hides = [...css.matchAll(/([^{}]+)\{([^{}]*)\}/g)].find(([, selector, body]) => selector.includes('has-language-bar') && selector.includes('.campaign-banner') && body.includes('display: none'))?.[1].trim();
+
+ assert.ok(shows !== undefined && hides !== undefined, 'both rules exist');
+ assert.ok(specificity(hides) > specificity(shows), `${hides} must outweigh ${shows}`);
+});
From d46f8a1687ca329193b01d26879d7255beafbfce Mon Sep 17 00:00:00 2001
From: Ngo Quoc Dat
Date: Sat, 28 Nov 2026 19:59:57 +0700
Subject: [PATCH 2/2] feat(theme): light mode is light throughout, the sale
included
- The sale's banner, its notice and /black-friday follow the reader's theme
instead of holding a dark island in light mode (owner, 2026-11-28).
- The forced theme goes: no `data-theme-forced` from Blade, no `forceDark`
or `alwaysDark`, no sale `theme-color`, and the theme control shows on
every page again.
- The banner sits on `--surface` under a `--rule` line; the dialog and the
card on `--raised`.
- CLAUDE.md, positioning and the design system say so.
---
CLAUDE.md | 5 ++-
docs/rebuild/design/design-system.md | 11 +++--
docs/rebuild/design/positioning.md | 11 ++---
resources/css/app.css | 33 +++-----------
.../components/campaign/campaign-banner.tsx | 2 +-
.../components/campaign/campaign-ground.tsx | 4 +-
.../components/campaign/campaign-notice.tsx | 4 +-
resources/js/components/shared/footer-bar.tsx | 2 +-
resources/js/components/site/mobile-nav.tsx | 2 +-
resources/js/layouts/landing-layout.tsx | 10 ++---
resources/js/lib/theme.ts | 21 ++-------
resources/js/pages/BlackFriday.tsx | 2 +-
resources/views/app.blade.php | 2 +-
resources/views/partials/head-theme.blade.php | 5 +--
tests/Feature/Pages/CampaignTest.php | 20 +++++----
tests/js/theme.test.ts | 44 -------------------
16 files changed, 48 insertions(+), 130 deletions(-)
diff --git a/CLAUDE.md b/CLAUDE.md
index 960d9388..f5889207 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -82,8 +82,9 @@ server (`docs/architecture.md`, "The language bar").
every call through `useApi()` with `credentials: 'omit'`, so no cookie lands
on a public page.
- The theme follows the OS by default; `localStorage.theme` holds an explicit
- choice. `/black-friday` alone is always dark. The portal is another origin and
- keeps its own.
+ choice. Every page follows it, `/black-friday` and the sale's banner and notice
+ included: light mode is light throughout, with no dark island. The portal is
+ another origin and keeps its own.
## Conventions
diff --git a/docs/rebuild/design/design-system.md b/docs/rebuild/design/design-system.md
index b7bb758f..0c6b3d2f 100644
--- a/docs/rebuild/design/design-system.md
+++ b/docs/rebuild/design/design-system.md
@@ -266,20 +266,19 @@ Every row of the §2.3 table becomes an assertion. Add a gamut assertion: no tok
if (t === 'dark' || t === 'system' || t === 'light') { choice = t; }
} catch (e) {}
var root = document.documentElement;
- var forced = root.dataset.themeForced === 'dark';
- var dark = forced || choice === 'dark' || (choice === 'system' && window.matchMedia('(prefers-color-scheme: dark)').matches);
+ var dark = choice === 'dark' || (choice === 'system' && window.matchMedia('(prefers-color-scheme: dark)').matches);
if (dark) { root.classList.add('dark'); }
root.dataset.themeChoice = choice; /* drives the control's icon without hydration */
root.style.colorScheme = dark ? 'dark' : 'light';
var m = document.querySelector('meta[name="theme-color"]');
- if (m) { m.setAttribute('content', forced ? '#060606' : dark ? '#121212' : '#ffffff'); }
+ if (m) { m.setAttribute('content', dark ? '#121212' : '#ffffff'); }
})();
```
`#ffffff` and `#121212` are the two `--background` values in §2.2.
-**The one forced page.** `/black-friday` is dark in both themes, from the banner to the footer (owner decision, 2026-11-18). Blade stamps `html[data-theme-forced="dark"]` and `LandingLayout`'s `alwaysDark` holds it across visits inside the app. The reader's stored choice is untouched, the theme control is hidden there, and `--background`, `--surface` and `--raised` drop to `oklch(0.12 0 0)` (`#060606`), `oklch(0.15 0 0)` and `oklch(0.18 0 0)`.
+**No forced page.** Every page and every part of one follows the reader's theme, `/black-friday`, the sale's banner and its notice included (owner decision, 2026-11-28, replacing the always-dark sale page of 2026-11-18): light mode is light throughout, with no dark island in it.
**Rules:**
@@ -1040,7 +1039,7 @@ One shared file, `components/shared/theme-control.tsx` (architecture §1.10 and
- Actions are right-aligned: **Cancel** (`quiet`, default focus on destructive dialogs), then **confirm** (`danger` or `primary`).
- Below 480 the actions stack full width in the same order.
- Escape cancels. The confirm button shows a busy state; on error the dialog stays open with an inline `Callout danger`.
-- The dated sale's notice (`CampaignNotice`, positioning "Dated sales") is the one dialog outside this shape: 520px, on the sale's black ground, focus on the dialog itself when it opens, one `primary` action full width and `Not now` as `quiet`. Escape, the backdrop and every action close it.
+- The dated sale's notice (`CampaignNotice`, positioning "Dated sales") is the one dialog outside this shape: 520px, on `--raised` in the reader's theme, focus on the dialog itself when it opens, one `primary` action full width and `Not now` as `quiet`. Escape, the backdrop and every action close it.
**Toast:**
@@ -1322,7 +1321,7 @@ The ceiling drops from 320ms to 240ms, and `--dur-row` goes with the row bar.
- autoplay video
- hover lifts (`translateY`) or shadow blooms
-**The dated sale is the exception** (owner decision, 2026-11-06: "ban the AI look, not motion"). On the sale's black ground only (`/black-friday` and its banner), and never under reduced motion:
+**The dated sale is the exception** (owner decision, 2026-11-06: "ban the AI look, not motion"). On the sale's own ground only (`/black-friday` and its banner), and never under reduced motion:
- **The load sequence,** once per visit: the headline settles (`sale-rise`, 560ms, `--ease-panel`), a drawn line strikes the list prices, then the sale prices arrive. Under a second in all.
- **The countdown digits roll**, each one only when it changes (`roll-in`, `roll-out`, 320ms).
diff --git a/docs/rebuild/design/positioning.md b/docs/rebuild/design/positioning.md
index 2ba09cc4..0ecac774 100644
--- a/docs/rebuild/design/positioning.md
+++ b/docs/rebuild/design/positioning.md
@@ -446,8 +446,9 @@ says what a discount takes off and how long is left. It is a real discount at th
prices, with a code that works only inside the window (`App\Support\Pricing\Campaign`, `lib/campaign.ts`).
- **Where, while it is live:** the banner slot on every page but the sale's own, and the plan cards of the cycles it
covers. No band above a page's hero (owner, 2026-11-23). Checkout from the site attaches the code.
+ Before and after the window, only the sale's own page mentions it.
- **The notice** (owner, 2026-11-28, `CampaignNotice`): once per page load, as the page opens. From 640px a modal
- dialog on the black ground: the percentage off, the two offers as ruled rows with their struck prices, the
+ dialog in the reader's theme: the percentage off, the two offers as ruled rows with their struck prices, the
countdown, a button that buys Pro one-time at its sale price, a link to the sale's page and "Not now". Below
640px a card at the bottom of the screen that blocks nothing (Google's guidance on intrusive dialogs): the
percentage, Pro one-time's sale price, the countdown and the sale's page. It never opens on the sale's page or
@@ -455,8 +456,7 @@ prices, with a code that works only inside the window (`App\Support\Pricing\Camp
more off, or again once the reader has answered it, a click on an offer included: closing it or the banner closes
it for the rest of the sale (`tablepro:campaign-closed`). No coloured dot, glow or accent rule on it; the accent
is the one button.
- Before and after the window, only the sale's own page mentions it.
-- **The sale's own page,** `/black-friday`, keeps one URL from year to year and is black throughout, in both themes. Before the sale it states the window and
+- **The sale's own page,** `/black-friday`, keeps one URL from year to year and follows the reader's theme like every other page. Before the sale it states the window and
the prices, and offers a calendar file for the start instead of a button that cannot be pressed; during it the offers
can be bought from it; after it, its title, heading and description say the sale has ended, and nothing on it is
offered. Its copy stays near 150 words: the offers as two ruled rows, Pro one-time first and larger, then the Pro
@@ -475,8 +475,9 @@ prices, with a code that works only inside the window (`App\Support\Pricing\Camp
- **The regional discount** stays as above: never named outside the plan block. Checkout takes one discount per
order, so the site sends the sale's code only when it takes at least as much off as the reader's regional
discount.
-- **The black ground** is an island of the dark theme (`.dark` on the element), so the design system's text pairs
- hold on it in either theme.
+- **The theme:** the banner, the notice and the sale's page follow the reader's theme (owner, 2026-11-28, replacing
+ the always-black sale of 2026-11-18): light mode is light throughout. Only the share card, an image shown off the
+ site, keeps its black ground.
---
diff --git a/resources/css/app.css b/resources/css/app.css
index 345281d7..437cb6e2 100644
--- a/resources/css/app.css
+++ b/resources/css/app.css
@@ -219,11 +219,10 @@ html.has-language-bar .support-banner {
* reader's clock passes the end, so nothing offers a code checkout no longer
* takes.
*
- * The banner and the sale page's ground are an island of the dark theme
- * whatever the reader chose: the element carries `.dark`, so every token
- * inside resolves to its dark value and the design system's text pairs hold.
- * Flat black: no glow and no light under the pointer (owner, 2026-11-28), as
- * the accent never colours a glow (design-system §1). Positioning §12.2.
+ * The banner, the notice and the sale page follow the reader's theme like
+ * every other part of the site: light mode is light throughout (owner,
+ * 2026-11-28). Flat: no glow and no light under the pointer, as the accent
+ * never colours a glow (design-system §1). Positioning §12.2.
*
* The slot holds one bar: the language bar, when it shows, takes it from the
* sale's banner as it does from the license banner. The rule names all three
@@ -243,29 +242,7 @@ html.has-language-bar.has-banner.campaign-live .campaign-banner {
display: none;
}
-.campaign-surface {
- background-color: oklch(0.12 0 0);
- color: var(--foreground);
-}
-
-/* /black-friday is black from the banner to the footer in either theme, so its hero's ground is the page's. */
-@media screen {
- html[data-theme-forced] {
- --background: oklch(0.12 0 0);
- --surface: oklch(0.15 0 0);
- --raised: oklch(0.18 0 0);
- }
-}
-
-html[data-theme-forced] .theme-setting {
- display: none;
-}
-
-.campaign-banner {
- border-bottom: 1px solid color-mix(in oklab, var(--accent) 45%, var(--rule));
-}
-
-/* The global rails are drawn in the page's theme; on the black ground they would be a light line in the light theme. */
+/* The sale's own rails, drawn over its banner and ground, which sit above the global ones. */
.campaign-rails {
position: absolute;
inset: 0;
diff --git a/resources/js/components/campaign/campaign-banner.tsx b/resources/js/components/campaign/campaign-banner.tsx
index 4f49c8c6..7470d3b1 100644
--- a/resources/js/components/campaign/campaign-banner.tsx
+++ b/resources/js/components/campaign/campaign-banner.tsx
@@ -48,7 +48,7 @@ export default function CampaignBanner() {
}
return (
-
+
diff --git a/resources/js/components/campaign/campaign-ground.tsx b/resources/js/components/campaign/campaign-ground.tsx
index 91ff0090..baa0b2ca 100644
--- a/resources/js/components/campaign/campaign-ground.tsx
+++ b/resources/js/components/campaign/campaign-ground.tsx
@@ -7,10 +7,10 @@ interface CampaignGroundProps {
children: ReactNode;
}
-// The sale's black ground: an island of the dark theme in either theme, with its own rails. Flat: no glow, no light under the pointer.
+// The sale's ground: the page's own, in the reader's theme, with its own rails. Flat: no glow, no light under the pointer.
export default function CampaignGround({ labelledBy, className, children }: CampaignGroundProps) {
return (
-
+