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>
|
</script>
|
||||||
|
|
||||||
<ul
|
<ul
|
||||||
in:fly={{ duration: 500, easing: expoOut, y: -12 }}
|
in:fly={{ duration: 500, easing: expoOut, y: -12, opacity: 0 }}
|
||||||
class={isParent
|
class={isParent
|
||||||
? 'divide-y dark:divide-zinc-900 divide-slate-100'
|
? 'divide-y dark:divide-zinc-900 divide-slate-100'
|
||||||
: ' border-slate-200 dark:border-zinc-800 my-1'}
|
: ' border-slate-200 dark:border-zinc-800 my-1'}
|
||||||
@@ -126,47 +126,47 @@
|
|||||||
{#if node.children?.length > 0}
|
{#if node.children?.length > 0}
|
||||||
<Comments {post} nodes={nodes[index].children} isParent={false} />
|
<Comments {post} nodes={nodes[index].children} isParent={false} />
|
||||||
{/if}
|
{/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>
|
</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}
|
{/each}
|
||||||
</ul>
|
</ul>
|
||||||
@@ -75,7 +75,7 @@
|
|||||||
|
|
||||||
<div class=" gap-2">
|
<div class=" gap-2">
|
||||||
<div
|
<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"
|
items-center px-2 w-max top-6 lg:top-22"
|
||||||
>
|
>
|
||||||
<Tabs
|
<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.pathname == route && page.url.search == '') ||
|
||||||
page.url.searchParams.toString().includes(route.slice(1)) ||
|
page.url.searchParams.toString().includes(route.slice(1)) ||
|
||||||
(page.url.search == '' && route == def)}
|
(page.url.search == '' && route == def)}
|
||||||
class="overflow-auto w-full"
|
class="overflow-auto"
|
||||||
buildUrl={(route, href) =>
|
buildUrl={(route, href) =>
|
||||||
href.includes('?')
|
href.includes('?')
|
||||||
? '?' + addSearchParam(page.url.searchParams, href).toString()
|
? '?' + addSearchParam(page.url.searchParams, href).toString()
|
||||||
@@ -127,9 +127,10 @@ items-center px-2 w-max top-6 lg:top-22"
|
|||||||
buildUrl={(route, href) =>
|
buildUrl={(route, href) =>
|
||||||
'?' + addSearchParam(page.url.searchParams, href).toString()}
|
'?' + addSearchParam(page.url.searchParams, href).toString()}
|
||||||
defaultRoute="?unreadOnly=true"
|
defaultRoute="?unreadOnly=true"
|
||||||
|
class="overflow-auto"
|
||||||
/>
|
/>
|
||||||
</div>
|
</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')}
|
{$t('routes.inbox.title')}
|
||||||
|
|
||||||
<div class="flex items-center gap-2">
|
<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)}
|
{#each data.inbox.value as item, index (item.id)}
|
||||||
<div
|
<div
|
||||||
class="-mx-4 sm:-mx-6 px-4 sm:px-6
|
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={{
|
in:fly|global={{
|
||||||
duration: 1000,
|
duration: 1000,
|
||||||
y: 16,
|
y: 16,
|
||||||
|
|||||||
@@ -147,7 +147,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{/snippet}
|
{/snippet}
|
||||||
{#snippet extended()}
|
{#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
|
<Button
|
||||||
color={item.read ? 'secondary' : 'primary'}
|
color={item.read ? 'secondary' : 'primary'}
|
||||||
{loading}
|
{loading}
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
Star,
|
Star,
|
||||||
Clock,
|
Clock,
|
||||||
ArrowTrendingDown,
|
ArrowTrendingDown,
|
||||||
|
ArrowRight,
|
||||||
} from 'svelte-hero-icons'
|
} from 'svelte-hero-icons'
|
||||||
import PostMeta, {
|
import PostMeta, {
|
||||||
parseTags,
|
parseTags,
|
||||||
@@ -340,16 +341,10 @@
|
|||||||
</article>
|
</article>
|
||||||
{#if data.thread.value.showContext || data.thread.value.singleThread}
|
{#if data.thread.value.showContext || data.thread.value.singleThread}
|
||||||
<div
|
<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
|
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
|
<Button
|
||||||
color="none"
|
color="none"
|
||||||
rounding="pill"
|
rounding="pill"
|
||||||
@@ -364,6 +359,9 @@
|
|||||||
{data.thread.value.showContext
|
{data.thread.value.showContext
|
||||||
? $t('routes.post.thread.context')
|
? $t('routes.post.thread.context')
|
||||||
: $t('routes.post.thread.allComments')}
|
: $t('routes.post.thread.allComments')}
|
||||||
|
{#snippet suffix()}
|
||||||
|
<Icon src={ArrowRight} size="16" micro />
|
||||||
|
{/snippet}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
Reference in new issue
Block a user