mirror of
https://github.com/one-among-us/data.git
synced 2024-11-25 12:37:38 +08:00
[F] Fix overflow
This commit is contained in:
parent
d861322451
commit
376d567de0
@ -32,7 +32,7 @@ function handleBanner(md: string): string {
|
||||
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"><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="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>`
|
||||
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>`
|
||||
})
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user