design: make bolder and distinguish thread lines in comment trees
This commit is contained in:
2 files changed
+10
-10
No files matched your search
@@ -116,8 +116,7 @@
|
|||||||
{#if meta}
|
{#if meta}
|
||||||
<button
|
<button
|
||||||
onclick={() => (open = !open)}
|
onclick={() => (open = !open)}
|
||||||
class="flex flex-row cursor-pointer gap-2 items-center group text-[13px] flex-wrap w-full
|
class="flex flex-row cursor-pointer gap-2 items-center group text-[13px] flex-wrap w-full z-0 group"
|
||||||
z-0 group relative"
|
|
||||||
>
|
>
|
||||||
{@render metaSuffix?.()}
|
{@render metaSuffix?.()}
|
||||||
<span class:font-bold={op} class="flex flex-row gap-1 items-center">
|
<span class:font-bold={op} class="flex flex-row gap-1 items-center">
|
||||||
|
|||||||
@@ -96,8 +96,11 @@
|
|||||||
contentClass={[
|
contentClass={[
|
||||||
(node.children.length > 0 ||
|
(node.children.length > 0 ||
|
||||||
node.comment_view.counts.child_count > 0) &&
|
node.comment_view.counts.child_count > 0) &&
|
||||||
'border-l',
|
'border-l-2',
|
||||||
'ml-2.5 border-slate-200 dark:border-zinc-800 pl-3 sm:pl-4 lg:pl-5',
|
'ml-2.5 pl-3 sm:pl-4 lg:pl-5',
|
||||||
|
node.depth % 2 == 0
|
||||||
|
? 'border-slate-200 dark:border-zinc-800'
|
||||||
|
: 'border-slate-300/80 dark:border-zinc-700',
|
||||||
]}
|
]}
|
||||||
bind:open={nodes[index].expanded}
|
bind:open={nodes[index].expanded}
|
||||||
>
|
>
|
||||||
@@ -108,22 +111,20 @@
|
|||||||
{#if node.comment_view.counts.child_count > 0 && node.children.length == 0}
|
{#if node.comment_view.counts.child_count > 0 && node.children.length == 0}
|
||||||
<svelte:element
|
<svelte:element
|
||||||
this={browser ? 'div' : 'a'}
|
this={browser ? 'div' : 'a'}
|
||||||
class="w-full h-10 border-y-0! -mt-2 -ml-2.5"
|
class="w-full h-10 -mt-2 -ml-2.5"
|
||||||
href="/comment/{page.params.instance}/{node.comment_view.comment.id}"
|
href="/comment/{node.comment_view.comment.id}"
|
||||||
>
|
>
|
||||||
<Button
|
<Button
|
||||||
loading={nodes[index].loading}
|
loading={nodes[index].loading}
|
||||||
disabled={nodes[index].loading}
|
disabled={nodes[index].loading}
|
||||||
rounding="pill"
|
rounding="pill"
|
||||||
color="tertiary"
|
color="tertiary"
|
||||||
class="font-normal text-sm! text-slate-600 dark:text-zinc-400"
|
class="font-normal text-slate-600 dark:text-zinc-400"
|
||||||
shadow="none"
|
shadow="none"
|
||||||
loaderWidth={16}
|
loaderWidth={16}
|
||||||
onclick={() => {
|
onclick={() => {
|
||||||
if (nodes[index].depth > 4) {
|
if (nodes[index].depth > 4) {
|
||||||
goto(
|
goto(`/comment/${nodes[index].comment_view.comment.id}#comments`)
|
||||||
`/comment/${page.params.instance}/${nodes[index].comment_view.comment.id}#comments`,
|
|
||||||
)
|
|
||||||
} else {
|
} else {
|
||||||
nodes[index].loading = true
|
nodes[index].loading = true
|
||||||
fetchChildren(nodes[index]).then(
|
fetchChildren(nodes[index]).then(
|
||||||
|
|||||||
Reference in new issue
Block a user