strani rubrik: oglas cez dve vrstici in vrstice po 292 px, da kartic ne razteguje

This commit is contained in:
2026-08-31 17:45:15 +02:00
parent 1bd20efbac
commit 98e0c05af2
+5 -2
View File
@@ -153,7 +153,10 @@ export default function CategoryPage({ fixedCategory }: { fixedCategory?: string
</div>
) : data && data.articles.length > 0 ? (
<>
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-5">
{/* Oglas je fiksen 300x600 in bi vrstico raztegnil na svojo visino.
Zato so vrstice zaklenjene na 292 px, oglas pa zasede dve, tako
da se visini ujameta in pod karticami ni praznega prostora. */}
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-5 lg:auto-rows-[292px]">
{(() => {
const items: React.ReactNode[] = [];
const articles = data.articles;
@@ -166,7 +169,7 @@ export default function CategoryPage({ fixedCategory }: { fixedCategory?: string
const adCol = row === 0 ? 3 : row % 4;
for (let col = 0; col < 4; col++) {
if (col === adCol) {
items.push(<ArticleCardAd key={`ad-row-${row}`} />);
items.push(<div key={`ad-row-${row}`} className="lg:row-span-2 h-full"><ArticleCardAd /></div>);
} else if (ai < articles.length) {
const a = articles[ai];
items.push(