fix: margin in list mode
This commit is contained in:
1 parent
e569f0cf07
commit
33371fe640
3 files changed
+11
-7
No files matched your search
@@ -50,7 +50,7 @@
|
|||||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||||
<Material
|
<Material
|
||||||
color={view != 'card' ? 'none' : 'distinct'}
|
color={view != 'card' ? 'none' : 'distinct'}
|
||||||
class="relative max-w-full min-w-0 w-full group
|
class="relative max-w-full min-w-0 w-full
|
||||||
{view != 'card' ? 'bg-transparent !border-0' : 'p-5'} {view == 'compact'
|
{view != 'card' ? 'bg-transparent !border-0' : 'p-5'} {view == 'compact'
|
||||||
? 'py-4 list-type'
|
? 'py-4 list-type'
|
||||||
: view == 'list'
|
: view == 'list'
|
||||||
@@ -96,7 +96,9 @@
|
|||||||
<PostMediaCompact
|
<PostMediaCompact
|
||||||
{view}
|
{view}
|
||||||
bind:post={post.post}
|
bind:post={post.post}
|
||||||
class="{$userSettings.leftAlign ? 'mr-2' : 'ml-2'} flex-shrink"
|
class="{$userSettings.leftAlign
|
||||||
|
? 'mr-2'
|
||||||
|
: 'ml-2'} flex-shrink no-list-margin"
|
||||||
style="grid-area: media;"
|
style="grid-area: media;"
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
@@ -141,7 +143,7 @@
|
|||||||
grid-template-columns: var(--template-columns, 1fr auto);
|
grid-template-columns: var(--template-columns, 1fr auto);
|
||||||
}
|
}
|
||||||
|
|
||||||
:global(.list-type > *:not(:first-child)) {
|
:global(.list-type > *:not(.no-list-margin):not(:first-child)) {
|
||||||
padding-top: 0.5rem;
|
margin-top: 0.5rem;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -109,7 +109,7 @@
|
|||||||
</span>
|
</span>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="flex flex-row items-center overflow-auto gap-2 [&>*]:flex-shrink-0"
|
class="flex flex-row items-center self-center overflow-auto gap-2 [&>*]:flex-shrink-0"
|
||||||
style="grid-area: badges;"
|
style="grid-area: badges;"
|
||||||
>
|
>
|
||||||
{#if badges.nsfw}
|
{#if badges.nsfw}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
{#if (view == 'list' || view == 'compact') && !post.embed_title && (post.thumbnail_url || isImage(post.url))}
|
{#if (view == 'list' || view == 'compact') && !post.embed_title && (post.thumbnail_url || isImage(post.url))}
|
||||||
<div
|
<div
|
||||||
class="w-24 sm:w-32 h-24 {$$props.class ?? ''}"
|
class="w-24 sm:w-32 h-24 group/media {$$props.class ?? ''}"
|
||||||
style={$$props.style ?? ''}
|
style={$$props.style ?? ''}
|
||||||
>
|
>
|
||||||
<svelte:element
|
<svelte:element
|
||||||
@@ -27,7 +27,9 @@
|
|||||||
<img
|
<img
|
||||||
src={bestImageURL(post, true)}
|
src={bestImageURL(post, true)}
|
||||||
loading="lazy"
|
loading="lazy"
|
||||||
class="object-cover overflow-hidden bg-slate-100 dark:bg-zinc-800 rounded-xl h-24 w-24 sm:w-32 border border-slate-200 dark:border-zinc-800"
|
class="object-cover overflow-hidden bg-slate-100 dark:bg-zinc-800 rounded-xl h-24 w-24 sm:w-32
|
||||||
|
border border-slate-200 dark:border-zinc-800 group-hover/media:border-slate-400
|
||||||
|
group-hover/media:dark:border-zinc-600 transition-colors"
|
||||||
alt={post.name}
|
alt={post.name}
|
||||||
/>
|
/>
|
||||||
</svelte:element>
|
</svelte:element>
|
||||||
|
|||||||
Reference in new issue
Block a user