@webnumseoagent/next 0.7.5 → 0.7.7
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 +7 -1
- package/dist/blog.js +7 -1
- package/package.json +1 -1
package/blog.tsx
CHANGED
|
@@ -62,6 +62,12 @@ const BODY_CSS = `.seoagent-blog-body{color:inherit}
|
|
|
62
62
|
.seoagent-blog-body h2{margin:1.75rem 0 .75rem;font-size:1.5rem;line-height:1.3}
|
|
63
63
|
.seoagent-blog-body h3{margin:1.4rem 0 .6rem;font-size:1.2rem}
|
|
64
64
|
.seoagent-blog-body p{margin:0 0 1rem}
|
|
65
|
+
.seoagent-blog-body ul{list-style:disc;margin:0 0 1rem;padding-left:1.6rem}
|
|
66
|
+
.seoagent-blog-body ol{list-style:decimal;margin:0 0 1rem;padding-left:1.6rem}
|
|
67
|
+
.seoagent-blog-body li{margin:.35rem 0}
|
|
68
|
+
.seoagent-blog-body li>ul,.seoagent-blog-body li>ol{margin:.35rem 0}
|
|
69
|
+
.seoagent-blog-body strong,.seoagent-blog-body b{font-weight:700}
|
|
70
|
+
.seoagent-blog-body em,.seoagent-blog-body i{font-style:italic}
|
|
65
71
|
.seoagent-blog-body a{color:var(--sa-accent,#2563eb)}
|
|
66
72
|
.seoagent-blog-body figure{margin:1.25rem 0}
|
|
67
73
|
.seoagent-blog-body figcaption{color:var(--sa-muted,#94a3b8);font-size:.85em;text-align:center;margin-top:.4rem}
|
|
@@ -139,7 +145,7 @@ export function SeoBlogArticle({ post, locale }: { post: SeoBlogPostFull; locale
|
|
|
139
145
|
return (
|
|
140
146
|
<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}>
|
|
141
147
|
<style dangerouslySetInnerHTML={{ __html: BODY_CSS }} />
|
|
142
|
-
{post.cover ? <img src={post.cover} alt={post.title} style={{ width: "100%", borderRadius: "var(--sa-radius, 12px)", marginBottom: "1.5rem" }} /> : null}
|
|
148
|
+
{post.cover ? <img src={post.cover} alt={post.title} style={{ width: "100%", aspectRatio: "3 / 2", objectFit: "cover", display: "block", borderRadius: "var(--sa-radius, 12px)", marginBottom: "1.5rem" }} /> : null}
|
|
143
149
|
<h1 style={{ fontSize: "2.2rem", lineHeight: 1.2, margin: "0 0 1rem" }}>{post.title}</h1>
|
|
144
150
|
{post.date ? <p style={{ color: "var(--sa-muted, #94a3b8)", margin: "0 0 1.5rem" }}>{fmtDate(post.date, locale)}</p> : null}
|
|
145
151
|
{/* Тело уже санитайзено при доставке — рендерим как HTML. */}
|
package/dist/blog.js
CHANGED
|
@@ -80,6 +80,12 @@ const BODY_CSS = `.seoagent-blog-body{color:inherit}
|
|
|
80
80
|
.seoagent-blog-body h2{margin:1.75rem 0 .75rem;font-size:1.5rem;line-height:1.3}
|
|
81
81
|
.seoagent-blog-body h3{margin:1.4rem 0 .6rem;font-size:1.2rem}
|
|
82
82
|
.seoagent-blog-body p{margin:0 0 1rem}
|
|
83
|
+
.seoagent-blog-body ul{list-style:disc;margin:0 0 1rem;padding-left:1.6rem}
|
|
84
|
+
.seoagent-blog-body ol{list-style:decimal;margin:0 0 1rem;padding-left:1.6rem}
|
|
85
|
+
.seoagent-blog-body li{margin:.35rem 0}
|
|
86
|
+
.seoagent-blog-body li>ul,.seoagent-blog-body li>ol{margin:.35rem 0}
|
|
87
|
+
.seoagent-blog-body strong,.seoagent-blog-body b{font-weight:700}
|
|
88
|
+
.seoagent-blog-body em,.seoagent-blog-body i{font-style:italic}
|
|
83
89
|
.seoagent-blog-body a{color:var(--sa-accent,#2563eb)}
|
|
84
90
|
.seoagent-blog-body figure{margin:1.25rem 0}
|
|
85
91
|
.seoagent-blog-body figcaption{color:var(--sa-muted,#94a3b8);font-size:.85em;text-align:center;margin-top:.4rem}
|
|
@@ -141,7 +147,7 @@ async function SeoBlogIndex(props) {
|
|
|
141
147
|
}
|
|
142
148
|
// Одна статья. Принимает пост (из seoBlogPost) — так страница может сделать notFound()/метаданные.
|
|
143
149
|
function SeoBlogArticle({ post, locale }) {
|
|
144
|
-
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 } })] }));
|
|
150
|
+
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%", aspectRatio: "3 / 2", objectFit: "cover", display: "block", 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 } })] }));
|
|
145
151
|
}
|
|
146
152
|
function fmtDate(d, locale) {
|
|
147
153
|
try {
|
package/package.json
CHANGED