zacasno umaknjen prevelik oglas iz mreze na naslovnici in v rubrikah, dokler enota v AdSense ni Fest 300x250

This commit is contained in:
2026-08-31 18:39:27 +02:00
parent b10b7f7b19
commit b3d5fe05e4
2 changed files with 7 additions and 8 deletions
+3 -3
View File
@@ -168,9 +168,9 @@ export default function CategoryPage({ fixedCategory }: { fixedCategory?: string
// 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(<div key={`ad-row-${row}`} className="h-full empty:hidden"><ArticleCardAd /></div>);
} else if (ai < articles.length) {
// Oglas je zacasno umaknjen iz mreze: enota se v celici
// 300 px izrise kot 548 px in razteguje vrstico.
if (ai < articles.length) {
const a = articles[ai];
items.push(
<Link key={a.id} href={`/article/${a.slug}`}>
+4 -5
View File
@@ -925,17 +925,16 @@ export default function Home() {
// Oglas gre le v vsako drugo vrstico. Meritev 31. 8. 2026: od 13 enot na
// naslovnici jih je 9 vrnilo unfilled, torej je mest vec, kot jih Google
// za to stran zapolni. Manj mest z visjo zapolnjenostjo prinese vec.
let adCount = 0;
let vidCount = 0;
const totalRows = items.length / 4;
for (let r = 0; r < totalRows; r++) {
const rowStart = r * 4;
const hasWidget = items.slice(rowStart, rowStart + 4).some((it) => it.type === "widget");
if (hasWidget) continue;
if (r % 2 === 1) {
const pos = r === 1 ? 3 : adCount % 2 === 0 ? 0 : 3;
items[rowStart + pos] = { type: "ad", key: `ad-row-${adCount++}` };
} else if (r > 0 && videos.length) {
// 31. 8. 2026 zvecer: enota 4126524750 je v AdSense se vedno Responsiv in
// se v celici 300 px izrise kot 548 ali 600 px, zato vrstico razteguje.
// Do popravka enote je oglas iz mreze umaknjen; ostane vodoravni pas.
if (r > 0 && videos.length) {
// video namesto zadnjega clanka v vrstici brez oglasa
const v = videos[vidCount % videos.length];
vidCount += 1;