fix: inconsistent spacing for headers

This commit is contained in:
James Xylight committed 2025-08-30 13:03:54 -07:00
1 parent 3649c3b7a3
commit f6172a1ed3
9 files changed
+101 -101

No files matched your search

@@ -43,7 +43,7 @@
{@render children?.()} {@render children?.()}
</h1> </h1>
{#if extended} {#if extended}
<div class="mt-4"> <div class="flex flex-col gap-3 mt-3">
{@render extended?.()} {@render extended?.()}
</div> </div>
{/if} {/if}
+30 -24
View File
@@ -21,12 +21,12 @@
onMount(async () => { onMount(async () => {
await data.feed.value await data.feed.value
$effect(() => { })
if (data.filters.value.type_) $effect(() => {
settings.defaultSort.feed = data.filters.value.type_ if (data.filters.value.type_)
if (data.filters.value.sort) settings.defaultSort.feed = data.filters.value.type_
settings.defaultSort.sort = data.filters.value.sort if (data.filters.value.sort)
}) settings.defaultSort.sort = data.filters.value.sort
}) })
const FeedComponent = $derived( const FeedComponent = $derived(
@@ -45,27 +45,33 @@
{$t('routes.frontpage.title')} {$t('routes.frontpage.title')}
{#snippet extended()} {#snippet extended()}
<form class="flex items-center gap-2" method="get" action="/"> <form class="" method="get" action="/">
{#if data.filters.value.type_} <div class="flex flex-row gap-4">
<Location {#if data.filters.value.type_}
name="type" <Location
name="type"
navigate
bind:selected={data.filters.value.type_}
/>
{/if}
<Sort
placement="bottom"
name="sort"
navigate navigate
bind:selected={data.filters.value.type_} bind:selected={data.filters.value.sort}
/> />
{/if} <ViewSelect placement="bottom" />
<Sort
placement="bottom"
name="sort"
navigate
bind:selected={data.filters.value.sort}
/>
<ViewSelect placement="bottom" />
<noscript> <noscript>
<Button class="self-end h-[34px] aspect-square" size="custom" submit> <Button
<Icon src={ArrowRight} size="16" micro /> class="self-end h-[34px] aspect-square"
</Button> size="custom"
</noscript> submit
>
<Icon src={ArrowRight} size="16" micro />
</Button>
</noscript>
</div>
</form> </form>
{/snippet} {/snippet}
</Header> </Header>
+1 -1
View File
@@ -126,7 +126,7 @@
</div> </div>
{/snippet} {/snippet}
</Header> </Header>
<form class="accounts-grid mt-4 sm:mt-6 gap-4"> <form class="accounts-grid gap-4">
<CommonList <CommonList
selected={p => p.id == profile.meta.profile} selected={p => p.id == profile.meta.profile}
items={profile.meta.profiles} items={profile.meta.profiles}
+3 -4
View File
@@ -41,14 +41,13 @@
<title>{$t('routes.communities.title')}</title> <title>{$t('routes.communities.title')}</title>
</svelte:head> </svelte:head>
<Header pageHeader class="justify-between"> <Header pageHeader>
<span>{$t('routes.communities.title')}</span> {$t('routes.communities.title')}
{#snippet extended()} {#snippet extended()}
<form method="get" action="/communities" class="contents" bind:this={form}> <form method="get" action="/communities" class="contents" bind:this={form}>
<SearchBar bind:query={search} /> <SearchBar bind:query={search} />
<div class="flex flex-row flex-wrap gap-4 mt-4 items-center"> <div class="flex flex-row flex-wrap gap-4 items-center">
<Location <Location
name="type" name="type"
selected={data.type} selected={data.type}
+1
View File
@@ -92,6 +92,7 @@
<Button <Button
color="primary" color="primary"
rounding="pill" rounding="pill"
class="w-max"
onclick={() => (searchModal.open = !searchModal.open)} onclick={() => (searchModal.open = !searchModal.open)}
> >
<Icon src={ChatBubbleOvalLeftEllipsis} size="18" mini /> <Icon src={ChatBubbleOvalLeftEllipsis} size="18" mini />
+61 -62
View File
@@ -71,67 +71,67 @@
} }
</script> </script>
<div class="mb-4 flex flex-col gap-4"> <Header pageHeader>
<Header pageHeader> {$t('routes.moderation.title')}
{$t('routes.moderation.title')} {#snippet extended()}
{#snippet extended()} <div class="flex flex-row gap-2 flex-wrap items-end">
<div class="flex flex-row gap-2 flex-wrap items-end"> <Select
<Select bind:value={data.type.value}
bind:value={data.type.value} onchange={async () => {
onchange={async () => { await tick()
await tick() searchParam(page.url, 'type', data.type.value, 'page')
searchParam(page.url, 'type', data.type.value, 'page') }}
}} >
> {#snippet customLabel()}
{#snippet customLabel()} <span class="flex items-center gap-1">
<span class="flex items-center gap-1"> <Icon src={Funnel} size="15" mini />
<Icon src={Funnel} size="15" mini /> {$t('filter.filter')}
{$t('filter.filter')} </span>
</span> {/snippet}
{/snippet} <Option value="all">{$t('filter.location.all')}</Option>
<Option value="all">{$t('filter.location.all')}</Option> <Option value="unread">{$t('filter.unread')}</Option>
<Option value="unread">{$t('filter.unread')}</Option> </Select>
</Select> <Button
<Button loading={batch.progress >= 0}
loading={batch.progress >= 0} disabled={batch.progress >= 0 || data.items.value?.length == 0}
disabled={batch.progress >= 0 || data.items.value?.length == 0} onclick={markAllAsResolved}
onclick={markAllAsResolved} class="h-max ml-auto"
class="h-max ml-auto" rounding="pill"
rounding="pill" color="primary"
color="primary" >
> <Icon src={Check} size="16" mini />
<Icon src={Check} size="16" mini /> {$t('routes.moderation.markAll')}
{$t('routes.moderation.markAll')} </Button>
</Button> </div>
</div> {#if data.filters.community}
{#if data.filters.community} <ul class="font-normal flex flex-col gap-2 mt-2">
<ul class="font-normal flex flex-col gap-2 mt-2"> <li>
<li> <span class="text-sm text-slate-600 dark:text-zinc-400">
<span class="text-sm text-slate-600 dark:text-zinc-400"> {$t('form.post.community')}
{$t('form.post.community')} </span>
</span> {#await client().getCommunity({ id: data.filters.community })}
{#await client().getCommunity({ id: data.filters.community })} <Spinner width={24} />
<Spinner width={24} /> {:then community}
{:then community} <a
<a class="inline"
class="inline" aria-label={$t('common.remove')}
aria-label={$t('common.remove')} href="?community="
href="?community=" >
> <Icon src={XMark} size="16" micro class="inline" />
<Icon src={XMark} size="16" micro class="inline" /> </a>
</a> <CommunityLink
<CommunityLink class="w-max inline"
class="w-max inline" community={community.community_view.community}
community={community.community_view.community} />
/> {/await}
{/await} </li>
</li> </ul>
</ul> {/if}
{/if} {/snippet}
{/snippet} </Header>
</Header> {#if batch.progress > 0}
</div> <ProgressBar progress={batch.progress} />
<ProgressBar progress={batch.progress} /> {/if}
{#if data.items?.value && data.items?.value.length > 0} {#if data.items?.value && data.items?.value.length > 0}
<CommonList items={data.items?.value} size="lg"> <CommonList items={data.items?.value} size="lg">
{#snippet item(item)} {#snippet item(item)}
@@ -165,4 +165,3 @@
description={$t('routes.moderation.empty.description')} description={$t('routes.moderation.empty.description')}
/> />
{/if} {/if}
<div class="h-4"></div>
+1 -6
View File
@@ -55,12 +55,7 @@
<Header pageHeader> <Header pageHeader>
{$t('routes.search.title')} {$t('routes.search.title')}
{#snippet extended()} {#snippet extended()}
<form <form method="get" action="/search" class="contents" bind:this={form}>
method="get"
action="/search"
class="flex flex-col gap-4"
bind:this={form}
>
<SearchBar bind:query={data.filters.value.query} /> <SearchBar bind:query={data.filters.value.query} />
<div class="flex flex-row flex-wrap items-center gap-4"> <div class="flex flex-row flex-wrap items-center gap-4">
<Select <Select
+1 -1
View File
@@ -13,7 +13,7 @@
let searchElement = $state<HTMLInputElement>() let searchElement = $state<HTMLInputElement>()
</script> </script>
<div class="mt-4 mb-0 sticky z-30 top-6 lg:top-22"> <div class="mb-0 sticky z-30 top-6 lg:top-22">
<div <div
class="flex gap-2 flex-row items-center w-full text-base h-10 drop-shadow-xl" class="flex gap-2 flex-row items-center w-full text-base h-10 drop-shadow-xl"
> >
+2 -2
View File
@@ -51,10 +51,10 @@
</Modal> </Modal>
{/if} {/if}
<Header pageHeader>{$t('routes.theme.title')}</Header>
<div class="flex flex-col gap-4 h-full"> <div class="flex flex-col gap-4 h-full">
<Header pageHeader>{$t('routes.theme.title')}</Header>
<h3 <h3
class="relative top-[26px] z-10 left-6 font-medium text-sm bg-slate-25 dark:bg-zinc-925 w-max px-1" class="relative -mb-7 z-10 left-6 font-medium text-sm bg-slate-25 dark:bg-zinc-925 w-max px-1"
> >
{$t('routes.theme.preset.presets')} {$t('routes.theme.preset.presets')}
</h3> </h3>