design: improve small screen support

This commit is contained in:
Xylight committed 2024-07-09 16:21:37 -07:00
1 parent 2da953dd79
commit 2f8474c71c
3 files changed
+23 -8

No files matched your search

@@ -28,7 +28,7 @@
{#if name} {#if name}
<span class="flex gap-0 items-center max-w-full min-w-0 flex-shrink"> <span class="flex gap-0 items-center max-w-full min-w-0 flex-shrink">
<span class="font-medium">{community.title}</span> <span class="font-medium username-text">{community.title}</span>
{#if showInstance} {#if showInstance}
<span <span
class="text-slate-500 dark:text-zinc-500 font-normal class="text-slate-500 dark:text-zinc-500 font-normal
@@ -47,5 +47,12 @@
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
max-width: 100%; max-width: 100%;
flex: 1;
}
.username-text {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
} }
</style> </style>
@@ -127,8 +127,8 @@
class="absolute w-3.5 h-3.5 {subscribed == 'NotSubscribed' class="absolute w-3.5 h-3.5 {subscribed == 'NotSubscribed'
? 'bg-primary-900 dark:bg-primary-100 text-white dark:text-black' ? 'bg-primary-900 dark:bg-primary-100 text-white dark:text-black'
: 'bg-primary-100 dark:bg-primary-900 text-black dark:text-white'} rounded-full ring-2 box-border : 'bg-primary-100 dark:bg-primary-900 text-black dark:text-white'} rounded-full ring-2 box-border
ring-slate-50 dark:ring-zinc-950 ring-slate-50 dark:ring-zinc-950 grid place-items-center transition-all
-bottom-1 right-1 grid place-items-center transition-all" right-0 -translate-x-1 -translate-y-2"
> >
<Icon <Icon
src={subscribed == 'NotSubscribed' ? Plus : Check} src={subscribed == 'NotSubscribed' ? Plus : Check}
@@ -144,11 +144,11 @@
<CommunityLink <CommunityLink
{community} {community}
style="grid-area: community;" style="grid-area: community;"
class="flex-shrink" class="flex-shrink self-end"
/> />
{/if} {/if}
<span <span
class="text-slate-600 dark:text-zinc-400 flex flex-row gap-2 items-center" class="text-slate-600 dark:text-zinc-400 flex flex-row gap-2 items-center self-start"
style="grid-area: stats;" style="grid-area: stats;"
> >
{#if user} {#if user}
@@ -168,7 +168,7 @@
{/if} {/if}
</span> </span>
<div <div
class="flex flex-row items-center self-center flex-wrap gap-2 [&>*]:flex-shrink-0 badges" class="flex flex-row justify-end items-center self-center flex-wrap gap-2 [&>*]:flex-shrink-0 badges ml-2"
style="grid-area: badges;" style="grid-area: badges;"
> >
{#if tags} {#if tags}
@@ -268,7 +268,7 @@
'avatar stats badges'; 'avatar stats badges';
gap: 0; gap: 0;
grid-template-rows: auto auto; grid-template-rows: auto auto;
grid-template-columns: auto 1fr auto; grid-template-columns: max-content minmax(0, auto) auto;
} }
:global(.badge-tag-color) { :global(.badge-tag-color) {
@@ -32,7 +32,7 @@
class="flex gap-0 items-center flex-shrink max-w-full min-w-0" class="flex gap-0 items-center flex-shrink max-w-full min-w-0"
class:ml-0.5={avatar} class:ml-0.5={avatar}
> >
<span class:font-medium={showInstance}> <span class:font-medium={showInstance} class="username-text">
{$userSettings.displayNames ? user.display_name || user.name : user.name} {$userSettings.displayNames ? user.display_name || user.name : user.name}
</span> </span>
{#if showInstance} {#if showInstance}
@@ -62,6 +62,14 @@
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
min-width: 0;
max-width: 100%; max-width: 100%;
flex: 1;
}
.username-text {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
} }
</style> </style>