From 7eca616874012bf3c62edf5975a772aa5491c3ff Mon Sep 17 00:00:00 2001 From: sebastjanartic <45803536-sebastjanartic@users.noreply.replit.com> Date: Mon, 2 Mar 2026 18:00:10 +0000 Subject: [PATCH] Restore original ad placement strategy within the blog layout Revert ad placement logic to original configuration, inserting ads into specific rows (1, 3, 5, 7) and columns (3, 1, 2, 0) within the item grid. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 517dfa7b-26ac-463d-a6e1-a58c6df97188 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: 670bb9b9-fca8-4896-b815-85b176b197c3 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/f209e72a-0939-48fa-84fc-57854de71967/517dfa7b-26ac-463d-a6e1-a58c6df97188/nFw7xof Replit-Helium-Checkpoint-Created: true --- client/src/pages/home.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/client/src/pages/home.tsx b/client/src/pages/home.tsx index 4d0a2d3..d54cf74 100644 --- a/client/src/pages/home.tsx +++ b/client/src/pages/home.tsx @@ -490,6 +490,17 @@ export default function Home() { } } + const totalRows = items.length / 4; + const adRows = [1, 3, 5, 7]; + const adCols = [3, 1, 2, 0]; + adRows.forEach((row, i) => { + if (row < totalRows) { + const idx = row * 4 + adCols[i % adCols.length]; + if (items[idx] && items[idx].type === "article") { + items[idx] = { type: "ad", key: `ad-${i}` }; + } + } + }); return items; }, [shuffled, widgets]);