From f9a4e8b330e2f150ccc9ff25aef2ebc964cd7f60 Mon Sep 17 00:00:00 2001 From: Anthony Ettinger Date: Mon, 30 Nov 2026 15:08:40 +0000 Subject: [PATCH] Stop the unstyled flash looking like injected ads Two things painted badly in the gap before the stylesheet lands: - The header logo had no intrinsic size (marketing) or the wrong aspect (app, 320x64 for a 489x173 viewBox), so it rendered at full viewport width. Pin it to 181x64 with an inline height. - ad.js left each slot empty until /api/ads/serve answered, so the page jumped when the creative landed. It now paints a faint, theme-aware skeleton built as an inline SVG (no request) at the format's size, swapped for the iframe on fill and removed on a no-fill. A slot with the publisher's own fallback markup is left alone. Co-Authored-By: Claude Opus 5.5 --- app/(app)/layout.tsx | 3 ++- app/ad.js/route.ts | 48 ++++++++++++++++++++++++++++++++++++-- components/site-header.tsx | 12 +++++++++- 3 files changed, 59 insertions(+), 4 deletions(-) diff --git a/app/(app)/layout.tsx b/app/(app)/layout.tsx index 6ee43196..dad6ce22 100644 --- a/app/(app)/layout.tsx +++ b/app/(app)/layout.tsx @@ -33,8 +33,9 @@ export default async function AppLayout({ children }: { children: React.ReactNod src="/logo.svg" alt="CrawlProof" className="h-16 w-auto" - width={320} + width={181} height={64} + style={{ height: 64, width: "auto" }} />