feat: 友链/书库/移动端导航/排行榜等多模块功能
新增模块: - 友链(friendlink)后端处理 + 前端管理页与友链板 - 书库(library):导入、章节、封面、阅读页、横竖版自适应 AdaptiveCoverSlot - 顶栏导航(header_nav)配置与 MobileTabBar/MobileRailDrawers 移动端抽屉 - 排行榜 service 测试、站点页面测试、时间线发布(timeline_release) 其它改动: - 后端 handlers/services 全量小幅调整 - 前端组件、库函数、URL/品牌/站点 URL 工具更新 - Lightbox 图片、MdEntries 条目卡、coverColor 派生色相等前端能力
This commit is contained in:
@@ -48,34 +48,44 @@ export default function MdTimeline({ items, renderBody }: MdTimelineProps) {
|
||||
style={{ scrollMarginTop: 90 }}
|
||||
aria-labelledby={`${timelineDayId(g.date)}-label`}
|
||||
>
|
||||
<div className="j13-timeline-day-label" id={`${timelineDayId(g.date)}-label`}>
|
||||
<time dateTime={/^\d{4}-\d{2}-\d{2}$/.test(g.date) ? g.date : undefined}>
|
||||
{g.date}
|
||||
</time>
|
||||
<span className="j13-timeline-day-count">{g.items.length}</span>
|
||||
</div>
|
||||
<ul className="j13-timeline-items">
|
||||
{g.items.map((it) => {
|
||||
const idx = flat++;
|
||||
{g.items.map((it, idx) => {
|
||||
const flatIdx = flat++;
|
||||
const { kind, scope, rest } = splitTitlePrefix(it.title);
|
||||
const bodyNode = renderBody
|
||||
? renderBody(it, idx)
|
||||
? renderBody(it, flatIdx)
|
||||
: it.body.trim()
|
||||
? <span className="whitespace-pre-wrap">{it.body}</span>
|
||||
: null;
|
||||
const isFirstInDay = idx === 0;
|
||||
|
||||
return (
|
||||
<li key={`${g.date}-${idx}-${it.title}`} className="j13-timeline-item" role="listitem">
|
||||
<li
|
||||
key={`${g.date}-${flatIdx}-${it.title}`}
|
||||
className={`j13-timeline-item${isFirstInDay ? " is-first-in-day" : ""}`}
|
||||
role="listitem"
|
||||
>
|
||||
<span className="j13-timeline-dot" aria-hidden />
|
||||
<div className="j13-timeline-card">
|
||||
<div className="j13-timeline-head">
|
||||
{isFirstInDay ? (
|
||||
<div
|
||||
className="j13-timeline-day-label"
|
||||
id={`${timelineDayId(g.date)}-label`}
|
||||
>
|
||||
<time dateTime={/^\d{4}-\d{2}-\d{2}$/.test(g.date) ? g.date : undefined}>
|
||||
{g.date}
|
||||
</time>
|
||||
<span className="j13-timeline-day-count">{g.items.length}</span>
|
||||
</div>
|
||||
) : null}
|
||||
<p className="j13-timeline-summary">{rest}</p>
|
||||
{kind ? (
|
||||
<span className={`j13-timeline-chip is-${kind}`}>
|
||||
{kind}
|
||||
{scope ? <span className="j13-timeline-chip-scope">({scope})</span> : null}
|
||||
</span>
|
||||
) : null}
|
||||
<p className="j13-timeline-summary">{rest}</p>
|
||||
{it.sourceUrl ? (
|
||||
<a
|
||||
href={it.sourceUrl}
|
||||
|
||||
Reference in New Issue
Block a user