fix: spacing issue with crossposts text in cards
This commit is contained in:
1 parent
47e20d9ca3
commit
5f8c1ed05a
1 file changed
+16
-13
@@ -1,12 +1,12 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Post from "$lib/components/lemmy/post/Post.svelte"
|
import Post from '$lib/components/lemmy/post/Post.svelte'
|
||||||
import Placeholder from "$lib/components/ui/Placeholder.svelte"
|
import Placeholder from '$lib/components/ui/Placeholder.svelte'
|
||||||
import { userSettings } from "$lib/settings.js"
|
import { userSettings } from '$lib/settings.js'
|
||||||
import type { PostView } from "lemmy-js-client"
|
import type { PostView } from 'lemmy-js-client'
|
||||||
import { Badge, Button } from "mono-svelte"
|
import { Badge, Button } from 'mono-svelte'
|
||||||
import { ArchiveBox, Icon, Minus, Plus } from "svelte-hero-icons"
|
import { ArchiveBox, Icon, Minus, Plus } from 'svelte-hero-icons'
|
||||||
import { expoOut } from "svelte/easing"
|
import { expoOut } from 'svelte/easing'
|
||||||
import { fly, slide } from "svelte/transition"
|
import { fly, slide } from 'svelte/transition'
|
||||||
|
|
||||||
type PostViewWithCrossposts = PostView & {
|
type PostViewWithCrossposts = PostView & {
|
||||||
withCrossposts: true
|
withCrossposts: true
|
||||||
@@ -116,8 +116,8 @@
|
|||||||
<Icon mini src={Plus} size="14" />
|
<Icon mini src={Plus} size="14" />
|
||||||
{/if}
|
{/if}
|
||||||
{post.crossposts.length} crosspost{post.crossposts.length == 1
|
{post.crossposts.length} crosspost{post.crossposts.length == 1
|
||||||
? ""
|
? ''
|
||||||
: "s"}
|
: 's'}
|
||||||
</Badge>
|
</Badge>
|
||||||
{/if}
|
{/if}
|
||||||
</button>
|
</button>
|
||||||
@@ -125,18 +125,21 @@
|
|||||||
{#if post.withCrossposts && viewPost == post.post.id}
|
{#if post.withCrossposts && viewPost == post.post.id}
|
||||||
<div
|
<div
|
||||||
transition:slide|global={{
|
transition:slide|global={{
|
||||||
axis: "y",
|
axis: 'y',
|
||||||
duration: 500,
|
duration: 500,
|
||||||
easing: expoOut,
|
easing: expoOut,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<span class="text-sm flex flex-row gap-2 items-center">
|
<span
|
||||||
|
class="text-sm flex flex-row gap-2 items-center"
|
||||||
|
class:my-4={$userSettings.view == 'card'}
|
||||||
|
>
|
||||||
Crossposts <hr class="w-full dark:border-zinc-800" />
|
Crossposts <hr class="w-full dark:border-zinc-800" />
|
||||||
{post.crossposts.length}
|
{post.crossposts.length}
|
||||||
</span>
|
</span>
|
||||||
{#each post.crossposts as crosspost, index}
|
{#each post.crossposts as crosspost, index}
|
||||||
<div class="w-full transition-all mb-4">
|
<div class="w-full transition-all mb-4">
|
||||||
<Post post={crosspost} />
|
<Post post={crosspost} view={$userSettings.view} />
|
||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in new issue
Block a user