- Introduced a new script `make-blog-cover.mjs` to create a default cover image for blog posts. - The image is generated in PNG format with dimensions 1200x630, suitable for Open Graph. - Utilizes the site's branding colors and logo from `public/nobat724.svg`. - Includes custom font styling using the Vazirmatn font. - The generated image is saved to `public/assets/images/blog-default-cover.png`.
38 lines
1.3 KiB
JavaScript
38 lines
1.3 KiB
JavaScript
/**
|
|
* منابع مقاله (`sources` در پاسخ API) — سیگنال E-E-A-T که تا این تغییر اصلاً
|
|
* رندر نمیشد. هر آیتم `{ url, title }` است؛ آیتم بدون url رد میشود.
|
|
*
|
|
* لینکها `nofollow` میگیرند: منبع بیرونی تأیید ما را همراه ندارد.
|
|
*/
|
|
function Sources({ data }) {
|
|
const items = (Array.isArray(data?.sources) ? data.sources : []).filter(
|
|
(s) => s?.url
|
|
);
|
|
|
|
if (items.length === 0) return null;
|
|
|
|
return (
|
|
<section className="mt-[16px] sm:mt-[20px] md:mt-[24px]">
|
|
<h2 className="text-[#3B3B3B] text-[14px] sm:text-[16px] md:text-[18px] lg:text-[20px] font-bold mb-[12px] md:mb-[16px]">
|
|
منابع
|
|
</h2>
|
|
<ul className="flex flex-col gap-[6px] md:gap-[8px] list-disc pr-[18px]">
|
|
{items.map((item, idx) => (
|
|
<li key={`${item.url}-${idx}`} className="text-[#525252] text-[12px] md:text-[14px]">
|
|
<a
|
|
href={item.url}
|
|
target="_blank"
|
|
rel="nofollow noopener noreferrer"
|
|
className="hover:text-[#3B3B3B] break-all"
|
|
>
|
|
{item.title || item.url}
|
|
</a>
|
|
</li>
|
|
))}
|
|
</ul>
|
|
</section>
|
|
);
|
|
}
|
|
|
|
export default Sources;
|