feat: add script to generate default blog cover image
- 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`.
This commit is contained in:
+72
-1
@@ -904,4 +904,75 @@ html {
|
||||
|
||||
.hover-item-clinic:hover h3 {
|
||||
color: #f17732;
|
||||
}
|
||||
}
|
||||
/* ── محتوای مقاله (خروجی CKEditor پنل ادمین) ──────────────────────────────
|
||||
sanitizeHtml عمداً class و style را حذف میکند، پس استایل جدول/لیست/تیتر
|
||||
باید از اینجا بیاید وگرنه محتوا لخت و بدون ساختار دیده میشود. */
|
||||
.blog-content h2,
|
||||
.blog-content h3,
|
||||
.blog-content h4,
|
||||
.blog-content h5 {
|
||||
color: #3b3b3b;
|
||||
font-weight: 700;
|
||||
margin: 24px 0 12px;
|
||||
line-height: 1.8;
|
||||
}
|
||||
.blog-content h2 { font-size: 20px; }
|
||||
.blog-content h3 { font-size: 18px; }
|
||||
.blog-content h4,
|
||||
.blog-content h5 { font-size: 16px; }
|
||||
.blog-content p { margin-bottom: 12px; }
|
||||
.blog-content ul,
|
||||
.blog-content ol {
|
||||
margin: 12px 0;
|
||||
padding-right: 22px;
|
||||
}
|
||||
.blog-content ul { list-style: disc; }
|
||||
.blog-content ol { list-style: decimal; }
|
||||
.blog-content li { margin-bottom: 6px; }
|
||||
.blog-content a {
|
||||
color: #5559ce;
|
||||
text-decoration: underline;
|
||||
text-underline-offset: 3px;
|
||||
}
|
||||
.blog-content blockquote {
|
||||
margin: 16px 0;
|
||||
padding: 12px 16px;
|
||||
border-right: 3px solid #f17732;
|
||||
background: #fafafa;
|
||||
border-radius: 8px;
|
||||
color: #3b3b3b;
|
||||
}
|
||||
.blog-content figure { margin: 16px 0; }
|
||||
.blog-content figcaption {
|
||||
margin-top: 8px;
|
||||
color: #9b9b9b;
|
||||
font-size: 13px;
|
||||
text-align: center;
|
||||
}
|
||||
.blog-content img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
border-radius: 8px;
|
||||
}
|
||||
/* جدول روی موبایل نباید صفحه را افقی اسکرول کند. */
|
||||
.blog-content figure.table,
|
||||
.blog-content .table-wrapper {
|
||||
overflow-x: auto;
|
||||
}
|
||||
.blog-content table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin: 16px 0;
|
||||
font-size: 14px;
|
||||
}
|
||||
.blog-content :is(th, td) {
|
||||
border: 1px solid #e5e5e5;
|
||||
padding: 8px 12px;
|
||||
text-align: right;
|
||||
}
|
||||
.blog-content th {
|
||||
background: #f5f5f5;
|
||||
font-weight: 700;
|
||||
color: #3b3b3b;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user