fix: remove dividers and add gap in card view
This commit is contained in:
1 parent
3191bd23e5
commit
e0aafca7b3
4 files changed
+11
-23
No files matched your search
@@ -19,7 +19,6 @@
|
||||
>
|
||||
<div class="flex flex-row justify-between items-center">
|
||||
<PostMeta
|
||||
community={comment.community}
|
||||
deleted={false}
|
||||
featured={false}
|
||||
nsfw={comment.post.nsfw}
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
import { fly } from 'svelte/transition'
|
||||
import PostMeta from '$lib/components/lemmy/post/PostMeta.svelte'
|
||||
import { Button, Material } from 'mono-svelte'
|
||||
import CommentItem from '$lib/components/lemmy/comment/CommentItem.svelte'
|
||||
import { userSettings } from '$lib/settings.js'
|
||||
|
||||
export let data
|
||||
|
||||
@@ -18,7 +20,9 @@
|
||||
|
||||
<h1 class="text-2xl font-bold">Saved</h1>
|
||||
<div
|
||||
class="flex flex-col gap-4 list-none my-4 !divide-y divide-slate-200 dark:divide-zinc-800"
|
||||
class="flex flex-col list-none my-4 divide-slate-200 dark:divide-zinc-800"
|
||||
class:gap-4={$userSettings.view == 'card'}
|
||||
class:!divide-y={$userSettings.view != 'card'}
|
||||
>
|
||||
{#if !data.data || (data.data?.length ?? 0) == 0}
|
||||
<p class="text-center opacity-60 text-lg mx-4">
|
||||
@@ -28,25 +32,7 @@
|
||||
{#each data.data as item, index}
|
||||
<div in:fly={{ opacity: 0, y: -4, delay: index * 50 }}>
|
||||
{#if isComment(item)}
|
||||
<Material padding="lg" color="distinct" class="flex flex-col flex-1">
|
||||
<div class="flex flex-row items-center">
|
||||
<PostMeta
|
||||
title={item.post.name}
|
||||
id={item.post.id}
|
||||
published={new Date(item.post.published)}
|
||||
/>
|
||||
</div>
|
||||
<div class="list-none">
|
||||
<Comment
|
||||
postId={item.post.id}
|
||||
node={{ children: [], comment_view: item, depth: 1 }}
|
||||
replying={false}
|
||||
/>
|
||||
</div>
|
||||
<Button class="ml-auto" href="/comment/{item.comment.id}">
|
||||
Jump
|
||||
</Button>
|
||||
</Material>
|
||||
<CommentItem comment={item} />
|
||||
{:else}
|
||||
<Post post={item} />
|
||||
{/if}
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
isPostView,
|
||||
isUser,
|
||||
} from '$lib/lemmy/item.js'
|
||||
import { userSettings } from '$lib/settings.js'
|
||||
import { searchParam } from '$lib/util.js'
|
||||
import type {
|
||||
CommentView,
|
||||
@@ -119,7 +120,9 @@
|
||||
{/if}
|
||||
{/await}
|
||||
<div
|
||||
class="flex flex-col mt-4 !divide-y divide-slate-200 dark:divide-zinc-800"
|
||||
class="flex flex-col mt-4 divide-slate-200 dark:divide-zinc-800"
|
||||
class:!divide-y={$userSettings.view != 'card'}
|
||||
class:gap-4={$userSettings.view == 'card'}
|
||||
>
|
||||
{#each data.results as result}
|
||||
{#if isPostView(result)}
|
||||
|
||||
@@ -24,7 +24,7 @@ export async function load({ url, fetch }) {
|
||||
q: query,
|
||||
auth: get(profile)?.jwt,
|
||||
community_id: community ?? undefined,
|
||||
limit: 40,
|
||||
limit: 20,
|
||||
page: page,
|
||||
sort: (sort as SortType) || 'New',
|
||||
listing_type: 'All',
|
||||
|
||||
Reference in new issue
Block a user