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
|
||||
)}"
|
||||
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"
|
||||
|
||||
Reference in new issue
Block a user