mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 12:17:24 +00:00
Improve article rendering.
This commit is contained in:
@@ -4,24 +4,28 @@ article {
|
|||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
|
font-size: 24px;
|
||||||
|
font-weight: bold;
|
||||||
|
padding: 12px 0;
|
||||||
|
margin: 24px 0 12px;
|
||||||
|
}
|
||||||
|
h2 {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
padding: 12px 0;
|
padding: 12px 0;
|
||||||
}
|
margin: 16px 0 8px;
|
||||||
h2 {
|
|
||||||
font-size: 18px;
|
|
||||||
font-weight: bold;
|
|
||||||
padding: 10px 0;
|
|
||||||
}
|
}
|
||||||
h3 {
|
h3 {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
padding: 8px 0;
|
padding: 6px 0;
|
||||||
|
margin: 12px 0 4px;
|
||||||
}
|
}
|
||||||
h4 {
|
h4 {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
padding: 6px 0;
|
padding: 6px 0;
|
||||||
|
margin: 12px 0 4px;
|
||||||
}
|
}
|
||||||
h5 {
|
h5 {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
@@ -36,7 +40,7 @@ article {
|
|||||||
p {
|
p {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
margin: 8px 0;
|
margin: 12px 0;
|
||||||
}
|
}
|
||||||
ul {
|
ul {
|
||||||
list-style-type: disc;
|
list-style-type: disc;
|
||||||
|
@@ -279,7 +279,7 @@ function Article({resource}: { resource: ResourceDetails }) {
|
|||||||
})
|
})
|
||||||
html = splits.join(" ")
|
html = splits.join(" ")
|
||||||
return <div
|
return <div
|
||||||
className={`w-full max-w-xl rounded-xl overflow-clip ${html.includes("youtube") ? "aspect-video" : "h-48 sm:h-64"}`}
|
className={`w-full my-3 max-w-xl rounded-xl overflow-clip ${html.includes("youtube") ? "aspect-video" : "h-48 sm:h-64"}`}
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: html
|
__html: html
|
||||||
}}></div>
|
}}></div>
|
||||||
|
Reference in New Issue
Block a user