8d4dc8a6f1
- Klikalne kafelki i slideshow → /blog/[slug] - Strona artykułu: cover fullwidth z parallax, tytuł nad obrazkiem - Schema.org BlogPosting na stronach postów - Dynamiczny sitemap.xml (artykuły + produkty z Directus, revalidate=0) - Google Analytics GA4 (G-7067BL7TDN) - Polityka prywatności /polityka-prywatnosci - CookieBanner z linkiem do polityki - Footer: działający link do polityki prywatności Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
46 lines
1.2 KiB
React
46 lines
1.2 KiB
React
import React from 'react';
|
|
import Link from 'next/link';
|
|
|
|
const BentoCard = ({ type, badge, title, category, readTime, bgImage, hero = false, style = {}, href }) => {
|
|
const inner = (
|
|
<article
|
|
className={`bento-card${hero ? ' hero-article' : ''}`}
|
|
style={href ? {} : style}
|
|
tabIndex={href ? -1 : 0}
|
|
aria-label={`${category}: ${title}`}
|
|
>
|
|
<div
|
|
className="bento-bg"
|
|
style={{ backgroundImage: `url(${bgImage})` }}
|
|
role="img"
|
|
aria-label={title}
|
|
/>
|
|
<div className="bento-overlay" aria-hidden="true" />
|
|
|
|
{badge && (
|
|
<div className={`bento-badge badge-${type}`} aria-label={`Etykieta: ${badge}`}>
|
|
{badge}
|
|
</div>
|
|
)}
|
|
|
|
<div className="bento-content">
|
|
<h2 className="article-title">{title}</h2>
|
|
<div className="article-meta">
|
|
<span>{category}</span>
|
|
<span className="dot" aria-hidden="true" />
|
|
<span>{readTime}</span>
|
|
</div>
|
|
</div>
|
|
</article>
|
|
);
|
|
|
|
if (href) return (
|
|
<Link href={href} style={style} className="bento-card-link">
|
|
{inner}
|
|
</Link>
|
|
);
|
|
return inner;
|
|
};
|
|
|
|
export default BentoCard;
|