misc: Increase post body padding

This commit is contained in:
Xyphyn committed 2023-07-28 16:22:50 -07:00
1 parent fa20d7a6a8
commit 3d19318355
3 files changed
+13 -12

No files matched your search

@@ -8,14 +8,14 @@
Plus,
Trash,
} from 'svelte-hero-icons'
import type { CommentNodeI } from './comments'
import { insertCommentIntoTree, type CommentNodeI } from './comments'
import RelativeDate from '$lib/components/util/RelativeDate.svelte'
import CommentForm from './CommentForm.svelte'
import { page } from '$app/stores'
import UserLink from '$lib/components/lemmy/user/UserLink.svelte'
import Markdown from '$lib/components/markdown/Markdown.svelte'
import CommentActions from '$lib/components/lemmy/comment/CommentActions.svelte'
import { createEventDispatcher } from 'svelte'
import { createEventDispatcher, getContext } from 'svelte'
import type { CommentView } from 'lemmy-js-client'
import Modal from '$lib/components/ui/modal/Modal.svelte'
import { authData, getClient } from '$lib/lemmy.js'
@@ -163,14 +163,11 @@
{postId}
parentId={node.comment_view.comment.id}
on:comment={(e) => {
node.children = [
{
children: [],
depth: node.depth + 1,
comment_view: e.detail.comment_view,
},
...node.children,
]
insertCommentIntoTree(
getContext('comments:tree'),
e.detail.comment_view,
false
)
replying = false
}}
/>
@@ -2,7 +2,7 @@
import Comment from './Comment.svelte'
import { buildCommentsTree, type CommentNodeI } from './comments'
import { page } from '$app/stores'
import { onMount } from 'svelte'
import { onMount, setContext } from 'svelte'
import Button from '$lib/components/input/Button.svelte'
import { ChevronDown, Icon } from 'svelte-hero-icons'
import { authData, getClient } from '$lib/lemmy.js'
@@ -14,6 +14,10 @@
export let isParent: boolean
export let post: Post
if (isParent) {
setContext('comments:tree', nodes)
}
onMount(() => {
if (isParent && $page.url.hash) {
document.getElementById($page.url.hash)?.scrollIntoView({
+1 -1
View File
@@ -139,7 +139,7 @@
{#if post.body}
<p
class="bg-slate-100 border border-slate-200 dark:border-zinc-800
dark:bg-zinc-900 p-2 text-sm rounded-md leading-[22px]"
dark:bg-zinc-900 p-2 md:p-4 text-sm rounded-md leading-[22px]"
>
<Markdown source={post.body} />
</p>