1
0
mirror of https://github.com/one-among-us/data.git synced 2024-11-22 19:24:51 +08:00

[O] Use CapDown Quote

This commit is contained in:
Elihuso Quigley 2024-08-05 08:20:52 +08:00
parent 0ba960757e
commit 76181332e1
2 changed files with 1 additions and 39 deletions

View File

@ -9,33 +9,7 @@ info:
支离破碎的记忆,交叉,组合,分裂,堙灭…… 支离破碎的记忆,交叉,组合,分裂,堙灭……
> “你走了呀……姊姊……” <blockquote><CapDownQuote messages={[["“你走了呀……姊姊……”", "这个天线的馈线那些怎么看来着"], ["不上学了嘛", "不是说好了下一次"], ["山猫猫抱住~", "她听力不太好哦"], ["为什么", "把我们丢在这"], ["这是为了她", "下一次一起打mai"], ["教我开车嘛~", "帮我照顾好山猫猫~"], ["姊姊好厉害好羡慕", "又被家里人说了公司的工作也很多"]]} /></blockquote>
>
> “这个天线的馈线那些怎么看来着?”
>
> “不上学了嘛……”
>
> “不是说好了下一次……”
>
> “山猫猫!抱住~”
>
> “她听力不太好哦……”
>
> “为什么……”
>
> “把我们丢在这……”
>
> “这是为了她……”
>
> “下一次一起打mai……”
>
> “教我开车嘛~”
>
> “帮我照顾好山猫猫~“
>
> “姊姊好厉害,好羡慕……”
>
> “又被家里人说了,公司的工作也很多……”
## 电波 ## 电波

View File

@ -27,15 +27,6 @@ function handleNoteIcon(md: string): string {
return md.replace(/\[\!(\w+)\](?::\s*(.*))?/g, (match, icon, _) => Icon[icon as string]); return md.replace(/\[\!(\w+)\](?::\s*(.*))?/g, (match, icon, _) => Icon[icon as string]);
} }
function handleBanner(md: string): string {
if (!md.includes('[[')) return md;
return md.replace(/\[\[(.*?)\]\]/g, (match, raw) => {
const data = JSON.parse(raw) as BannerData
if (data.type != 'banner') return match
return `<div style="width: 90%; margin: 10px auto; min-height: 100px; display: box; background: #fff4eb; border-radius: 30px; border-color: rgba(166, 134, 89, 0.84); border-style: solid; border-width: 2px; height: fit-content"><div style="height: 80px; width: 80px; margin-left: 10px; margin-right: 10px; margin-top: 10px; margin-bottom: 10px; display: inline-grid; vertical-align: top"><img src="${data.icon}" style="width: 100%; height: 100%; border-radius: 20px" /></div><div style="min-height: 80px; width: calc(100% - 150px); margin-left: 10px; margin-right: 10px; margin-top: 10px; margin-bottom: 10px; display: inline-grid; vertical-align: top" ><h3 style="color: #70512a; margin: 5px; font-size: 1.4rem">${data.title}</h3><p style="color: rgba(166, 134, 89, 0.84); margin: 5px; font-size: 1rem">${data.text}</p></div></div>`
})
}
export function handleFeatures(markdown: string): string { export function handleFeatures(markdown: string): string {
// Handle Footnote // Handle Footnote
let md = handleFootnote(markdown) let md = handleFootnote(markdown)
@ -46,8 +37,5 @@ export function handleFeatures(markdown: string): string {
// Handle Icon // Handle Icon
md = handleNoteIcon(md) md = handleNoteIcon(md)
// Handle Banner
md = handleBanner(md)
return md return md
} }