fix: double thumbnails in compact view

This commit is contained in:
Xyphyn committed 2023-10-05 16:52:02 -07:00
1 parent a4f3b9a98d
commit 429a140ad7
3 files changed
+25 -21

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "photon-lemmy",
"version": "1.17.1",
"version": "1.17.2",
"private": true,
"scripts": {
"dev": "vite dev",
+11 -9
View File
@@ -59,15 +59,17 @@
nsfw={post.post.nsfw}
saved={post.saved}
/>
<a
href="/post/{getInstance()}/{post.post.id}"
class="font-medium max-w-full w-full break-words text-base"
style="word-break: break-word;"
class:text-slate-500={post.read && $userSettings.markReadPosts}
class:dark:text-zinc-400={post.read && $userSettings.markReadPosts}
>
<Markdown source={post.post.name} inline />
</a>
{#if post.post.embed_title != post.post.name || view == 'compact'}
<a
href="/post/{getInstance()}/{post.post.id}"
class="font-medium max-w-full w-full break-words text-base"
style="word-break: break-word;"
class:text-slate-500={post.read && $userSettings.markReadPosts}
class:dark:text-zinc-400={post.read && $userSettings.markReadPosts}
>
<Markdown source={post.post.name} inline />
</a>
{/if}
</div>
{#if isImage(post.post.url)}
{#if view == 'card' || view == 'cozy'}
+13 -11
View File
@@ -52,16 +52,18 @@
</a>
{/if}
</Material>
{:else if thumbnail_url}
{:else}
<Link href={url} highlight nowrap />
<a href={url}>
<img
src={thumbnail_url}
class="rounded-md max-w-[300px] w-full h-auto aspect-video object-cover bg-slate-200 dark:bg-zinc-800"
width={600}
height={400}
alt=""
class:blur-3xl={nsfw}
/>
</a>
{#if thumbnail_url && !compact}
<a href={url}>
<img
src={thumbnail_url}
class="rounded-md max-w-[300px] w-full h-auto aspect-video object-cover bg-slate-200 dark:bg-zinc-800"
width={600}
height={400}
alt=""
class:blur-3xl={nsfw}
/>
</a>
{/if}
{/if}