fix: spacing and overflow with long text
This commit is contained in:
4 files changed
+54
-55
No files matched your search
@@ -107,7 +107,7 @@
|
||||
</script>
|
||||
|
||||
<ul
|
||||
in:fly={{ duration: 500, easing: expoOut, y: -12 }}
|
||||
in:fly={{ duration: 500, easing: expoOut, y: -12, opacity: 0 }}
|
||||
class={isParent
|
||||
? 'divide-y dark:divide-zinc-900 divide-slate-100'
|
||||
: ' border-slate-200 dark:border-zinc-800 my-1'}
|
||||
@@ -126,47 +126,47 @@
|
||||
{#if node.children?.length > 0}
|
||||
<Comments {post} nodes={nodes[index].children} isParent={false} />
|
||||
{/if}
|
||||
{#if node.comment_view.counts.child_count > 0 && node.children.length == 0}
|
||||
<svelte:element
|
||||
this={hydrated ? 'div' : 'a'}
|
||||
class="w-full my-2 h-8"
|
||||
href="/comment/{page.params.instance}/{node.comment_view.comment.id}"
|
||||
>
|
||||
<Button
|
||||
loading={nodes[index].loading}
|
||||
disabled={nodes[index].loading}
|
||||
rounding="pill"
|
||||
color="tertiary"
|
||||
class="font-normal text-slate-600 dark:text-zinc-400"
|
||||
loaderWidth={16}
|
||||
onclick={() => {
|
||||
if (nodes[index].depth > 4) {
|
||||
goto(
|
||||
`/comment/${page.params.instance}/${nodes[index].comment_view.comment.id}#comments`,
|
||||
)
|
||||
} else {
|
||||
nodes[index].loading = true
|
||||
fetchChildren(nodes[index]).then(
|
||||
() => (nodes[index].loading = false),
|
||||
)
|
||||
}
|
||||
}}
|
||||
>
|
||||
{#snippet prefix()}
|
||||
<Icon
|
||||
src={ArrowDownCircle}
|
||||
micro
|
||||
size="16"
|
||||
class="text-primary-900 dark:text-primary-100"
|
||||
/>
|
||||
{/snippet}
|
||||
{$t('comment.more', {
|
||||
// @ts-ignore
|
||||
comments: node.comment_view.counts.child_count,
|
||||
})}
|
||||
</Button>
|
||||
</svelte:element>
|
||||
{/if}
|
||||
</Comment>
|
||||
{#if node.comment_view.counts.child_count > 0 && node.children.length == 0}
|
||||
<svelte:element
|
||||
this={hydrated ? 'div' : 'a'}
|
||||
class="w-full h-10 !border-y-0 -mt-2 -ml-2.5"
|
||||
href="/comment/{page.params.instance}/{node.comment_view.comment.id}"
|
||||
>
|
||||
<Button
|
||||
loading={nodes[index].loading}
|
||||
disabled={nodes[index].loading}
|
||||
rounding="pill"
|
||||
color="tertiary"
|
||||
class="font-normal !text-sm text-slate-600 dark:text-zinc-400"
|
||||
loaderWidth={16}
|
||||
onclick={() => {
|
||||
if (nodes[index].depth > 4) {
|
||||
goto(
|
||||
`/comment/${page.params.instance}/${nodes[index].comment_view.comment.id}#comments`,
|
||||
)
|
||||
} else {
|
||||
nodes[index].loading = true
|
||||
fetchChildren(nodes[index]).then(
|
||||
() => (nodes[index].loading = false),
|
||||
)
|
||||
}
|
||||
}}
|
||||
>
|
||||
{#snippet prefix()}
|
||||
<Icon
|
||||
src={ArrowDownCircle}
|
||||
micro
|
||||
size="16"
|
||||
class="text-primary-900 dark:text-primary-100"
|
||||
/>
|
||||
{/snippet}
|
||||
{$t('comment.more', {
|
||||
// @ts-ignore
|
||||
comments: node.comment_view.counts.child_count,
|
||||
})}
|
||||
</Button>
|
||||
</svelte:element>
|
||||
{/if}
|
||||
{/each}
|
||||
</ul>
|
||||
@@ -75,7 +75,7 @@
|
||||
|
||||
<div class=" gap-2">
|
||||
<div
|
||||
class="mt-4 mb-0 sticky z-30 mx-auto max-w-full flex gap-2 md:flex-row flex-col
|
||||
class="mt-4 mb-2 z-30 mx-auto max-w-full flex gap-2 md:flex-row flex-col
|
||||
items-center px-2 w-max top-6 lg:top-22"
|
||||
>
|
||||
<Tabs
|
||||
@@ -103,7 +103,7 @@ items-center px-2 w-max top-6 lg:top-22"
|
||||
(page.url.pathname == route && page.url.search == '') ||
|
||||
page.url.searchParams.toString().includes(route.slice(1)) ||
|
||||
(page.url.search == '' && route == def)}
|
||||
class="overflow-auto w-full"
|
||||
class="overflow-auto"
|
||||
buildUrl={(route, href) =>
|
||||
href.includes('?')
|
||||
? '?' + addSearchParam(page.url.searchParams, href).toString()
|
||||
@@ -127,9 +127,10 @@ items-center px-2 w-max top-6 lg:top-22"
|
||||
buildUrl={(route, href) =>
|
||||
'?' + addSearchParam(page.url.searchParams, href).toString()}
|
||||
defaultRoute="?unreadOnly=true"
|
||||
class="overflow-auto"
|
||||
/>
|
||||
</div>
|
||||
<Header pageHeader class="sm:flex-row justify-between flex-col">
|
||||
<Header pageHeader class="lg:flex-row justify-between flex-col">
|
||||
{$t('routes.inbox.title')}
|
||||
|
||||
<div class="flex items-center gap-2">
|
||||
@@ -173,7 +174,7 @@ items-center px-2 w-max top-6 lg:top-22"
|
||||
{#each data.inbox.value as item, index (item.id)}
|
||||
<div
|
||||
class="-mx-4 sm:-mx-6 px-4 sm:px-6
|
||||
{item.read ? '' : 'bg-yellow-50/50 dark:bg-blue-500/5'}"
|
||||
{item.read ? '' : 'bg-blue-50/50 dark:bg-blue-500/5'}"
|
||||
in:fly|global={{
|
||||
duration: 1000,
|
||||
y: 16,
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
</div>
|
||||
{/snippet}
|
||||
{#snippet extended()}
|
||||
<div class="flex gap-2 w-full md:hidden mt-1">
|
||||
<div class="flex gap-2 w-full md:hidden mt-1 flex-wrap">
|
||||
<Button
|
||||
color={item.read ? 'secondary' : 'primary'}
|
||||
{loading}
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
Star,
|
||||
Clock,
|
||||
ArrowTrendingDown,
|
||||
ArrowRight,
|
||||
} from 'svelte-hero-icons'
|
||||
import PostMeta, {
|
||||
parseTags,
|
||||
@@ -340,16 +341,10 @@
|
||||
</article>
|
||||
{#if data.thread.value.showContext || data.thread.value.singleThread}
|
||||
<div
|
||||
class="sticky mx-auto z-50 max-w-lg w-full min-w-0 flex items-center overflow-auto gap-1
|
||||
class="sticky mx-auto z-50 max-w-md min-w-0 flex flex-col items-center overflow-auto gap-1
|
||||
bg-slate-50/50 dark:bg-zinc-900/50 backdrop-blur-xl border border-slate-200/50 dark:border-zinc-800/50
|
||||
p-1 rounded-full px-2.5 justify-between top-6 lg:top-22"
|
||||
p-1 rounded-full justify-between top-6 lg:top-22"
|
||||
>
|
||||
<p class="font-medium text-sm flex items-center gap-2">
|
||||
<Icon src={InformationCircle} mini size="20" />
|
||||
{data.thread.value.showContext
|
||||
? $t('routes.post.thread.part')
|
||||
: $t('routes.post.thread.single')}
|
||||
</p>
|
||||
<Button
|
||||
color="none"
|
||||
rounding="pill"
|
||||
@@ -364,6 +359,9 @@
|
||||
{data.thread.value.showContext
|
||||
? $t('routes.post.thread.context')
|
||||
: $t('routes.post.thread.allComments')}
|
||||
{#snippet suffix()}
|
||||
<Icon src={ArrowRight} size="16" micro />
|
||||
{/snippet}
|
||||
</Button>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
Reference in new issue
Block a user