feat: 카드뉴스 포스트(관리자 admin/, /v1/card API, 피드 이미지 슬라이드), 인스타 홍보 기획 문서
This commit is contained in:
1 parent
96cbd19c61
commit
739a8c59eb
107 files changed
+17684
-19
No files matched your search
@@ -0,0 +1,32 @@
|
||||
import type { CSSProperties, ReactNode } from 'react'
|
||||
import { themeVars } from './themes'
|
||||
|
||||
/** 줄바꿈(\n)은 카드에서도 줄바꿈, *별표* 사이는 강조색 */
|
||||
export function Lines({ text }: { text: string }) {
|
||||
return text.split('\n').map((line, i) => (
|
||||
<span className="line" key={i}>
|
||||
{line.split(/(\*[^*]+\*)/).map((part, j) => (part.startsWith('*') && part.endsWith('*') ? <strong key={j}>{part.slice(1, -1)}</strong> : part))}
|
||||
</span>
|
||||
))
|
||||
}
|
||||
|
||||
export function Frame({ page, total, theme, skin, className = '', style, children }: { page: number; total: number; theme?: string; skin?: string; className?: string; style?: CSSProperties; children: ReactNode }) {
|
||||
return (
|
||||
<section className={`slide ${className}`} data-skin={skin || 'star'} style={{ ...themeVars(theme), ...style }}>
|
||||
<header className="topbar">
|
||||
<div className="brand">
|
||||
<i className="brand-mark" aria-hidden="true" />
|
||||
날씨각
|
||||
</div>
|
||||
{total > 1 && (
|
||||
<div className="pagination" aria-hidden="true">
|
||||
{Array.from({ length: total }, (_, i) => (
|
||||
<i key={i} className={i === page ? 'active' : ''} />
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</header>
|
||||
{children}
|
||||
</section>
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user