misc: change default preload rules for community page

This commit is contained in:
Xylight committed 2024-09-02 15:07:00 -07:00
1 parent 73f5cd5e77
commit 0977139bc5
3 files changed
+18 -6

No files matched your search

@@ -52,6 +52,7 @@
community.community.actor_id
)}"
class="flex-1"
data-sveltekit-preload-data="tap"
>
<div
class="flex {view == 'cozy'
@@ -8,6 +8,12 @@
name: string
}[]
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>
<nav
@@ -24,7 +30,7 @@
transition-colors duration-100 relative z-0"
>
{route.name}
{#if (currentRoute ?? $page.url.pathname) == route.href}
{#if isSelected($page.url, currentRoute, route.href)}
<div
class="rounded-full bg-slate-100/60 dark:bg-zinc-700/60
absolute inset-0 w-full h-full -z-10"
+10 -5
View File
@@ -153,10 +153,15 @@
{/if}
</ul>
{#if data.communities.length > 0}
<div class="mt-2 w-full">
<Pageination
page={Number($page.url.searchParams.get('page')) || 1}
on:change={(p) => searchParam($page.url, 'page', p.detail.toString())}
/>
<div
class="sticky z-30 mx-auto max-w-full"
style="bottom: max(1.5rem, {$contentPadding.bottom}px);"
>
<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>
{/if}