fix: improve small screen support
This commit is contained in:
1 parent
ed33e9d59b
commit
ae1a3bffc0
9 files changed
+76
-58
No files matched your search
@@ -124,30 +124,30 @@
|
||||
combinedPosts = combinedPosts.toSpliced(index, 1)
|
||||
}}
|
||||
>
|
||||
<button
|
||||
slot="badges"
|
||||
class:hidden={!post.withCrossposts}
|
||||
on:click={() => {
|
||||
if (viewPost == post.post.id) viewPost = -1
|
||||
else viewPost = post.post.id
|
||||
}}
|
||||
>
|
||||
<svelte:fragment slot="badges">
|
||||
{#if post.withCrossposts}
|
||||
<Badge
|
||||
class="z-10 backdrop-blur-xl hover:brightness-110 cursor-pointer transition-all"
|
||||
color="gray-subtle"
|
||||
<button
|
||||
on:click={() => {
|
||||
if (viewPost == post.post.id) viewPost = -1
|
||||
else viewPost = post.post.id
|
||||
}}
|
||||
>
|
||||
{#if viewPost == post.post.id}
|
||||
<Icon mini src={Minus} size="14" />
|
||||
{:else}
|
||||
<Icon mini src={Plus} size="14" />
|
||||
{/if}
|
||||
{post.crossposts.length} crosspost{post.crossposts.length == 1
|
||||
? ''
|
||||
: 's'}
|
||||
</Badge>
|
||||
{/if}
|
||||
</button>
|
||||
<Badge
|
||||
class="z-10 backdrop-blur-xl hover:brightness-110 cursor-pointer transition-all"
|
||||
color="gray-subtle"
|
||||
>
|
||||
{#if viewPost == post.post.id}
|
||||
<Icon mini src={Minus} size="14" />
|
||||
{:else}
|
||||
<Icon mini src={Plus} size="14" />
|
||||
{/if}
|
||||
{post.crossposts.length} crosspost{post.crossposts.length ==
|
||||
1
|
||||
? ''
|
||||
: 's'}
|
||||
</Badge>
|
||||
</button>{/if}
|
||||
</svelte:fragment>
|
||||
</Post>
|
||||
{#if post.withCrossposts && viewPost == post.post.id}
|
||||
<div
|
||||
|
||||
@@ -60,13 +60,14 @@
|
||||
subscribed =
|
||||
subscribed == 'NotSubscribed' ? 'Subscribed' : 'NotSubscribed'
|
||||
}}
|
||||
class="relative cursor-pointer pr-2 row-span-2"
|
||||
class="relative cursor-pointer pr-2 row-span-2 flex-shrink-0"
|
||||
>
|
||||
<Avatar
|
||||
url={community.icon}
|
||||
width={28}
|
||||
alt={community.name}
|
||||
style="grid-area: avatar; height: 100%;"
|
||||
class="flex-shrink-0"
|
||||
/>
|
||||
{#if subscribed != undefined && $profile?.jwt}
|
||||
<div
|
||||
@@ -87,10 +88,14 @@
|
||||
</Subscribe>
|
||||
{/if}
|
||||
{#if community}
|
||||
<CommunityLink {community} style="grid-area: community;" />
|
||||
<CommunityLink
|
||||
{community}
|
||||
style="grid-area: community;"
|
||||
class="flex-shrink"
|
||||
/>
|
||||
{/if}
|
||||
<span
|
||||
class="text-slate-600 dark:text-zinc-400 flex flex-row gap-2 flex-wrap items-center"
|
||||
class="text-slate-600 dark:text-zinc-400 flex flex-row gap-2 items-center"
|
||||
style="grid-area: stats;"
|
||||
>
|
||||
{#if user}
|
||||
@@ -106,12 +111,11 @@
|
||||
</UserLink>
|
||||
{/if}
|
||||
{#if published}
|
||||
<RelativeDate date={published} />
|
||||
<RelativeDate date={published} class="flex-shrink-0" />
|
||||
{/if}
|
||||
</span>
|
||||
<div
|
||||
class="flex flex-row items-center self-center flex-wrap gap-2 [&>*]:flex-shrink-0
|
||||
{Object.values(badges).some(Boolean) ? 'pt-2' : ''}"
|
||||
class="flex flex-row items-center self-center flex-wrap gap-2 [&>*]:flex-shrink-0 badges"
|
||||
style="grid-area: badges;"
|
||||
>
|
||||
{#if badges.nsfw}
|
||||
@@ -192,4 +196,8 @@
|
||||
grid-template-rows: auto auto auto;
|
||||
grid-template-columns: auto 1fr;
|
||||
}
|
||||
|
||||
.badges:not(:empty) {
|
||||
padding-top: 0.5rem;
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user