feat: use embeds in post pages
This commit is contained in:
1 parent
e21f3a0e55
commit
a4f3b9a98d
2 files changed
+6
-13
No files matched your search
@@ -40,10 +40,10 @@
|
|||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{#if thumbnail_url}
|
{#if thumbnail_url}
|
||||||
<a href={url} class="ml-auto">
|
<a href={url} class="ml-auto max-w-[150px] w-full flex-shrink">
|
||||||
<img
|
<img
|
||||||
src={thumbnail_url}
|
src={thumbnail_url}
|
||||||
class="rounded-lg max-w-[200px] w-full h-auto aspect-video object-cover bg-slate-200 dark:bg-zinc-800"
|
class="rounded-lg max-w-[200px] w-full h-full max-h-24 object-cover bg-slate-200 dark:bg-zinc-800"
|
||||||
width={600}
|
width={600}
|
||||||
height={400}
|
height={400}
|
||||||
alt=""
|
alt=""
|
||||||
|
|||||||
@@ -185,19 +185,12 @@
|
|||||||
<video class="rounded-md max-w-screen max-h-[80svh] mx-auto" controls>
|
<video class="rounded-md max-w-screen max-h-[80svh] mx-auto" controls>
|
||||||
<source src={post.post_view.post.url} />
|
<source src={post.post_view.post.url} />
|
||||||
</video>
|
</video>
|
||||||
{:else if post.post_view.post.url && !post.post_view.post.thumbnail_url}
|
{:else if post.post_view.post.url}
|
||||||
<a
|
|
||||||
href={post.post_view.post.url}
|
|
||||||
class="max-w-full overflow-hidden overflow-ellipsis whitespace-nowrap text-sky-400 hover:underline text-xs"
|
|
||||||
style="word-break: break-word;"
|
|
||||||
>
|
|
||||||
{post.post_view.post.url}
|
|
||||||
</a>
|
|
||||||
{:else if post.post_view.post.thumbnail_url && post.post_view.post.url}
|
|
||||||
<PostLink
|
<PostLink
|
||||||
thumbnail_url={post.post_view.post.thumbnail_url}
|
|
||||||
url={post.post_view.post.url}
|
url={post.post_view.post.url}
|
||||||
nsfw={post.post_view.post.nsfw}
|
embed_description={post.post_view.post.embed_description}
|
||||||
|
embed_title={post.post_view.post.embed_title}
|
||||||
|
thumbnail_url={post.post_view.post.thumbnail_url}
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
{#if post.post_view.post.body}
|
{#if post.post_view.post.body}
|
||||||
|
|||||||
Reference in new issue
Block a user