Skip to content

Commit cb57331

Browse files
authored
feature: Play, Watch and featured apps are outlined tiles in the left nav, so they only light up on the page you're on (#998)
1 parent 3992b81 commit cb57331

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

‎layouts/components/LeftNavDoors.vue‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,28 +40,28 @@ const { setOpenMobile } = useSidebar();
4040
</SidebarMenuItem>
4141
</SidebarMenu>
4242

43-
<div v-else class="flex flex-col gap-2">
43+
<!-- Outlined tiles with no fill, so none looks chosen at rest; only the
44+
page you're on turns amber. Icon and label sit on the sections'
45+
columns (18px, 36px). -->
46+
<div v-else class="flex flex-col gap-1.5">
4447
<NuxtLink
4548
v-for="door in doors"
4649
:key="door.key"
4750
:to="door.to!"
4851
:data-active="door.active || undefined"
4952
:aria-current="door.active ? 'page' : undefined"
50-
class="group/door flex h-[38px] items-center gap-1.5 rounded-lg pl-1.5 pr-2 text-sm font-semibold text-sidebar-foreground/85 outline-none ring-sidebar-ring transition-[background-color,color,transform] duration-150 hover:bg-sidebar-accent/60 hover:text-sidebar-foreground focus-visible:ring-2 active:scale-[0.98] data-[active]:bg-[hsl(var(--tac-amber)/0.11)] data-[active]:text-sidebar-foreground motion-reduce:transition-none"
53+
class="group/door flex h-[42px] items-center gap-[9px] rounded-lg border border-sidebar-border pl-2 pr-2 text-sm font-semibold text-sidebar-foreground/80 outline-none ring-sidebar-ring transition-[background-color,border-color,color,transform] duration-150 hover:border-white/[0.12] hover:bg-white/[0.03] hover:text-sidebar-foreground focus-visible:ring-2 active:scale-[0.98] data-[active]:border-[hsl(var(--tac-amber)/0.45)] data-[active]:bg-[hsl(var(--tac-amber)/0.07)] data-[active]:text-sidebar-foreground motion-reduce:transition-none"
5154
@click="setOpenMobile(false)"
5255
>
53-
<!-- The tile marks a button at rest without the row looking chosen;
54-
only the page you're on fills. -->
55-
<span
56-
class="grid size-6 shrink-0 place-items-center rounded-md ring-1 ring-inset transition-colors duration-200"
56+
<component
57+
:is="door.icon"
58+
class="size-[18px] shrink-0 transition-colors duration-200"
5759
:class="
5860
door.active
59-
? 'bg-[hsl(var(--tac-amber)/0.16)] text-[hsl(var(--tac-amber))] ring-[hsl(var(--tac-amber)/0.3)]'
60-
: 'bg-white/[0.05] text-muted-foreground ring-sidebar-border group-hover/door:text-sidebar-foreground'
61+
? 'text-[hsl(var(--tac-amber))]'
62+
: 'text-muted-foreground group-hover/door:text-sidebar-foreground'
6163
"
62-
>
63-
<component :is="door.icon" class="size-4" />
64-
</span>
64+
/>
6565
<span class="min-w-0 flex-1 truncate">{{ door.label }}</span>
6666
<span
6767
v-if="door.badge"

0 commit comments

Comments
 (0)