design: fix over padding on mobile

This commit is contained in:
James Xylight committed 2025-07-25 20:59:30 -07:00
1 parent 2d3e711a2f
commit 1f078bd6e1
11 files changed
+15 -15

No files matched your search

@@ -185,7 +185,7 @@
? 'bg-green-400/10 p-1 rounded-lg w-max font-medium' ? 'bg-green-400/10 p-1 rounded-lg w-max font-medium'
: page.url.hash.slice(1) == : page.url.hash.slice(1) ==
node.comment_view.comment.id.toString() && node.comment_view.comment.id.toString() &&
'bg-slate-100 dark:bg-zinc-800 p-1 rounded-lg w-max font-medium', 'bg-slate-100 dark:bg-zinc-800 p-1 rounded-lg max-w-max font-medium',
]} ]}
/> />
{#if actions} {#if actions}
@@ -52,7 +52,7 @@
community={community ? comment.community : undefined} community={community ? comment.community : undefined}
title={comment.post.name} title={comment.post.name}
id={comment.post.id} id={comment.post.id}
titleClass="text-sm" titleClass="text-sm text-slate-500 dark:text-zinc-400"
/> />
</div> </div>
<Button <Button
@@ -48,7 +48,7 @@
{initialOffset} {initialOffset}
> >
{#snippet item(index)} {#snippet item(index)}
<div class="-mx-4 sm:-mx-6 px-4 sm:px-6"> <div class="-mx-3 sm:-mx-6 px-3 sm:px-6">
<Comments <Comments
bind:nodes={() => [nodes[index]], v => (nodes[index] = v[0])} bind:nodes={() => [nodes[index]], v => (nodes[index] = v[0])}
{post} {post}
+2 -2
View File
@@ -164,8 +164,8 @@
class="absolute overflow-hidden inset-0 class="absolute overflow-hidden inset-0
sm:rounded-xl bg-slate-50 dark:bg-zinc-900 sm:rounded-xl bg-slate-50 dark:bg-zinc-900
opacity-0 transition-all -z-50 no-list-margin opacity-0 transition-all -z-50 no-list-margin
group-hover:inset-y-0.5 group-hover:-inset-x-4 sm:group-hover:-inset-x-5 group-hover:opacity-100 group-hover:inset-y-0.5 group-hover:-inset-x-3 sm:group-hover:-inset-x-5 group-hover:opacity-100
group-focus:inset-y-0.5 group-focus:-inset-x-4 sm:group-focus:-inset-x-5 group-focus:opacity-100 group-focus:inset-y-0.5 group-focus:-inset-x-3 sm:group-focus:-inset-x-5 group-focus:opacity-100
duration-150" duration-150"
></div> ></div>
</div> </div>
@@ -172,7 +172,7 @@
{:else} {:else}
<VirtualList <VirtualList
id="feed" id="feed"
class="divide-y -mx-4 sm:-mx-6 divide-slate-200 dark:divide-zinc-900" class="divide-y -mx-3 sm:-mx-6 divide-slate-200 dark:divide-zinc-900"
items={posts} items={posts}
{initialOffset} {initialOffset}
overscan={3} overscan={3}
@@ -185,7 +185,7 @@
data-index={row} data-index={row}
style={row < 7 ? `--anim-delay: ${row * 50}ms` : ''} style={row < 7 ? `--anim-delay: ${row * 50}ms` : ''}
class={[ class={[
'relative post-container px-4 sm:px-6', 'relative post-container px-3 sm:px-6',
row < 7 && 'pop-in opacity-0', row < 7 && 'pop-in opacity-0',
]} ]}
> >
@@ -42,8 +42,8 @@
<img <img
src={optimizeImageURL(thumbnail_url, 64)} src={optimizeImageURL(thumbnail_url, 64)}
alt="" alt=""
class="-z-10 absolute w-full object-cover h-full opacity-10 brightness-150 class="-z-10 absolute w-full object-cover h-full opacity-5 brightness-150
dark:brightness-90 dark:opacity-20 blur-2xl -inset-px" dark:brightness-70 dark:opacity-20 blur-2xl -inset-px"
/> />
{/if} {/if}
<div class="flex flex-col gap-2"> <div class="flex flex-col gap-2">
@@ -13,7 +13,7 @@
{#each items as item, index} {#each items as item, index}
<li <li
class={[ class={[
'py-3 px-4', 'py-2 px-3 sm:py-3 sm:px-4',
'hover:bg-slate-100 dark:hover:bg-zinc-900/25 transition-colors @container', 'hover:bg-slate-100 dark:hover:bg-zinc-900/25 transition-colors @container',
'bg-slate-50 dark:bg-zinc-950 first:rounded-t-2xl last:rounded-b-2xl', 'bg-slate-50 dark:bg-zinc-950 first:rounded-t-2xl last:rounded-b-2xl',
]} ]}
@@ -28,8 +28,8 @@
<div <div
class={[ class={[
pageHeader && pageHeader &&
`w-[calc(100%+2rem)] sm:w-[calc(100%+3rem)] `w-[calc(100%+1.5rem)] sm:w-[calc(100%+3rem)]
bg-slate-50 dark:bg-zinc-950 -m-4 sm:-m-6 mb-0 sm:mb-0 sm:p-6 p-4 bg-slate-50 dark:bg-zinc-950 -m-4 sm:-m-6 mb-0 sm:mb-0 sm:p-6 p-3
border-b border-slate-200 dark:border-zinc-800 margin`, border-b border-slate-200 dark:border-zinc-800 margin`,
]} ]}
{style} {style}
+1 -1
View File
@@ -123,7 +123,7 @@
{/snippet} {/snippet}
{#snippet main({ style: s, class: c })} {#snippet main({ style: s, class: c })}
<main <main
class="px-4 pt-4 sm:px-6 sm:pt-6 min-w-0 w-full flex flex-col h-full relative {c}" class="px-3 pt-3 sm:px-6 sm:pt-6 min-w-0 w-full flex flex-col h-full relative {c}"
style={s} style={s}
id="main" id="main"
> >
+1 -1
View File
@@ -135,7 +135,7 @@
{#each previews as preview, index (preview)} {#each previews as preview, index (preview)}
<a <a
href="/inbox/messages/{preview.user.id}" href="/inbox/messages/{preview.user.id}"
class="flex flex-row gap-2 py-3 -mx-4 sm:-mx-6 px-4 sm:px-6 min-w-0 class="flex flex-row gap-2 py-3 -mx-3 sm:-mx-6 px-3 sm:px-6 min-w-0
hover:bg-slate-100 dark:hover:bg-zinc-900 transition-colors" hover:bg-slate-100 dark:hover:bg-zinc-900 transition-colors"
in:fly|global={{ in:fly|global={{
duration: 1000, duration: 1000,
@@ -164,7 +164,7 @@
/> />
{:else} {:else}
<div class="divide-y divide-slate-200 dark:divide-zinc-800"> <div class="divide-y divide-slate-200 dark:divide-zinc-800">
<div class="-mx-4 sm:-mx-6 px-4 sm:px-6"> <div class="-mx-3 sm:-mx-6 px-3 sm:px-6">
<Comments nodes={tree} post={post.post_view.post} /> <Comments nodes={tree} post={post.post_view.post} />
</div> </div>
</div> </div>