--- export interface Props { items: any[]; showCount?: boolean; } const { items = [], showCount = false, } = Astro.props; ---

{showCount && items.length > 0 && ( ({items.length}) )}

{items.map((item, index) => { const postUrl = item.uri || `/blog/${item.databaseId}`; const postDate = new Date(item.date); // Логика для больших плиток на десктопе let isLarge = false; let largePosition = ''; const rowNumber = Math.floor(index / 4) + 1; const positionInRow = index % 4; if (index >= 8) { const largeRowStart = (rowNumber - 3) % 3 === 0 && rowNumber >= 3; if (largeRowStart && positionInRow === 0) { isLarge = true; largePosition = 'first'; } } return (
{item.featuredImage?.node?.sourceUrl ? ( {item.featuredImage.node.altText ) : (
)} {/* Рубрика в верхнем правом углу */} {item.categories?.nodes?.[0]?.name && ( )} {/* Оверлей с контентом */}

{item.title}

{item.author?.node?.name && ( )}
{/* Скринридеру и SEO */}

); })}