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