design: improve tabs design
This commit is contained in:
9 files changed
+124
-172
No files matched your search
@@ -22,39 +22,34 @@
|
||||
{/if}
|
||||
|
||||
<div class="flex flex-col gap-4 h-full">
|
||||
<div
|
||||
class="sticky mx-auto z-50 max-w-full min-w-0 flex items-center gap-2
|
||||
top-6 lg:top-22"
|
||||
>
|
||||
<Tabs
|
||||
routes={[
|
||||
{
|
||||
href: '/admin/config',
|
||||
name: $t('routes.admin.config.title'),
|
||||
},
|
||||
{
|
||||
href: '/admin/applications',
|
||||
name: $t('routes.admin.applications.title'),
|
||||
},
|
||||
{
|
||||
href: '/admin/taglines',
|
||||
name: $t('routes.admin.taglines.title'),
|
||||
},
|
||||
{
|
||||
href: '/admin/team',
|
||||
name: $t('routes.admin.team.title'),
|
||||
},
|
||||
{
|
||||
href: '/admin/federation',
|
||||
name: $t('routes.admin.federation.title'),
|
||||
},
|
||||
{
|
||||
href: '/admin/media',
|
||||
name: $t('routes.admin.media.title'),
|
||||
},
|
||||
]}
|
||||
class="overflow-auto"
|
||||
/>
|
||||
</div>
|
||||
<Tabs
|
||||
routes={[
|
||||
{
|
||||
href: '/admin/config',
|
||||
name: $t('routes.admin.config.title'),
|
||||
},
|
||||
{
|
||||
href: '/admin/applications',
|
||||
name: $t('routes.admin.applications.title'),
|
||||
},
|
||||
{
|
||||
href: '/admin/taglines',
|
||||
name: $t('routes.admin.taglines.title'),
|
||||
},
|
||||
{
|
||||
href: '/admin/team',
|
||||
name: $t('routes.admin.team.title'),
|
||||
},
|
||||
{
|
||||
href: '/admin/federation',
|
||||
name: $t('routes.admin.federation.title'),
|
||||
},
|
||||
{
|
||||
href: '/admin/media',
|
||||
name: $t('routes.admin.media.title'),
|
||||
},
|
||||
]}
|
||||
class="overflow-auto"
|
||||
/>
|
||||
{@render children?.()}
|
||||
</div>
|
||||
@@ -20,21 +20,17 @@
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col gap-4 h-full">
|
||||
<div
|
||||
class="sticky mx-auto z-50 max-w-full min-w-0 flex items-center gap-2 top-6 lg:top-22"
|
||||
>
|
||||
<Tabs
|
||||
routes={[
|
||||
{
|
||||
href: `${communityUrl}/settings`,
|
||||
name: $t('routes.community.settings.settings'),
|
||||
},
|
||||
{
|
||||
href: `${communityUrl}/settings/team`,
|
||||
name: $t('routes.community.settings.team'),
|
||||
},
|
||||
]}
|
||||
></Tabs>
|
||||
</div>
|
||||
<Tabs
|
||||
routes={[
|
||||
{
|
||||
href: `${communityUrl}/settings`,
|
||||
name: $t('routes.community.settings.settings'),
|
||||
},
|
||||
{
|
||||
href: `${communityUrl}/settings/team`,
|
||||
name: $t('routes.community.settings.team'),
|
||||
},
|
||||
]}
|
||||
></Tabs>
|
||||
{@render children?.()}
|
||||
</div>
|
||||
@@ -1,47 +1,29 @@
|
||||
<script lang="ts">
|
||||
import { page } from '$app/state'
|
||||
import Tabs from '$lib/components/ui/layout/pages/Tabs.svelte'
|
||||
import { t } from '$lib/i18n/translations'
|
||||
import { SvelteURLSearchParams } from 'svelte/reactivity'
|
||||
|
||||
let { children } = $props()
|
||||
|
||||
function addSearchParam(
|
||||
currentSearchParams: URLSearchParams,
|
||||
newParamString: string,
|
||||
) {
|
||||
const updatedParams = new SvelteURLSearchParams(currentSearchParams)
|
||||
const newParam = new SvelteURLSearchParams(newParamString)
|
||||
const [key, value]: [string, string] = newParam.entries().next().value!
|
||||
updatedParams.set(key, value)
|
||||
return updatedParams
|
||||
}
|
||||
</script>
|
||||
|
||||
<div
|
||||
class="mt-4 mb-2 z-30 mx-auto max-w-full flex gap-2 md:flex-row flex-col
|
||||
items-center px-2 w-max top-6 lg:top-22"
|
||||
>
|
||||
<Tabs
|
||||
routes={[
|
||||
{
|
||||
href: '/inbox',
|
||||
name: $t('filter.location.all'),
|
||||
},
|
||||
{
|
||||
href: '/inbox?type=replies',
|
||||
name: $t('filter.inbox.replies'),
|
||||
},
|
||||
{
|
||||
href: '/inbox?type=mentions',
|
||||
name: $t('filter.inbox.mentions'),
|
||||
},
|
||||
{
|
||||
href: '/inbox/messages',
|
||||
name: $t('filter.inbox.messages'),
|
||||
},
|
||||
]}
|
||||
class="overflow-auto"
|
||||
/>
|
||||
</div>
|
||||
<Tabs
|
||||
routes={[
|
||||
{
|
||||
href: '/inbox',
|
||||
name: $t('filter.location.all'),
|
||||
},
|
||||
{
|
||||
href: '/inbox?type=replies',
|
||||
name: $t('filter.inbox.replies'),
|
||||
},
|
||||
{
|
||||
href: '/inbox?type=mentions',
|
||||
name: $t('filter.inbox.mentions'),
|
||||
},
|
||||
{
|
||||
href: '/inbox/messages',
|
||||
name: $t('filter.inbox.messages'),
|
||||
},
|
||||
]}
|
||||
class="overflow-auto"
|
||||
/>
|
||||
{@render children?.()}
|
||||
@@ -160,7 +160,7 @@
|
||||
</CommonList>
|
||||
|
||||
{#if res.private_messages.length == 50 || data.page != 1}
|
||||
<div class="mt-auto pb-4">
|
||||
<div class="mt-auto pb-4 mx-auto">
|
||||
<Pageination
|
||||
page={data.page}
|
||||
hasMore={res.private_messages.length == 50}
|
||||
|
||||
@@ -6,19 +6,14 @@
|
||||
</script>
|
||||
|
||||
<Header pageHeader>Instances</Header>
|
||||
<div
|
||||
class="mt-4 mb-2 z-30 mx-auto max-w-full flex gap-2 md:flex-row flex-col
|
||||
items-center px-2 w-max top-6 lg:top-22"
|
||||
>
|
||||
<Tabs
|
||||
routes={[
|
||||
{
|
||||
href: '/instances/linked',
|
||||
name: 'Linked',
|
||||
},
|
||||
{ href: '/instances/blocked', name: 'Blocked' },
|
||||
]}
|
||||
></Tabs>
|
||||
</div>
|
||||
<Tabs
|
||||
routes={[
|
||||
{
|
||||
href: '/instances/linked',
|
||||
name: 'Linked',
|
||||
},
|
||||
{ href: '/instances/blocked', name: 'Blocked' },
|
||||
]}
|
||||
></Tabs>
|
||||
<div class="h-3 sm:h-6"></div>
|
||||
{@render children?.()}
|
||||
@@ -10,22 +10,18 @@
|
||||
</svelte:head>
|
||||
|
||||
<div class="w-full space-y-4 pb-8">
|
||||
<div
|
||||
class="sticky w-max mx-auto z-50 max-w-full min-w-0 flex items-center gap-2 top-6 lg:top-22"
|
||||
>
|
||||
<Tabs
|
||||
class="overflow-auto"
|
||||
routes={[
|
||||
{
|
||||
href: '/moderation',
|
||||
name: $t('routes.moderation.feed'),
|
||||
},
|
||||
{
|
||||
href: '/moderation/communities',
|
||||
name: $t('routes.communities.title'),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
<Tabs
|
||||
class="overflow-auto"
|
||||
routes={[
|
||||
{
|
||||
href: '/moderation',
|
||||
name: $t('routes.moderation.feed'),
|
||||
},
|
||||
{
|
||||
href: '/moderation/communities',
|
||||
name: $t('routes.communities.title'),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
{@render children?.()}
|
||||
</div>
|
||||
@@ -25,9 +25,7 @@
|
||||
</svelte:head>
|
||||
|
||||
<div class="flex flex-col gap-4 h-full z-0">
|
||||
<div
|
||||
class="sticky mx-auto z-50 max-w-full min-w-0 flex items-center gap-2 top-6 lg:top-22"
|
||||
>
|
||||
<div class="flex flex-row justify-between">
|
||||
<Tabs
|
||||
class="overflow-auto"
|
||||
routes={[
|
||||
|
||||
@@ -9,39 +9,34 @@
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col gap-2">
|
||||
<div
|
||||
class="sticky mx-auto z-50 max-w-full min-w-0 flex items-center gap-2 top-6 lg:top-22"
|
||||
>
|
||||
<Tabs
|
||||
routes={[
|
||||
{
|
||||
href: '/util',
|
||||
name: 'Home',
|
||||
},
|
||||
{
|
||||
href: '/util/instance',
|
||||
name: 'Photon instance',
|
||||
},
|
||||
{
|
||||
href: '/util/photonify',
|
||||
name: 'Photonify Links',
|
||||
},
|
||||
{
|
||||
href: '/util/placeholder',
|
||||
name: 'Placeholders',
|
||||
},
|
||||
{
|
||||
href: '/util/constants',
|
||||
name: 'Constants',
|
||||
},
|
||||
{
|
||||
href: '/functions',
|
||||
name: 'Functions',
|
||||
},
|
||||
]}
|
||||
class="overflow-auto"
|
||||
currentRoute={page.url.toString()}
|
||||
/>
|
||||
</div>
|
||||
<Tabs
|
||||
routes={[
|
||||
{
|
||||
href: '/util',
|
||||
name: 'Home',
|
||||
},
|
||||
{
|
||||
href: '/util/instance',
|
||||
name: 'Photon instance',
|
||||
},
|
||||
{
|
||||
href: '/util/photonify',
|
||||
name: 'Photonify Links',
|
||||
},
|
||||
{
|
||||
href: '/util/placeholder',
|
||||
name: 'Placeholders',
|
||||
},
|
||||
{
|
||||
href: '/util/constants',
|
||||
name: 'Constants',
|
||||
},
|
||||
{
|
||||
href: '/functions',
|
||||
name: 'Functions',
|
||||
},
|
||||
]}
|
||||
class="overflow-auto"
|
||||
/>
|
||||
{@render children?.()}
|
||||
</div>
|
||||
Reference in new issue
Block a user