feat: remove embed center

This commit is contained in:
DIYgod 2024-01-14 14:16:52 +08:00
parent b62f1c1c3d
commit f758d5ff90
No known key found for this signature in database
3 changed files with 7 additions and 10 deletions

View File

@ -19,13 +19,11 @@ export default function Tweet({
fullUrl: string
}) {
return (
<div className="flex justify-center">
<ReactTweet
id={id}
components={components}
apiUrl={`${SITE_URL}/api/tweet?id=${id}`}
fallback={<>{fullUrl}</>}
/>
</div>
<ReactTweet
id={id}
components={components}
apiUrl={`${SITE_URL}/api/tweet?id=${id}`}
fallback={<p>{fullUrl}</p>}
/>
)
}

View File

@ -49,7 +49,6 @@ export const NetEaseMusicTransformer: Transformer = {
name: "netease",
src: iframe.src,
height: iframe.height + "px",
width: "330px",
allow:
"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",
})

View File

@ -30,7 +30,7 @@ export const generateIframeHTML = ({
})
.join(" ")
return `<div class="xlog-post-content-${name} relative my-4 mx-auto" style="${
return `<div class="xlog-post-content-${name} relative my-4" style="${
ratio ? `aspect-ratio: ${ratio};` : `width: ${width}; height: ${height};`
}">
<iframe class="absolute left-0 top-0 w-full h-full" src="${src}" border="0" ${iframeAttributes}></iframe>