feat: 小红书模板底部改为cover.guanghulab.com子域名 · 等宽字体水印
This commit is contained in:
parent
e3e5b86bec
commit
1a5279493b
@ -52,16 +52,10 @@ export function xiaohongshuCard(data) {
|
||||
if (trimmed.startsWith('## ')) {
|
||||
return `<h3 class="sub-heading">${trimmed.slice(3)}</h3>`
|
||||
}
|
||||
// 内联加粗 **text**
|
||||
const formatted = trimmed.replace(/\*\*(.+?)\*\*/g, '<strong>$1</strong>')
|
||||
return `<p>${formatted}</p>`
|
||||
}).join('\n')
|
||||
|
||||
const hasList = bodyLines.some(l => {
|
||||
const t = l.trimStart()
|
||||
return t.startsWith('- ') || t.startsWith('• ')
|
||||
})
|
||||
|
||||
const C = {
|
||||
bg: 'var(--bg, #faf8f5)',
|
||||
primary: 'var(--primary, #1a1a2e)',
|
||||
@ -293,7 +287,7 @@ export function xiaohongshuCard(data) {
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
/* ── 底部 ── */
|
||||
/* ── 底部 · 子域名水印 ── */
|
||||
.footer {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
@ -305,6 +299,14 @@ export function xiaohongshuCard(data) {
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.footer-domain {
|
||||
font-family: 'SF Mono', 'Fira Code', monospace;
|
||||
font-size: 16px;
|
||||
color: ${C.accent};
|
||||
opacity: 0.6;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.footer-dot {
|
||||
display: inline-block;
|
||||
width: 6px;
|
||||
@ -323,7 +325,7 @@ export function xiaohongshuCard(data) {
|
||||
|
||||
<div class="container">
|
||||
|
||||
${tag ? `<div class="tag">${tag.toUpperCase()}</div>` : ''}
|
||||
${tag ? `<div class="tag">${tag}</div>` : ''}
|
||||
|
||||
${layout === 'quote' ? `
|
||||
<div class="quote-wrapper">
|
||||
@ -347,7 +349,7 @@ export function xiaohongshuCard(data) {
|
||||
`}
|
||||
|
||||
<div class="footer">
|
||||
<span>光湖 · 封面工作室</span>
|
||||
<span class="footer-domain">cover.guanghulab.com</span>
|
||||
${totalPages > 1 ? `<span>${pageNum}<span class="footer-dot"></span>${totalPages}</span>` : ''}
|
||||
</div>
|
||||
|
||||
@ -358,9 +360,6 @@ export function xiaohongshuCard(data) {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 生成小红书轮播(多页)
|
||||
*/
|
||||
export function xiaohongshuCarousel(data, pages) {
|
||||
return pages.map((body, i) => xiaohongshuCard({
|
||||
...data,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user