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
+31 -30
+31 -30
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,36 +48,34 @@
> >
{#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} published={new Date(post.post.published + 'Z')}
published={new Date(post.post.published + 'Z')} upvotes={post.counts.upvotes}
upvotes={post.counts.upvotes} downvotes={post.counts.downvotes}
downvotes={post.counts.downvotes} deleted={post.post.deleted}
deleted={post.post.deleted} removed={post.post.removed}
removed={post.post.removed} locked={post.post.locked}
locked={post.post.locked} featured={post.post.featured_local || post.post.featured_community}
featured={post.post.featured_local || post.post.featured_community} nsfw={post.post.nsfw}
nsfw={post.post.nsfw} saved={post.saved}
saved={post.saved} />
/> <a
<a href="/post/{getInstance()}/{post.post.id}"
href="/post/{getInstance()}/{post.post.id}" class="font-medium max-w-full w-full break-words text-base"
class="font-medium max-w-full w-full break-words text-base" style="word-break: break-word;"
style="word-break: break-word;" class:text-slate-500={post.read && $userSettings.markReadPosts}
class:text-slate-500={post.read && $userSettings.markReadPosts} class:dark:text-zinc-400={post.read && $userSettings.markReadPosts}
class:dark:text-zinc-400={post.read && $userSettings.markReadPosts} >
> <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}