@webnumseoagent/next 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/blog.tsx +2 -2
- package/dist/blog.js +2 -2
- package/package.json +1 -1
package/blog.tsx
CHANGED
|
@@ -260,7 +260,7 @@ function themeStyle(theme?: SeoBlogTheme): Record<string, string> {
|
|
|
260
260
|
|
|
261
261
|
// Сетка/карточки списка — через класс + медиазапросы (инлайн-стиль их не умеет): 1→2→3→4 колонки.
|
|
262
262
|
// Цвета/рамки/скругления берутся из --sa-* (авто-тема сайта). Наследует шрифт/цвет текста от layout.
|
|
263
|
-
const GRID_CSS = `.sa-blog-wrap{max-width:1120px;margin:0 auto;padding:
|
|
263
|
+
const GRID_CSS = `.sa-blog-wrap{max-width:1120px;margin:0 auto;padding:var(--sa-blog-top,clamp(5rem,8vw,7rem)) 1.25rem 3rem}
|
|
264
264
|
.sa-blog-h1{font-size:2rem;line-height:1.2;margin:0 0 1.5rem}
|
|
265
265
|
.sa-blog-grid{display:grid;gap:1.5rem;grid-template-columns:1fr}
|
|
266
266
|
@media(min-width:560px){.sa-blog-grid{grid-template-columns:repeat(2,1fr)}}
|
|
@@ -329,7 +329,7 @@ export async function SeoBlogIndex(props: { locale?: string; basePath?: string;
|
|
|
329
329
|
// Одна статья. Принимает пост (из seoBlogPost) — так страница может сделать notFound()/метаданные.
|
|
330
330
|
export function SeoBlogArticle({ post, locale }: { post: SeoBlogPostFull; locale?: string }) {
|
|
331
331
|
return (
|
|
332
|
-
<article style={{ maxWidth: 760, margin: "0 auto", padding: "1.5rem", lineHeight: 1.7, ...themeStyle(post.theme) } as CSSProperties}>
|
|
332
|
+
<article style={{ maxWidth: 760, margin: "0 auto", padding: "var(--sa-blog-top, clamp(5rem, 8vw, 7rem)) 1.5rem 3rem", lineHeight: 1.7, ...themeStyle(post.theme) } as CSSProperties}>
|
|
333
333
|
<style dangerouslySetInnerHTML={{ __html: BODY_CSS }} />
|
|
334
334
|
{post.cover ? <img src={post.cover} alt={post.title} style={{ width: "100%", borderRadius: "var(--sa-radius, 12px)", marginBottom: "1.5rem" }} /> : null}
|
|
335
335
|
<h1 style={{ fontSize: "2.2rem", lineHeight: 1.2, margin: "0 0 1rem" }}>{post.title}</h1>
|
package/dist/blog.js
CHANGED
|
@@ -266,7 +266,7 @@ function themeStyle(theme) {
|
|
|
266
266
|
}
|
|
267
267
|
// Сетка/карточки списка — через класс + медиазапросы (инлайн-стиль их не умеет): 1→2→3→4 колонки.
|
|
268
268
|
// Цвета/рамки/скругления берутся из --sa-* (авто-тема сайта). Наследует шрифт/цвет текста от layout.
|
|
269
|
-
const GRID_CSS = `.sa-blog-wrap{max-width:1120px;margin:0 auto;padding:
|
|
269
|
+
const GRID_CSS = `.sa-blog-wrap{max-width:1120px;margin:0 auto;padding:var(--sa-blog-top,clamp(5rem,8vw,7rem)) 1.25rem 3rem}
|
|
270
270
|
.sa-blog-h1{font-size:2rem;line-height:1.2;margin:0 0 1.5rem}
|
|
271
271
|
.sa-blog-grid{display:grid;gap:1.5rem;grid-template-columns:1fr}
|
|
272
272
|
@media(min-width:560px){.sa-blog-grid{grid-template-columns:repeat(2,1fr)}}
|
|
@@ -304,7 +304,7 @@ async function SeoBlogIndex(props) {
|
|
|
304
304
|
}
|
|
305
305
|
// Одна статья. Принимает пост (из seoBlogPost) — так страница может сделать notFound()/метаданные.
|
|
306
306
|
function SeoBlogArticle({ post, locale }) {
|
|
307
|
-
return ((0, jsx_runtime_1.jsxs)("article", { style: { maxWidth: 760, margin: "0 auto", padding: "1.5rem", lineHeight: 1.7, ...themeStyle(post.theme) }, children: [(0, jsx_runtime_1.jsx)("style", { dangerouslySetInnerHTML: { __html: BODY_CSS } }), post.cover ? (0, jsx_runtime_1.jsx)("img", { src: post.cover, alt: post.title, style: { width: "100%", borderRadius: "var(--sa-radius, 12px)", marginBottom: "1.5rem" } }) : null, (0, jsx_runtime_1.jsx)("h1", { style: { fontSize: "2.2rem", lineHeight: 1.2, margin: "0 0 1rem" }, children: post.title }), post.date ? (0, jsx_runtime_1.jsx)("p", { style: { color: "var(--sa-muted, #94a3b8)", margin: "0 0 1.5rem" }, children: fmtDate(post.date, locale) }) : null, (0, jsx_runtime_1.jsx)("div", { className: "seoagent-blog-body", dangerouslySetInnerHTML: { __html: post.bodyHtml } })] }));
|
|
307
|
+
return ((0, jsx_runtime_1.jsxs)("article", { style: { maxWidth: 760, margin: "0 auto", padding: "var(--sa-blog-top, clamp(5rem, 8vw, 7rem)) 1.5rem 3rem", lineHeight: 1.7, ...themeStyle(post.theme) }, children: [(0, jsx_runtime_1.jsx)("style", { dangerouslySetInnerHTML: { __html: BODY_CSS } }), post.cover ? (0, jsx_runtime_1.jsx)("img", { src: post.cover, alt: post.title, style: { width: "100%", borderRadius: "var(--sa-radius, 12px)", marginBottom: "1.5rem" } }) : null, (0, jsx_runtime_1.jsx)("h1", { style: { fontSize: "2.2rem", lineHeight: 1.2, margin: "0 0 1rem" }, children: post.title }), post.date ? (0, jsx_runtime_1.jsx)("p", { style: { color: "var(--sa-muted, #94a3b8)", margin: "0 0 1.5rem" }, children: fmtDate(post.date, locale) }) : null, (0, jsx_runtime_1.jsx)("div", { className: "seoagent-blog-body", dangerouslySetInnerHTML: { __html: post.bodyHtml } })] }));
|
|
308
308
|
}
|
|
309
309
|
function fmtDate(d, locale) {
|
|
310
310
|
try {
|
package/package.json
CHANGED