feat: new

This commit is contained in:
2025-11-28 20:22:33 +08:00
parent 7cffbaaacf
commit 9a93e8060c
6 changed files with 50 additions and 26 deletions

View File

@@ -10,7 +10,7 @@ export interface Props {
}
const { block } = Astro.props
console.log(block)
const target = block.Bookmark || block.LinkPreview || block.Embed
const urlString = target?.Url
@@ -37,7 +37,7 @@ try {
<div class="bookmark">
<a href={url.toString()} target="_blank" rel="noopener noreferrer">
<div>
<div>{target?.Url}</div>
<Caption richTexts={block.Bookmark?.Caption ?? []} />
<div class="muted">{url.hostname}</div>
<div>
<div>
@@ -51,7 +51,7 @@ try {
</div>
</div>
</a>
<Caption richTexts={block.Bookmark?.Caption ?? []} />
</div>
)}
</>