oglasi: v prvi vrstici mreze oglas ni prva celica (na mobilnem sta bila pasica in kartica oglasa zapored pred prvim clankom)

This commit is contained in:
2026-08-30 13:52:25 +02:00
parent 7f7c5e05d1
commit 6a0ef7f2cf
2 changed files with 6 additions and 2 deletions
+2 -1
View File
@@ -871,7 +871,8 @@ export default function Home() {
const rowStart = r * 4;
const hasWidget = items.slice(rowStart, rowStart + 4).some((it) => it.type === "widget");
if (!hasWidget) {
const pos = adCount % 2 === 0 ? 0 : 3;
// Enako kot na straneh rubrik: v prvi vrstici oglas ni prva celica.
const pos = r === 0 ? 3 : adCount % 2 === 0 ? 0 : 3;
items[rowStart + pos] = { type: "ad", key: `ad-row-${adCount++}` };
}
}