refactor: remove unused description style and related logic

This commit is contained in:
2026-01-01 15:50:30 +08:00
parent 39b32e6e3b
commit 6b5d6e6ca5

View File

@@ -121,13 +121,6 @@ const titleStyle: CSSProperties = {
whiteSpace: 'pre-line',
}
const descriptionStyle: CSSProperties = {
fontSize: 30,
lineHeight: 1.45,
color: 'rgba(15, 23, 42, 0.75)',
whiteSpace: 'pre-line',
}
const metaRowStyle: CSSProperties = {
display: 'flex',
justifyContent: 'space-between',
@@ -177,7 +170,6 @@ export const GET: APIRoute = async ({ params }) => {
const remotePost = slug ? await fetchRemotePost(slug) : null
const post = remotePost ? normalizePost(remotePost.post) : null
const title = post?.data?.title || SITE.title
const description = post?.data?.description || SITE.description
const dateValue = post?.data?.date ?? null
const meta = dateValue
? `${SITE.title} | ${formatDate(dateValue)}`
@@ -185,7 +177,6 @@ export const GET: APIRoute = async ({ params }) => {
const siteHost = new URL(SITE.href).host
const formattedDate = dateValue ? formatDate(dateValue) : null
const titleBlock = wrapAsBlock(title, 24, 2)
const descriptionBlock = wrapAsBlock(description, 44, 3)
const badge = createElement('div', { style: badgeStyle }, [
createElement('span', { style: badgeDotStyle }),
@@ -198,12 +189,6 @@ export const GET: APIRoute = async ({ params }) => {
createElement('div', { style: titleStyle }, titleBlock),
]
if (descriptionBlock) {
cardChildren.push(
createElement('div', { style: descriptionStyle }, descriptionBlock),
)
}
const metaRow = createElement('div', { style: metaRowStyle }, [
createElement('div', { style: metaLeftStyle }, [
createElement('div', { style: metaLabelStyle }, 'PUBLISHED'),