fix: broken postmedia component
This commit is contained in:
1 parent
a9a0bce4b2
commit
c9f588ae4d
1 file changed
+8
-33
@@ -20,39 +20,14 @@
|
|||||||
@component
|
@component
|
||||||
Thumbnails for compact and list view posts.
|
Thumbnails for compact and list view posts.
|
||||||
-->
|
-->
|
||||||
<div
|
<div
|
||||||
class="w-24 sm:w-32 h-24 relative group/media {$$props.class ?? ''}"
|
class="w-24 sm:w-32 h-24 relative group/media {$$props.class ?? ''}"
|
||||||
style={$$props.style ?? ''}
|
style={$$props.style ?? ''}
|
||||||
>
|
>
|
||||||
{#if post.alt_text}
|
{#if post.alt_text}
|
||||||
<Popover
|
<Popover
|
||||||
openOnHover
|
openOnHover
|
||||||
placement={$userSettings.leftAlign ? 'bottom-start' : 'bottom-end'}
|
placement={$userSettings.leftAlign ? 'bottom-start' : 'bottom-end'}
|
||||||
>
|
|
||||||
<Material
|
|
||||||
slot="target"
|
|
||||||
padding="none"
|
|
||||||
rounding="full"
|
|
||||||
elevation="high"
|
|
||||||
class="w-max absolute bottom-0 left-0 py-0.5 px-1.5 m-1 font-bold"
|
|
||||||
>
|
|
||||||
ALT
|
|
||||||
</Material>
|
|
||||||
<div class="max-w-sm">
|
|
||||||
{post.alt_text}
|
|
||||||
</div>
|
|
||||||
</Popover>
|
|
||||||
{/if}
|
|
||||||
<svelte:element
|
|
||||||
this={!$userSettings.expandImages || type != 'image' ? 'a' : 'button'}
|
|
||||||
href={postLink(post)}
|
|
||||||
on:click={() => {
|
|
||||||
if (type == 'image') {
|
|
||||||
showImage(bestImageURL(post, false, 2048))
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
role="button"
|
|
||||||
tabindex="0"
|
|
||||||
>
|
>
|
||||||
<Material
|
<Material
|
||||||
slot="target"
|
slot="target"
|
||||||
|
|||||||
Reference in new issue
Block a user