design: increase spacing by screen size for comment trees
This commit is contained in:
3 files changed
+9
-7
No files matched your search
@@ -2,7 +2,7 @@
|
|||||||
import VirtualList from '$lib/components/render/VirtualList.svelte'
|
import VirtualList from '$lib/components/render/VirtualList.svelte'
|
||||||
import type { Post } from 'lemmy-js-client'
|
import type { Post } from 'lemmy-js-client'
|
||||||
import type { CommentNodeI } from './comments.svelte'
|
import type { CommentNodeI } from './comments.svelte'
|
||||||
import Comments from './CommentList.svelte'
|
import Comments from './CommentTree.svelte'
|
||||||
import { onMount } from 'svelte'
|
import { onMount } from 'svelte'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
import { Button, toast } from 'mono-svelte'
|
import { Button, toast } from 'mono-svelte'
|
||||||
import { ArrowDownCircle, Icon } from 'svelte-hero-icons'
|
import { ArrowDownCircle, Icon } from 'svelte-hero-icons'
|
||||||
import Comment from './Comment.svelte'
|
import Comment from './Comment.svelte'
|
||||||
import Comments from './CommentList.svelte'
|
import Comments from './CommentTree.svelte'
|
||||||
import { buildCommentsTree, type CommentNodeI } from './comments.svelte'
|
import { buildCommentsTree, type CommentNodeI } from './comments.svelte'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
@@ -93,10 +93,12 @@
|
|||||||
bind:node={nodes[index]}
|
bind:node={nodes[index]}
|
||||||
postId={post.id}
|
postId={post.id}
|
||||||
op={post.creator_id == node.comment_view.creator.id}
|
op={post.creator_id == node.comment_view.creator.id}
|
||||||
contentClass="{node.children.length > 0 ||
|
contentClass={[
|
||||||
node.comment_view.counts.child_count > 0
|
(node.children.length > 0 ||
|
||||||
? 'border-l'
|
node.comment_view.counts.child_count > 0) &&
|
||||||
: ''} ml-2.5 border-slate-200 dark:border-zinc-800 pl-2.5"
|
'border-l',
|
||||||
|
'ml-2.5 border-slate-200 dark:border-zinc-800 pl-3 sm:pl-4 lg:pl-5',
|
||||||
|
]}
|
||||||
bind:open={nodes[index].expanded}
|
bind:open={nodes[index].expanded}
|
||||||
>
|
>
|
||||||
{#if node.children?.length > 0}
|
{#if node.children?.length > 0}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
import { profile } from '$lib/auth.svelte'
|
import { profile } from '$lib/auth.svelte'
|
||||||
import CommentForm from '$lib/components/lemmy/comment/CommentForm.svelte'
|
import CommentForm from '$lib/components/lemmy/comment/CommentForm.svelte'
|
||||||
import CommentListVirtualizer from '$lib/components/lemmy/comment/CommentListVirtualizer.svelte'
|
import CommentListVirtualizer from '$lib/components/lemmy/comment/CommentListVirtualizer.svelte'
|
||||||
import Comments from '$lib/components/lemmy/comment/CommentList.svelte'
|
import Comments from '$lib/components/lemmy/comment/CommentTree.svelte'
|
||||||
import { buildCommentsTree } from '$lib/components/lemmy/comment/comments.svelte'
|
import { buildCommentsTree } from '$lib/components/lemmy/comment/comments.svelte'
|
||||||
import EndPlaceholder from '$lib/components/ui/EndPlaceholder.svelte'
|
import EndPlaceholder from '$lib/components/ui/EndPlaceholder.svelte'
|
||||||
import { t } from '$lib/i18n/translations'
|
import { t } from '$lib/i18n/translations'
|
||||||
|
|||||||
Reference in new issue
Block a user