Skip to content

Curated website design inspiration gallery, open zero-auth MCP server for AI agents, and shareable moodboard lists.

Fix sticky scroll-stage, animation, preloader, and modal capture pipeline

Ethan3a154f2f3613
diff --git a/apps/gallery/assets/anywr.jpg b/apps/gallery/assets/anywr.jpg
index 47fb41c..f3a0b37 100644
Binary files a/apps/gallery/assets/anywr.jpg and b/apps/gallery/assets/anywr.jpg differ
diff --git a/apps/gallery/assets/basement-studio.jpg b/apps/gallery/assets/basement-studio.jpg
index 7b37180..8212cd4 100644
Binary files a/apps/gallery/assets/basement-studio.jpg and b/apps/gallery/assets/basement-studio.jpg differ
diff --git a/apps/gallery/assets/bruno-simon.jpg b/apps/gallery/assets/bruno-simon.jpg
index 7796385..590031b 100644
Binary files a/apps/gallery/assets/bruno-simon.jpg and b/apps/gallery/assets/bruno-simon.jpg differ
diff --git a/apps/gallery/assets/eight-sleep.jpg b/apps/gallery/assets/eight-sleep.jpg
index d0de243..be77561 100644
Binary files a/apps/gallery/assets/eight-sleep.jpg and b/apps/gallery/assets/eight-sleep.jpg differ
diff --git a/apps/gallery/assets/graphite.jpg b/apps/gallery/assets/graphite.jpg
index 8e1efd8..aa9b84c 100644
Binary files a/apps/gallery/assets/graphite.jpg and b/apps/gallery/assets/graphite.jpg differ
diff --git a/apps/gallery/assets/harvey.jpg b/apps/gallery/assets/harvey.jpg
index 8d2c87c..55f6a9c 100644
Binary files a/apps/gallery/assets/harvey.jpg and b/apps/gallery/assets/harvey.jpg differ
diff --git a/apps/gallery/assets/inflight.jpg b/apps/gallery/assets/inflight.jpg
index c0293a8..adf9d36 100644
Binary files a/apps/gallery/assets/inflight.jpg and b/apps/gallery/assets/inflight.jpg differ
diff --git a/apps/gallery/assets/isidor.jpg b/apps/gallery/assets/isidor.jpg
index 2500f1d..01bc8f9 100644
Binary files a/apps/gallery/assets/isidor.jpg and b/apps/gallery/assets/isidor.jpg differ
diff --git a/apps/gallery/assets/klim.jpg b/apps/gallery/assets/klim.jpg
index a008d5c..0c081b5 100644
Binary files a/apps/gallery/assets/klim.jpg and b/apps/gallery/assets/klim.jpg differ
diff --git a/apps/gallery/assets/lusion.jpg b/apps/gallery/assets/lusion.jpg
index 4231bda..b403dfb 100644
Binary files a/apps/gallery/assets/lusion.jpg and b/apps/gallery/assets/lusion.jpg differ
diff --git a/apps/gallery/assets/mercury.jpg b/apps/gallery/assets/mercury.jpg
index 65a2298..b1627f5 100644
Binary files a/apps/gallery/assets/mercury.jpg and b/apps/gallery/assets/mercury.jpg differ
diff --git a/apps/gallery/assets/microsoft-ai.jpg b/apps/gallery/assets/microsoft-ai.jpg
index dd1c91a..fd5630a 100644
Binary files a/apps/gallery/assets/microsoft-ai.jpg and b/apps/gallery/assets/microsoft-ai.jpg differ
diff --git a/apps/gallery/assets/obys.jpg b/apps/gallery/assets/obys.jpg
index dcc1ff4..103e68b 100644
Binary files a/apps/gallery/assets/obys.jpg and b/apps/gallery/assets/obys.jpg differ
diff --git a/apps/gallery/assets/pitch.jpg b/apps/gallery/assets/pitch.jpg
index f924f15..aa98987 100644
Binary files a/apps/gallery/assets/pitch.jpg and b/apps/gallery/assets/pitch.jpg differ
diff --git a/apps/gallery/assets/sunday.jpg b/apps/gallery/assets/sunday.jpg
index 83692be..15cbc01 100644
Binary files a/apps/gallery/assets/sunday.jpg and b/apps/gallery/assets/sunday.jpg differ
diff --git a/apps/gallery/assets/the-content-architecture.jpg b/apps/gallery/assets/the-content-architecture.jpg
index 55880f8..9f4d5e2 100644
Binary files a/apps/gallery/assets/the-content-architecture.jpg and b/apps/gallery/assets/the-content-architecture.jpg differ
diff --git a/apps/gallery/assets/ux-folio.jpg b/apps/gallery/assets/ux-folio.jpg
index 7d42224..a599ee0 100644
Binary files a/apps/gallery/assets/ux-folio.jpg and b/apps/gallery/assets/ux-folio.jpg differ
diff --git a/apps/gallery/assets/waabi.jpg b/apps/gallery/assets/waabi.jpg
index 2102188..a11c7d3 100644
Binary files a/apps/gallery/assets/waabi.jpg and b/apps/gallery/assets/waabi.jpg differ
diff --git a/apps/gallery/assets/webflow.jpg b/apps/gallery/assets/webflow.jpg
index 952ca97..2542e2f 100644
Binary files a/apps/gallery/assets/webflow.jpg and b/apps/gallery/assets/webflow.jpg differ
diff --git a/apps/gallery/sites.json b/apps/gallery/sites.json
index bb88164..a6caa8e 100644
--- a/apps/gallery/sites.json
+++ b/apps/gallery/sites.json
@@ -80,7 +80,7 @@
"lesson": "Use color temperature and type contrast to create an alternative to conventional dark technology branding.",
"caution": "Borrow the hierarchy and pacing, not the brand assets or copy. Check mobile, keyboard and reduced-motion behavior in your own implementation.",
"image": "assets/microsoft-ai.jpg",
- "capturedAt": "2026-12-03",
+ "capturedAt": "2026-12-05",
"viewport": {
"width": 1440,
"height": 900
@@ -94,7 +94,7 @@
"name": "Minimal Gallery",
"url": "https://minimal.gallery/microsoft-ai/"
},
- "captureSha256": "1da66e7a0fbe53991feb29e2200edb77577647e51f8d9579661bebf550ca2084",
+ "captureSha256": "1b2f2d264713eaeb388bd513ee3d6d22c737b97ecc6cd9e7056cb8a70f13ca4e",
"rank": 2,
"captureMethod": "Stitched full-page capture at 1440px viewport with repeated sticky chrome hidden."
},
@@ -640,7 +640,7 @@
"lesson": "Make the first product action part of the hero when a visitor can understand it without explanation.",
"caution": "Use representative screens from your own product. Simplify the preview for small screens rather than shrinking unreadable interface text.",
"image": "assets/pitch.jpg",
- "capturedAt": "2026-12-03",
+ "capturedAt": "2026-12-05",
"viewport": {
"width": 1440,
"height": 900
@@ -654,7 +654,7 @@
"name": "DesignTaste selection",
"url": "https://pitch.com/"
},
- "captureSha256": "a420829db6e29e8bcae81a8e992b12ed61a7c4fb748194f0c175f84a2a2c9099",
+ "captureSha256": "37796dac9c78d7f501da3161cf530e6e121e85016b5abaf805af29f7116148e2",
"rank": 19,
"captureMethod": "Stitched full-page capture at 1440px viewport with repeated sticky chrome hidden."
},
@@ -772,7 +772,7 @@
"lesson": "Use a strong two-column contrast to separate explanation from an expressive brand element.",
"caution": "Large or unusual type needs to survive narrow screens and longer copy. Preserve a clear primary action and a readable text hierarchy.",
"image": "assets/the-content-architecture.jpg",
- "capturedAt": "2026-12-03",
+ "capturedAt": "2026-12-05",
"viewport": {
"width": 1440,
"height": 900
@@ -786,7 +786,7 @@
"name": "Minimal Gallery",
"url": "https://minimal.gallery/the-content-architecture/"
},
- "captureSha256": "477aee6bd7537524dbe853b0cc68755d5003b4688f8a25f5118aedfaf29c5593",
+ "captureSha256": "e6a65b29a97bbf40b2931098e4e440073a4f46f5828ff21d16e10edd8aa2829d",
"rank": 23,
"captureMethod": "Stitched full-page capture at 1440px viewport with repeated sticky chrome hidden."
},
@@ -1068,7 +1068,7 @@
"lesson": "Demonstrate collaboration in context instead of explaining it with a disconnected list of benefits.",
"caution": "Use representative screens from your own product. Simplify the preview for small screens rather than shrinking unreadable interface text.",
"image": "assets/inflight.jpg",
- "capturedAt": "2026-12-03",
+ "capturedAt": "2026-12-05",
"viewport": {
"width": 1440,
"height": 900
@@ -1082,7 +1082,7 @@
"name": "Curated",
"url": "https://curated.design/sites/s/140630/"
},
- "captureSha256": "bfe13253f64eacd3490cb91097f0ff4c8cfecca1507359f02a737ae2a10eabc5",
+ "captureSha256": "b371134fdecc40905cbf336d00497dbd3846eb705dd8df9226d2692ffc144a03",
"rank": 32,
"captureMethod": "Stitched full-page capture at 1440px viewport with repeated sticky chrome hidden."
},
@@ -1101,7 +1101,7 @@
"lesson": "Use a clear audience-specific outcome to make a simple hero feel purposeful.",
"caution": "Use representative screens from your own product. Simplify the preview for small screens rather than shrinking unreadable interface text.",
"image": "assets/ux-folio.jpg",
- "capturedAt": "2026-12-03",
+ "capturedAt": "2026-12-05",
"viewport": {
"width": 1440,
"height": 900
@@ -1115,7 +1115,7 @@
"name": "Curated",
"url": "https://curated.design/sites/s/140629/"
},
- "captureSha256": "0e2665ad0d0524da965587bf743a80f135a677f38d850483bff7cd225b4b2d99",
+ "captureSha256": "212dd3d96989ccbaf183140b46462057da96bd5af5528301d850babcb4e0fa40",
"rank": 33,
"captureMethod": "Stitched full-page capture at 1440px viewport with repeated sticky chrome hidden."
},
@@ -1662,7 +1662,7 @@
"lesson": "Use a strong scene to create an emotional register for a practical product.",
"caution": "Use representative screens from your own product. Simplify the preview for small screens rather than shrinking unreadable interface text.",
"image": "assets/mercury.jpg",
- "capturedAt": "2026-12-03",
+ "capturedAt": "2026-12-05",
"viewport": {
"width": 1440,
"height": 900
@@ -1670,13 +1670,13 @@
"credit": "Mercury",
"imageDimensions": {
"width": 1280,
- "height": 3733
+ "height": 1600
},
"discoveredVia": {
"name": "DesignTaste selection",
"url": "https://mercury.com/"
},
- "captureSha256": "4f241f82cb1f5c384f57edc467dc89d7346a04d09c212af76e1f6e327b763494",
+ "captureSha256": "1ea1b76a05fa0863a88a043d3f2c5e13b679e8a6fffc1d2ac1a6b905cb527aea",
"rank": 50,
"captureMethod": "Stitched full-page capture at 1440px viewport with repeated sticky chrome hidden."
},
@@ -1992,7 +1992,7 @@
"lesson": "Use a disciplined pattern to create depth while preserving a simple text hierarchy.",
"caution": "Large or unusual type needs to survive narrow screens and longer copy. Preserve a clear primary action and a readable text hierarchy.",
"image": "assets/isidor.jpg",
- "capturedAt": "2026-12-03",
+ "capturedAt": "2026-12-05",
"viewport": {
"width": 1440,
"height": 900
@@ -2006,7 +2006,7 @@
"name": "Minimal Gallery",
"url": "https://minimal.gallery/isidor/"
},
- "captureSha256": "5535f21b1b652f995d88f60adcecff04b18c0016f77b2dfe7ce99daaed10779a",
+ "captureSha256": "4237003d95374e57202f98cdc9b1043a3a6457af26c1a3228e1aa6e1dd51c324",
"rank": 60,
"captureMethod": "Stitched full-page capture at 1440px viewport with repeated sticky chrome hidden."
},
@@ -2058,7 +2058,7 @@
"lesson": "Use a recognizable use environment to make a technically unfamiliar product easier to understand.",
"caution": "Use representative screens from your own product. Simplify the preview for small screens rather than shrinking unreadable interface text.",
"image": "assets/sunday.jpg",
- "capturedAt": "2026-12-03",
+ "capturedAt": "2026-12-05",
"viewport": {
"width": 1440,
"height": 900
@@ -2072,7 +2072,7 @@
"name": "Minimal Gallery",
"url": "https://minimal.gallery/sunday/"
},
- "captureSha256": "f03d2633d75fc31b0a356b7ab2ccd830f157728996bcf6a78931c7f89c03f496",
+ "captureSha256": "093de82c801d0255240eedf5053d5cf4b6092f26b1eb2ea30a36ac2076adf02d",
"rank": 62,
"captureMethod": "Stitched full-page capture at 1440px viewport with repeated sticky chrome hidden."
},
@@ -2124,7 +2124,7 @@
"lesson": "Let the real operating environment establish relevance before introducing technical detail.",
"caution": "Use representative screens from your own product. Simplify the preview for small screens rather than shrinking unreadable interface text.",
"image": "assets/waabi.jpg",
- "capturedAt": "2026-12-03",
+ "capturedAt": "2026-12-05",
"viewport": {
"width": 1440,
"height": 900
@@ -2138,7 +2138,7 @@
"name": "Minimal Gallery",
"url": "https://minimal.gallery/waabi/"
},
- "captureSha256": "602090482a60fe1540cd1f8f9ea5b16f765f9b594d5dc645a31b35eaac77d9eb",
+ "captureSha256": "75f1c0126d810c564b361746690e0696596235f84f8815b9fc3d92f6f0a2fc34",
"rank": 64,
"captureMethod": "Stitched full-page capture at 1440px viewport with repeated sticky chrome hidden."
},
@@ -3533,7 +3533,7 @@
"description": "Creative engineering studio pairing industrial grids with high-contrast motion.",
"observation": "Aggressive dark editorial grid with crisp technical metadata and fluid showcase transitions.",
"image": "assets/basement-studio.jpg",
- "capturedAt": "2026-12-03",
+ "capturedAt": "2026-12-05",
"viewport": {
"width": 1440,
"height": 900
@@ -3543,7 +3543,7 @@
"width": 1280,
"height": 3733
},
- "captureSha256": "e1c0cc52a8674de1ef09919ff2e15005f6bd9b6323e7b8d5d867908814252851",
+ "captureSha256": "26c1cd1daf4c52906a51b83804a79dc9bdbbf157b334ef85ccc1c2944e244878",
"captureMethod": "Stitched full-page capture at 1440px viewport with repeated sticky chrome hidden.",
"rank": 109
},
@@ -4181,7 +4181,7 @@
"description": "Shared project memory layer for coding agents with crisp typography and clear workflow framing.",
"observation": "Clean, focused layout explaining multi-agent memory sync with tactile interface cards.",
"image": "assets/anywr.jpg",
- "capturedAt": "2026-12-03",
+ "capturedAt": "2026-12-05",
"viewport": {
"width": 1440,
"height": 900
@@ -4191,7 +4191,7 @@
"width": 1280,
"height": 3733
},
- "captureSha256": "546fdeecd137b87fd9d1d9c951a49f9c0c65540f988f5d9b3b586fb27d157fe2",
+ "captureSha256": "a32519d63a220d7b541ee606dd2a428e823252beade5ba2a3c17af74bbccb47c",
"captureMethod": "Stitched full-page capture at 1440px viewport with repeated sticky chrome hidden.",
"rank": 133
},
@@ -4208,7 +4208,7 @@
"description": "Visual web development platform with high-contrast dark framing and bold display type.",
"observation": "Crisp interactive canvas previews paired with confident editorial spacing.",
"image": "assets/webflow.jpg",
- "capturedAt": "2026-12-03",
+ "capturedAt": "2026-12-05",
"viewport": {
"width": 1440,
"height": 900
@@ -4218,7 +4218,7 @@
"width": 1280,
"height": 3733
},
- "captureSha256": "c5335836ec40b60df64f5efef722a2569c6ae3fbf04cba26d1c893e86573d415",
+ "captureSha256": "c30eab05a907ec3c0b39716acf31f57347cf0ff59d1786bf927b15bbc4c86216",
"captureMethod": "Stitched full-page capture at 1440px viewport with repeated sticky chrome hidden.",
"rank": 134
},
@@ -4451,7 +4451,7 @@
"description": "New Zealand type foundry crafting historically grounded editorial and sans typefaces.",
"observation": "Quiet, book-like pacing with generous margins and impeccable typographic rhythm.",
"image": "assets/klim.jpg",
- "capturedAt": "2026-12-03",
+ "capturedAt": "2026-12-05",
"viewport": {
"width": 1440,
"height": 900
@@ -4461,7 +4461,7 @@
"width": 1280,
"height": 3733
},
- "captureSha256": "9e8938c67611560589ae8a5b765607b905bc6a1033f753faa2e58e88053efb45",
+ "captureSha256": "fcb33b7250ccc0068a3391ed707f1711414e97e9660ac01d43bd09707f031b26",
"captureMethod": "Stitched full-page capture at 1440px viewport with repeated sticky chrome hidden.",
"rank": 143
},
@@ -5477,7 +5477,7 @@
"description": "Stacked pull request workflow and AI code review platform for fast teams.",
"observation": "Sharp monochrome engineering craft showcasing diff views and stacked PR graphs.",
"image": "assets/graphite.jpg",
- "capturedAt": "2026-12-03",
+ "capturedAt": "2026-12-05",
"viewport": {
"width": 1440,
"height": 900
@@ -5487,7 +5487,7 @@
"width": 1280,
"height": 3733
},
- "captureSha256": "aaa581f0416bb76ca61893c69db2c816cf9aac8ffa31e059a56b7030e64ec6f2",
+ "captureSha256": "8ffb85b0260eb71abf1e602295a6c7854812fd4e009ce12204252720fa447390",
"captureMethod": "Stitched full-page capture at 1440px viewport with repeated sticky chrome hidden.",
"rank": 181
},
@@ -6638,7 +6638,7 @@
"description": "Domain-specific AI workspace crafted for elite legal and professional services firms.",
"observation": "Quiet luxury serif typography and restrained obsidian surfaces convey authority.",
"image": "assets/harvey.jpg",
- "capturedAt": "2026-12-03",
+ "capturedAt": "2026-12-05",
"viewport": {
"width": 1440,
"height": 900
@@ -6648,7 +6648,7 @@
"width": 1280,
"height": 3733
},
- "captureSha256": "3e18fb0440948482b59c4665fc4b8ebeb6cb1a2482d58f4c93dafb8e7b42ac29",
+ "captureSha256": "4c0b15da24329605bfcc732827210544e245ae71e82f2fe057a5f752bfcfdef6",
"captureMethod": "Stitched full-page capture at 1440px viewport with repeated sticky chrome hidden.",
"rank": 224
},
@@ -6827,7 +6827,7 @@
"description": "Temperature-regulated smart mattress cover engineered for deep sleep recovery.",
"observation": "High-contrast dark performance aesthetic pairing biometric UI with moody hardware shots.",
"image": "assets/eight-sleep.jpg",
- "capturedAt": "2026-12-03",
+ "capturedAt": "2026-12-05",
"viewport": {
"width": 1440,
"height": 900
@@ -6837,7 +6837,7 @@
"width": 1280,
"height": 800
},
- "captureSha256": "c8301b3214f5524d1ece7bb952314b29704b08664f894d069c7b1a85aa2ea5cf",
+ "captureSha256": "68fd6e6f55aefa97b25b57a005cfed39c8369c8a1058d98d9d73d5a227fd614f",
"captureMethod": "Single-viewport capture at 1440×900.",
"rank": 231
},
@@ -7421,7 +7421,7 @@
"description": "Ukrainian creative agency celebrated for expressive typography and editorial web craft.",
"observation": "Monumental serif-and-sans contrasts anchored by bold dark studio framing.",
"image": "assets/obys.jpg",
- "capturedAt": "2026-12-03",
+ "capturedAt": "2026-12-05",
"viewport": {
"width": 1440,
"height": 900
@@ -7431,7 +7431,7 @@
"width": 1280,
"height": 800
},
- "captureSha256": "f2859af3c5aab6cb5c157a5da82553f5dc734389d32598f71d4632bfe9d197db",
+ "captureSha256": "fd27256c33fb056b37369dd920ac0e2baed50c4709267422c77c888abe2c99a9",
"captureMethod": "Single-viewport capture at 1440×900.",
"rank": 253
},
@@ -7610,7 +7610,7 @@
"description": "Creative production studio renowned for real-time 3D web experiences and fluid shaders.",
"observation": "Boundary-pushing real-time 3D scenes paired with crisp editorial overlays.",
"image": "assets/lusion.jpg",
- "capturedAt": "2026-12-03",
+ "capturedAt": "2026-12-05",
"viewport": {
"width": 1440,
"height": 900
@@ -7620,7 +7620,7 @@
"width": 1280,
"height": 800
},
- "captureSha256": "908ab42527094952fa4d5d5ad9b39d9e26d624b60d2baae409372b0eba004555",
+ "captureSha256": "9d60760c8a71734f0a542f7e29d2d65b6855199d096c4b98aa5b609476624fde",
"captureMethod": "Single-viewport capture at 1440×900.",
"rank": 260
},
@@ -7637,7 +7637,7 @@
"description": "Iconic interactive 3D driving-playground portfolio built with Three.js.",
"observation": "Playful physics-driven 3D world that redefined what a personal website can be.",
"image": "assets/bruno-simon.jpg",
- "capturedAt": "2026-12-03",
+ "capturedAt": "2026-12-05",
"viewport": {
"width": 1440,
"height": 900
@@ -7647,7 +7647,7 @@
"width": 1280,
"height": 800
},
- "captureSha256": "9849ffc0997371e7eb3305adde97662934b7e1e134cbce68106e3078b32b01e8",
+ "captureSha256": "95df5200e9186e16a6c59523cd86517b59d5bb701fad169b36e06ab2b3772fe3",
"captureMethod": "Single-viewport capture at 1440×900.",
"rank": 261
},
diff --git a/scripts/capture-lib.mjs b/scripts/capture-lib.mjs
index 265dfbd..cef4c13 100644
--- a/scripts/capture-lib.mjs
+++ b/scripts/capture-lib.mjs
@@ -139,25 +139,263 @@ async function dismissBanners(page) {
'button:has-text("Accept all")',
'button:has-text("Accept All")',
'button:has-text("Accept cookies")',
+ 'button:has-text("Accept Cookies")',
+ 'button:has-text("Reject all")',
'button:has-text("Accept")',
'button:has-text("Allow all")',
'button:has-text("Got it")',
'button:has-text("I agree")',
'[id*="cookie" i] button:has-text("Accept")',
'[class*="cookie" i] button:has-text("Accept")',
+ '[id*="onetrust" i] button#onetrust-accept-btn-handler',
'[aria-label="Close cookie banner" i]',
'[aria-label="Dismiss" i]',
+ '[role="dialog"] button[aria-label*="close" i]',
+ '[aria-modal="true"] button[aria-label*="close" i]',
+ '[class*="modal" i] button[aria-label*="close" i]',
+ '[class*="popup" i] button[aria-label*="close" i]',
];
for (const sel of selectors) {
try {
const el = page.locator(sel).first();
if (await el.isVisible({ timeout: 220 })) {
await el.click({ timeout: 600 }).catch(() => {});
- await page.waitForTimeout(200);
- break;
+ await page.waitForTimeout(250);
}
} catch {}
}
+
+ // If a fullscreen promo/newsletter modal is still locking scroll, try Escape.
+ const hasBlockingModal = await page
+ .evaluate(() => {
+ const bodyOv = getComputedStyle(document.body).overflow;
+ const htmlOv = getComputedStyle(document.documentElement).overflow;
+ const locked = bodyOv === "hidden" || htmlOv === "hidden";
+ const modal = document.querySelector(
+ '[role="dialog"], [aria-modal="true"], [class*="modal" i][style*="display: block"]',
+ );
+ if (!modal) return false;
+ const r = modal.getBoundingClientRect();
+ return (locked || r.width >= window.innerWidth * 0.5) && r.height >= window.innerHeight * 0.4;
+ })
+ .catch(() => false);
+ if (hasBlockingModal) {
+ await page.keyboard.press("Escape").catch(() => {});
+ await page.waitForTimeout(300);
+ }
+}
+
+async function markVisibleStickyBars(page) {
+ await page
+ .evaluate(() => {
+ const vw = window.innerWidth;
+ const vh = window.innerHeight;
+ for (const el of document.querySelectorAll("*")) {
+ const style = getComputedStyle(el);
+ if (style.position !== "sticky") continue;
+ const rect = el.getBoundingClientRect();
+ if (rect.width <= 0 || rect.height <= 0) continue;
+ if (rect.height > 145) continue;
+ if (rect.width < vw * 0.25) continue;
+ if (rect.bottom > 0 && rect.top < vh) {
+ el.dataset.dtSeenSticky = "1";
+ }
+ }
+ })
+ .catch(() => {});
+}
+
+async function hideFloatingChrome(page) {
+ await page
+ .evaluate(() => {
+ const vw = window.innerWidth;
+ const vh = window.innerHeight;
+ for (const el of document.querySelectorAll("*")) {
+ if (el.dataset.dtHidden !== undefined) continue;
+ const style = getComputedStyle(el);
+ const pos = style.position;
+ if (pos !== "fixed" && pos !== "sticky") continue;
+ const rect = el.getBoundingClientRect();
+ if (rect.width <= 0 || rect.height <= 0) continue;
+
+ const tag = el.tagName;
+ const role = (el.getAttribute("role") || "").toLowerCase();
+ const idCls = `${el.id || ""} ${typeof el.className === "string" ? el.className : ""}`.toLowerCase();
+ const isCookieOrConsent = /cookie|consent|onetrust|transcend|airgap|cookiebot|didomi|usercentrics|gdpr|intercom|crisp|hubspot-messages/.test(
+ idCls,
+ );
+ if (pos === "fixed" && isCookieOrConsent) {
+ el.dataset.dtHidden = el.style.visibility || "";
+ el.style.setProperty("visibility", "hidden", "important");
+ continue;
+ }
+
+ // Never hide full-viewport canvases, WebGL backdrops, or scroll-linked scene stages.
+ const isFullViewportStage =
+ rect.height >= vh * 0.72 && rect.width >= vw * 0.72;
+ if (isFullViewportStage) continue;
+
+ const isNavSemantic =
+ tag === "HEADER" ||
+ tag === "NAV" ||
+ role === "banner" ||
+ role === "navigation";
+
+ if (pos === "sticky") {
+ // NEVER hide large sticky content / storytelling panels (e.g. side-by-side graphic stages).
+ // Only hide thin sticky navbars or sticky section subheaders AFTER they've appeared once.
+ if (rect.height > 145) continue;
+ const isThinStickyNav =
+ isNavSemantic ||
+ (el.dataset.dtSeenSticky === "1" &&
+ rect.width >= vw * 0.25 &&
+ rect.top >= -10 &&
+ rect.top <= 140) ||
+ (rect.height <= 115 &&
+ rect.width >= vw * 0.45 &&
+ rect.top >= -10 &&
+ rect.top <= 48);
+ if (!isThinStickyNav) continue;
+ } else {
+ // position: fixed — only hide overlays currently pinned on-screen as chrome/widgets.
+ const isOnScreen = rect.bottom > 0 && rect.top < vh;
+ if (!isOnScreen) continue;
+ const isThinBar =
+ rect.height <= 180 && (rect.top <= 60 || rect.bottom >= vh - 60);
+ const isCornerWidget =
+ rect.width <= 480 &&
+ rect.height <= 340 &&
+ (rect.bottom >= vh - 160 || rect.top <= 120);
+ if (!isThinBar && !isCornerWidget && !isNavSemantic && !isCookieOrConsent) continue;
+ }
+
+ el.dataset.dtHidden = el.style.visibility || "";
+ el.style.setProperty("visibility", "hidden", "important");
+ }
+ })
+ .catch(() => {});
+}
+
+async function waitForVisibleImages(page, maxWaitMs = 1800) {
+ await page
+ .evaluate(
+ (limit) =>
+ Promise.race([
+ Promise.all(
+ [...document.images]
+ .filter((img) => {
+ if (img.complete && img.naturalWidth > 0) return false;
+ const r = img.getBoundingClientRect();
+ return r.bottom > -200 && r.top < window.innerHeight + 300;
+ })
+ .slice(0, 24)
+ .map(
+ (img) =>
+ new Promise((resolve) => {
+ img.addEventListener("load", resolve, { once: true });
+ img.addEventListener("error", resolve, { once: true });
+ }),
+ ),
+ ),
+ new Promise((resolve) => setTimeout(resolve, limit)),
+ ]),
+ maxWaitMs,
+ )
+ .catch(() => {});
+}
+
+async function waitForSettle(page, ms = 650) {
+ await page.waitForTimeout(ms);
+ await page
+ .evaluate(
+ () =>
+ new Promise((resolve) =>
+ requestAnimationFrame(() => requestAnimationFrame(resolve)),
+ ),
+ )
+ .catch(() => {});
+}
+
+async function smoothScrollTo(page, targetY) {
+ const startY = await page.evaluate(() => Math.round(window.scrollY));
+ const delta = targetY - startY;
+ if (Math.abs(delta) <= 40) {
+ await page.evaluate((top) => window.scrollTo({ top, behavior: "instant" }), targetY);
+ return;
+ }
+ const steps = Math.min(5, Math.max(2, Math.ceil(Math.abs(delta) / 300)));
+ for (let i = 1; i <= steps; i++) {
+ const nextY = Math.round(startY + (delta * i) / steps);
+ await page.evaluate((top) => {
+ window.scrollTo({ top, behavior: "instant" });
+ window.dispatchEvent(new Event("scroll"));
+ }, nextY);
+ await page.waitForTimeout(110);
+ }
+}
+
+async function waitOutPreloader(page) {
+ for (let attempt = 0; attempt < 7; attempt++) {
+ const hasPreloader = await page
+ .evaluate(() => {
+ const vw = window.innerWidth;
+ const vh = window.innerHeight;
+ const els = document.querySelectorAll(
+ '[class*="preload" i], [id*="preload" i], [class*="loader" i], [id*="loader" i], [class*="splash" i], [class*="loading" i], [id*="loading" i]',
+ );
+ for (const el of els) {
+ const cs = getComputedStyle(el);
+ if (
+ cs.display === "none" ||
+ cs.visibility === "hidden" ||
+ Number(cs.opacity) < 0.1
+ ) {
+ continue;
+ }
+ const r = el.getBoundingClientRect();
+ if (r.width >= vw * 0.65 && r.height >= vh * 0.65) {
+ return true;
+ }
+ }
+ // Also detect sparse numeric percentage preloaders (e.g. "052%" / "48" alone on screen).
+ const bodyText = (document.body?.innerText || "").trim();
+ if (bodyText.length > 0 && bodyText.length <= 24 && /^\d{1,3}\s*%?$/.test(bodyText)) {
+ return true;
+ }
+ return false;
+ })
+ .catch(() => false);
+ if (!hasPreloader) break;
+ await page.waitForTimeout(900);
+ }
+}
+
+async function primeVisibleVideos(page) {
+ await page
+ .evaluate(async () => {
+ const vids = [...document.querySelectorAll("video")].filter((v) => {
+ const r = v.getBoundingClientRect();
+ return r.bottom > -200 && r.top < window.innerHeight + 300;
+ });
+ await Promise.race([
+ Promise.all(
+ vids.slice(0, 6).map(async (v) => {
+ try {
+ if (v.readyState < 2) {
+ v.muted = true;
+ v.play?.().catch(() => {});
+ await new Promise((resolve) => {
+ v.addEventListener("loadeddata", resolve, { once: true });
+ v.addEventListener("error", resolve, { once: true });
+ });
+ }
+ } catch {}
+ }),
+ ),
+ new Promise((resolve) => setTimeout(resolve, 900)),
+ ]);
+ })
+ .catch(() => {});
}
export async function captureStitchedWebsite(
@@ -202,22 +440,22 @@ export async function captureStitchedWebsite(
const hardTimeout = new Promise((_, reject) => {
hardTimer = setTimeout(() => {
context.close().catch(() => {});
- reject(new Error("Hard capture timeout (45s)"));
- }, 45000);
+ reject(new Error("Hard capture timeout (75s)"));
+ }, 75000);
});
const runCapture = async () => {
let response = null;
try {
response = await page.goto(url, {
- waitUntil: "networkidle",
+ waitUntil: "domcontentloaded",
timeout: timeoutMs,
});
} catch {
- response = await page
- .goto(url, { waitUntil: "domcontentloaded", timeout: timeoutMs })
- .catch(() => null);
+ response = null;
}
+ await page.waitForLoadState("load", { timeout: 10000 }).catch(() => {});
+ await page.waitForLoadState("networkidle", { timeout: 9000 }).catch(() => {});
const status = response?.status() ?? 0;
if (status >= 400 && !/404/.test(url)) {
@@ -226,10 +464,11 @@ export async function captureStitchedWebsite(
// Re-validate final URL after any HTTP/JS redirects so private targets are never captured.
await assertPublicTargetUrl(page.url());
- await page.waitForTimeout(1100);
+ await page.waitForTimeout(1200);
await page
.evaluate(() => document.fonts?.ready?.catch?.(() => {}))
.catch(() => {});
+ await waitOutPreloader(page);
const title = (await page.title().catch(() => "")).trim();
if (BLOCKED_TITLE_RE.test(title) && !/404/.test(url)) {
@@ -237,43 +476,9 @@ export async function captureStitchedWebsite(
}
await dismissBanners(page);
-
- // Warm-up scroll so scroll-triggered animations and lazy images load.
- const initialScrollHeight = await page.evaluate(() =>
- Math.max(
- document.body?.scrollHeight || 0,
- document.documentElement?.scrollHeight || 0,
- ),
- );
- const warmLimit = Math.min(maxHeight, Math.max(viewportHeight, initialScrollHeight));
- for (let y = 500; y < warmLimit; y += 600) {
- await page.evaluate((top) => window.scrollTo({ top, behavior: "instant" }), y);
- await page.waitForTimeout(260);
- }
- await page.evaluate(() => window.scrollTo({ top: 0, behavior: "instant" }));
- await page.waitForTimeout(550);
-
- // Wait briefly for visible images to settle.
- await page
- .evaluate(
- () =>
- Promise.race([
- Promise.all(
- [...document.images]
- .filter((img) => !img.complete && img.offsetParent !== null)
- .slice(0, 20)
- .map(
- (img) =>
- new Promise((resolve) => {
- img.addEventListener("load", resolve, { once: true });
- img.addEventListener("error", resolve, { once: true });
- }),
- ),
- ),
- new Promise((resolve) => setTimeout(resolve, 2500)),
- ]),
- )
- .catch(() => {});
+ await waitForVisibleImages(page, 2000);
+ await primeVisibleVideos(page);
+ await waitForSettle(page, 450);
const totalHeight = await page.evaluate(() =>
Math.max(
@@ -293,45 +498,33 @@ export async function captureStitchedWebsite(
animations: "allow",
});
slices.push({ buf: firstBuf, top: 0, height: viewportHeight, cropTop: 0 });
+ await markVisibleStickyBars(page);
if (targetHeight > viewportHeight + 120) {
- // Hide sticky/fixed navs and floating chat widgets for subsequent slices so they don't repeat.
- await page
- .evaluate(() => {
- const hidden = [];
- for (const el of document.querySelectorAll("*")) {
- const style = getComputedStyle(el);
- if (style.position !== "fixed" && style.position !== "sticky") continue;
- const rect = el.getBoundingClientRect();
- if (rect.width === 0 || rect.height === 0) continue;
- const isFullViewportBg =
- rect.height >= window.innerHeight * 0.78 &&
- rect.width >= window.innerWidth * 0.78;
- if (isFullViewportBg) continue;
- if (
- rect.height <= 260 ||
- rect.top <= 160 ||
- rect.bottom >= window.innerHeight - 160
- ) {
- el.dataset.dtHidden = el.style.visibility || "";
- el.style.setProperty("visibility", "hidden", "important");
- hidden.push(el);
- }
- }
- window.__dtHiddenCount = hidden.length;
- })
- .catch(() => {});
+ // Hide only thin fixed/sticky nav chrome & floating corner widgets (never sticky graphic stages).
+ await hideFloatingChrome(page);
let y = viewportHeight;
let lastActualY = 0;
while (y < targetHeight) {
- const remaining = targetHeight - y;
- const desiredScroll = Math.min(y, totalHeight - viewportHeight);
- await page.evaluate(
- (top) => window.scrollTo({ top, behavior: "instant" }),
- desiredScroll,
+ const currentTotal = await page.evaluate(() =>
+ Math.max(
+ document.body?.scrollHeight || 0,
+ document.documentElement?.scrollHeight || 0,
+ window.innerHeight,
+ ),
);
- await page.waitForTimeout(320);
+ const effectiveTarget = Math.min(maxHeight, Math.max(viewportHeight, currentTotal));
+ const remaining = effectiveTarget - y;
+ if (remaining < 40) break;
+
+ const desiredScroll = Math.min(y, Math.max(0, currentTotal - viewportHeight));
+ await smoothScrollTo(page, desiredScroll);
+ // Re-check in case a navbar switches to position:fixed or a seen sticky subheader pins at top.
+ await hideFloatingChrome(page);
+ await waitForVisibleImages(page, 1400);
+ await primeVisibleVideos(page);
+ await waitForSettle(page, 620);
const actualY = await page.evaluate(() => Math.round(window.scrollY));
if (actualY <= lastActualY + 20) break;
@@ -341,6 +534,7 @@ export async function captureStitchedWebsite(
timeout: 10000,
animations: "allow",
});
+ await markVisibleStickyBars(page);
const expectedTop = slices[slices.length - 1].top + slices[slices.length - 1].height;
const overlap = Math.max(0, expectedTop - actualY);
const usableHeight = Math.min(viewportHeight - overlap, remaining);
diff --git a/scripts/recapture-gallery.mjs b/scripts/recapture-gallery.mjs
index 731c8c5..66caddc 100644
--- a/scripts/recapture-gallery.mjs
+++ b/scripts/recapture-gallery.mjs
@@ -9,8 +9,19 @@ import {
const args = process.argv.slice(2);
const forceAll = args.includes("--all");
+const idsIdx = args.indexOf("--ids");
+const onlyIds =
+ idsIdx > -1 && args[idsIdx + 1]
+ ? new Set(
+ args[idsIdx + 1]
+ .split(",")
+ .map((s) => s.trim())
+ .filter(Boolean),
+ )
+ : null;
+const concurrencyIdx = args.indexOf("--concurrency");
const concurrency = Number(
- args[args.indexOf("--concurrency") + 1] || 6,
+ (concurrencyIdx > -1 && args[concurrencyIdx + 1]) || 6,
);
const limitIdx = args.indexOf("--limit");
const limit = limitIdx > -1 ? Number(args[limitIdx + 1]) : Infinity;
@@ -21,6 +32,7 @@ const sites = JSON.parse(await readFile(catalogPath, "utf8"));
const targets = sites
.filter((s) => {
+ if (onlyIds) return onlyIds.has(s.id);
if (forceAll) return true;
const ratio = s.imageDimensions.height / s.imageDimensions.width;
return ratio < 1.15;
@@ -49,8 +61,8 @@ async function worker() {
timeoutMs: 25000,
});
const newRatio = result.height / result.width;
- // Only replace if we actually got a taller scrollable capture (or --all was passed).
- if (forceAll || newRatio >= Math.max(1.05, prevRatio + 0.2)) {
+ // Always replace when explicit --ids or --all was passed; otherwise only when taller.
+ if (onlyIds || forceAll || newRatio >= Math.max(1.05, prevRatio + 0.2)) {
await writeFile(join(root, site.image), result.buffer);
site.imageDimensions = { width: result.width, height: result.height };
site.captureSha256 = result.sha256;