fix: overflow issue

This commit is contained in:
Xyphyn committed 2023-09-10 16:45:22 -07:00
1 parent d6db470467
commit 70311b1c65
1 file changed
+9 -8
+9 -8
View File
@@ -21,10 +21,13 @@
let loaded = false let loaded = false
// hack because you cant use typescript types in svelte markup // hack because you cant use typescript types in svelte markup
const onclick = (e: any) => { const onclick = (
if (e.target?.id == post.post.id) { e: MouseEvent & {
goto(postLink(post.post)) currentTarget: EventTarget & HTMLDivElement
target: any
} }
) => {
if (e.target.id == post.post.id) goto(postLink(post.post))
} }
</script> </script>
@@ -45,13 +48,12 @@
> >
{#if view == 'list' || view == 'compact'} {#if view == 'list' || view == 'compact'}
<div <div
class="absolute -inset-1 group-hover:-inset-4 class="absolute -inset-0.5 group-hover:-inset-2.5 group-hover:-inset-y-3 group-hover:md:-inset-4
transition-all -z-[5] rounded-xl group-hover:bg-slate-100 group-hover:dark:bg-zinc-900" transition-all -z-[5] rounded-xl group-hover:bg-slate-100 group-hover:dark:bg-zinc-900"
/> />
{/if} {/if}
<div class="flex flex-row gap-2 max-w-full w-full"> <div class="flex flex-row gap-2 max-w-full w-full">
<div class="flex flex-col w-full gap-2"> <div class="flex flex-col gap-2">
<div class="flex flex-col w-full gap-2">
<PostMeta <PostMeta
community={hideCommunity ? undefined : post.community} community={hideCommunity ? undefined : post.community}
user={post.creator} user={post.creator}
@@ -74,7 +76,6 @@
> >
<Markdown source={post.post.name} inline /> <Markdown source={post.post.name} inline />
</a> </a>
</div>
{#if $userSettings.view == 'card'} {#if $userSettings.view == 'card'}
{#if isImage(post.post.url)} {#if isImage(post.post.url)}
<!--disabled preloads here since most people will hover over every image while scrolling--> <!--disabled preloads here since most people will hover over every image while scrolling-->
@@ -145,7 +146,7 @@
{/if} {/if}
</div> </div>
{#if ($userSettings.view == 'list' || $userSettings.view == 'compact') && (post.post.thumbnail_url || isImage(post.post.url))} {#if ($userSettings.view == 'list' || $userSettings.view == 'compact') && (post.post.thumbnail_url || isImage(post.post.url))}
<div class="flex-none w-24 h-24"> <div class="flex-none w-24 h-24 ml-auto">
{#if !$userSettings.expandImages || (post.post.thumbnail_url && !isImage(post.post.url))} {#if !$userSettings.expandImages || (post.post.thumbnail_url && !isImage(post.post.url))}
<a href={postLink(post.post)}> <a href={postLink(post.post)}>
{#if post.post.thumbnail_url} {#if post.post.thumbnail_url}