From 8f709e181d16c374c6ca1930099491e025a9e914 Mon Sep 17 00:00:00 2001 From: sebastjanartic <45803536-sebastjanartic@users.noreply.replit.com> Date: Mon, 2 Mar 2026 18:31:35 +0000 Subject: [PATCH] Add an advertisement to the blog post grid layout Insert an ad into the fifth row of the blog post grid, replacing an article at the second position. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 517dfa7b-26ac-463d-a6e1-a58c6df97188 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: c5a7bcf0-0aea-463e-aa1c-d846d197312b 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 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/client/src/pages/home.tsx b/client/src/pages/home.tsx index 70ad69a..0cb589a 100644 --- a/client/src/pages/home.tsx +++ b/client/src/pages/home.tsx @@ -492,6 +492,13 @@ export default function Home() { } } + if (4 < totalRows) { + const rowStart = 4 * 4; + if (items[rowStart + 1] && items[rowStart + 1].type === "article") { + items[rowStart + 1] = { type: "ad", key: `ad-${adCount++}` }; + } + } + return items; }, [shuffled, widgets]);