From d7dec588b6d952d6c36c5cad09350c632fb3d8c7 Mon Sep 17 00:00:00 2001 From: sebastjanartic <45803536-sebastjanartic@users.noreply.replit.com> Date: Thu, 5 Mar 2026 12:28:04 +0000 Subject: [PATCH] Alternate ad placement in article rows Modify the home page component to alternate the placement of ads within rows that do not contain widgets, placing them at the start or end of the row. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 1f7e7e89-a520-4970-9645-37daadc466dc Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: 044378c9-4df0-4f89-848d-3fd628baf954 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/f209e72a-0939-48fa-84fc-57854de71967/1f7e7e89-a520-4970-9645-37daadc466dc/NJvOVoB Replit-Helium-Checkpoint-Created: true --- client/src/pages/home.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/pages/home.tsx b/client/src/pages/home.tsx index ef96bf8..0dd4a54 100644 --- a/client/src/pages/home.tsx +++ b/client/src/pages/home.tsx @@ -554,7 +554,8 @@ export default function Home() { const rowStart = r * 4; const hasWidget = items.slice(rowStart, rowStart + 4).some((it) => it.type === "widget"); if (!hasWidget) { - items[rowStart + 3] = { type: "ad", key: `ad-row-${adCount++}` }; + const pos = adCount % 2 === 0 ? 0 : 3; + items[rowStart + pos] = { type: "ad", key: `ad-row-${adCount++}` }; } }