misc: change default preload rules for community page
This commit is contained in:
1 parent
73f5cd5e77
commit
0977139bc5
3 files changed
+18
-6
No files matched your search
@@ -52,6 +52,7 @@
|
|||||||
community.community.actor_id
|
community.community.actor_id
|
||||||
)}"
|
)}"
|
||||||
class="flex-1"
|
class="flex-1"
|
||||||
|
data-sveltekit-preload-data="tap"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="flex {view == 'cozy'
|
class="flex {view == 'cozy'
|
||||||
|
|||||||
@@ -8,6 +8,12 @@
|
|||||||
name: string
|
name: string
|
||||||
}[]
|
}[]
|
||||||
export let currentRoute: string | undefined = undefined
|
export let currentRoute: string | undefined = undefined
|
||||||
|
export let isSelected: (
|
||||||
|
url: URL,
|
||||||
|
currentRoute: string | undefined,
|
||||||
|
route: string
|
||||||
|
) => boolean = (url, currentRoute, route) =>
|
||||||
|
(currentRoute ?? url.pathname) == route
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<nav
|
<nav
|
||||||
@@ -24,7 +30,7 @@
|
|||||||
transition-colors duration-100 relative z-0"
|
transition-colors duration-100 relative z-0"
|
||||||
>
|
>
|
||||||
{route.name}
|
{route.name}
|
||||||
{#if (currentRoute ?? $page.url.pathname) == route.href}
|
{#if isSelected($page.url, currentRoute, route.href)}
|
||||||
<div
|
<div
|
||||||
class="rounded-full bg-slate-100/60 dark:bg-zinc-700/60
|
class="rounded-full bg-slate-100/60 dark:bg-zinc-700/60
|
||||||
absolute inset-0 w-full h-full -z-10"
|
absolute inset-0 w-full h-full -z-10"
|
||||||
|
|||||||
@@ -153,10 +153,15 @@
|
|||||||
{/if}
|
{/if}
|
||||||
</ul>
|
</ul>
|
||||||
{#if data.communities.length > 0}
|
{#if data.communities.length > 0}
|
||||||
<div class="mt-2 w-full">
|
<div
|
||||||
<Pageination
|
class="sticky z-30 mx-auto max-w-full"
|
||||||
page={Number($page.url.searchParams.get('page')) || 1}
|
style="bottom: max(1.5rem, {$contentPadding.bottom}px);"
|
||||||
on:change={(p) => searchParam($page.url, 'page', p.detail.toString())}
|
>
|
||||||
/>
|
<Tabs routes={[]} class="mx-auto">
|
||||||
|
<Pageination
|
||||||
|
page={Number($page.url.searchParams.get('page')) || 1}
|
||||||
|
on:change={(p) => searchParam($page.url, 'page', p.detail.toString())}
|
||||||
|
/>
|
||||||
|
</Tabs>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
Reference in new issue
Block a user