feat: add ability to click on images, close #86

This commit is contained in:
Xyphyn committed 2023-08-09 11:19:45 -07:00
1 parent ffbb37e0df
commit 3f1becf792
1 file changed
+7 -2
+7 -2
View File
@@ -72,7 +72,12 @@
</a> </a>
{/if} {/if}
{#if isImage(post.post.url)} {#if isImage(post.post.url)}
<div class="self-start overflow-hidden"> <!--disabled preloads here since most people will hover over every image while scrolling-->
<a
href="/post/{getInstance()}/{post.post.id}"
class="self-start overflow-hidden"
data-sveltekit-preload-data="off"
>
<picture <picture
class="rounded-md overflow-hidden max-h-[min(50vh,500px)] w-full max-w-full" class="rounded-md overflow-hidden max-h-[min(50vh,500px)] w-full max-w-full"
> >
@@ -94,7 +99,7 @@
class:blur-3xl={post.post.nsfw} class:blur-3xl={post.post.nsfw}
/> />
</picture> </picture>
</div> </a>
{:else if post.post.thumbnail_url && post.post.url} {:else if post.post.thumbnail_url && post.post.url}
<PostLink <PostLink
url={post.post.url} url={post.post.url}