feat: add placeholder component
This commit is contained in:
1 parent
92dfd91c23
commit
5c04bdb677
8 files changed
+48
-50
No files matched your search
@@ -15,7 +15,7 @@
|
||||
export let hideCommunity = false
|
||||
</script>
|
||||
|
||||
<Card class="bg-white flex flex-col w-full p-5 gap-2.5">
|
||||
<Card class="bg-white flex flex-col w-full p-5 gap-2.5" id={post.post.id}>
|
||||
<div class="flex flex-row w-full gap-2.5">
|
||||
<div class="flex flex-col gap-1.5 grow">
|
||||
<PostMeta
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
<script lang="ts">
|
||||
import Post from '$lib/components/lemmy/post/Post.svelte'
|
||||
import { userSettings } from '$lib/settings.js'
|
||||
import type { PostView } from 'lemmy-js-client'
|
||||
import { fly } from 'svelte/transition'
|
||||
|
||||
export let posts: PostView[]
|
||||
</script>
|
||||
|
||||
{#each posts as post, index (post.post.id)}
|
||||
{#if !($userSettings.hidePosts.deleted && post.post.deleted) && !($userSettings.hidePosts.removed && post.post.removed)}
|
||||
<div
|
||||
in:fly={{
|
||||
y: -8,
|
||||
duration: 500,
|
||||
opacity: 0,
|
||||
delay: index < 4 ? index * 100 : 0,
|
||||
}}
|
||||
>
|
||||
<Post {post} />
|
||||
</div>
|
||||
{/if}
|
||||
{/each}
|
||||
@@ -18,6 +18,7 @@
|
||||
<div
|
||||
class="bg-white break-words
|
||||
{getColor(cardColor)} rounded-md {clazz}"
|
||||
{...$$restProps}
|
||||
>
|
||||
<slot />
|
||||
</div>
|
||||
@@ -0,0 +1,8 @@
|
||||
<div
|
||||
class="text-slate-600 dark:text-zinc-400 flex flex-col justify-center items-center"
|
||||
>
|
||||
<slot name="icon" />
|
||||
{#if $$slots.title}
|
||||
<h1 class="font-bold text-2xl"><slot name="title" /></h1>{/if}
|
||||
<slot name="action" />
|
||||
</div>
|
||||
Reference in new issue
Block a user