diff --git a/client/src/pages/category.tsx b/client/src/pages/category.tsx index 919667a..9d6bc00 100644 --- a/client/src/pages/category.tsx +++ b/client/src/pages/category.tsx @@ -160,7 +160,10 @@ export default function CategoryPage({ fixedCategory }: { fixedCategory?: string let ai = 0; let row = 0; while (ai < articles.length) { - const adCol = row % 4; + // V prvi vrstici oglas nikoli ne sme biti prva celica: na + // mobilnem je mreza enostolpcna, zato bi bralec po pasici na + // vrhu takoj dobil se en oglas in sele nato prvi clanek. + const adCol = row === 0 ? 3 : row % 4; for (let col = 0; col < 4; col++) { if (col === adCol) { items.push(); diff --git a/client/src/pages/home.tsx b/client/src/pages/home.tsx index 97b0b70..e229dcd 100644 --- a/client/src/pages/home.tsx +++ b/client/src/pages/home.tsx @@ -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++}` }; } }