feat: entry content open in blank
This commit is contained in:
parent
4b0a8c2f65
commit
b5e6d7e8d5
|
|
@ -17,11 +17,13 @@ export function EntryContent({
|
|||
|
||||
return (
|
||||
<div className="px-4 py-5 overflow-y-auto h-full">
|
||||
<div className='max-w-[550px] mx-auto'>
|
||||
<div className="text-3xl font-bold">{entry?.title}</div>
|
||||
<div className="mt-2 text-[13px] text-zinc-500 font-medium">{entry?.feed?.title}</div>
|
||||
<div className="text-[13px] text-zinc-500">{new Date(entry?.published_at).toUTCString()}</div>
|
||||
<div className="mt-10 prose text-[15px] prose-zinc">{content}</div>
|
||||
<div>
|
||||
<a href={entry?.url} target='_blank' className='block hover:bg-zinc-100 max-w-[598px] mx-auto p-6 rounded-md transition-colors cursor-pointer'>
|
||||
<div className="text-3xl font-bold select-text">{entry?.title}</div>
|
||||
<div className="mt-2 text-[13px] text-zinc-500 font-medium">{entry?.feed?.title}</div>
|
||||
<div className="text-[13px] text-zinc-500">{new Date(entry?.published_at).toUTCString()}</div>
|
||||
</a>
|
||||
<div className="max-w-[550px] mx-auto mt-10 prose text-[15px] prose-zinc select-text">{content}</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -35,6 +35,8 @@ export const parseHtml = async (content: string) => {
|
|||
typeof node.properties.src === "string"
|
||||
) {
|
||||
metadata.images.push(node.properties.src)
|
||||
} else if (node.tagName === "a") {
|
||||
node.properties.target = "_blank"
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue