fix(share): og image grid width and image align top to description

Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
Innei
2024-10-29 17:35:52 +08:00
parent 32f68ee198
commit 14e37da0ce
2 changed files with 23 additions and 21 deletions
+20 -18
View File
@@ -50,27 +50,29 @@ function NormalListItemImpl({
{/* {!!entry.collections && <StarIcon className="absolute right-0 top-0" />} */}
</div>
{withDetails && (
<div className={cn("text-[13px]", "text-zinc-400 dark:text-neutral-500")}>
{entry.entries.description}
<div className="flex gap-2">
<div className={cn("text-[13px]", "text-zinc-400 dark:text-neutral-500")}>
{entry.entries.description}
</div>
{entry.entries.media?.[0] && (
<div className="relative size-24 shrink-0 overflow-hidden rounded">
<LazyImage
proxy={{
width: 160,
height: 160,
}}
className="overflow-hidden rounded"
src={entry.entries.media[0].url}
height={entry.entries.media[0].height}
width={entry.entries.media[0].width}
blurhash={entry.entries.media[0].blurhash}
/>
</div>
)}
</div>
)}
</div>
{withDetails && entry.entries.media?.[0] && (
<div className="relative size-24 overflow-hidden rounded">
<LazyImage
proxy={{
width: 160,
height: 160,
}}
className="overflow-hidden rounded"
src={entry.entries.media[0].url}
height={entry.entries.media[0].height}
width={entry.entries.media[0].width}
blurhash={entry.entries.media[0].blurhash}
/>
</div>
)}
</div>
)
}
+3 -3
View File
@@ -37,7 +37,7 @@ export const renderFeedOG = async (apiClient: ApiClient, feedId: string) => {
alignItems: "center",
justifyContent: "center",
flexShrink: 0,
width: "45%",
width: "40%",
}}
>
<OGAvatar base64={imageBase64} title={title!} />
@@ -47,7 +47,7 @@ export const renderFeedOG = async (apiClient: ApiClient, feedId: string) => {
display: "flex",
flexGrow: 1,
flexShrink: 1,
width: "52%",
width: "60%",
flexDirection: "column",
overflow: "hidden",
textAlign: "left",
@@ -67,7 +67,7 @@ export const renderFeedOG = async (apiClient: ApiClient, feedId: string) => {
<p
style={{
fontSize: "1.8rem",
height: "5.8rem",
height: "5.6rem",
overflow: "hidden",
lineClamp: 2,
color: "#000000",