|
1 | 1 | <template> |
2 | | - <nav class="bg-white dark:bg-theme-black border-t border-muted fixed bottom-0 left-0 right-0 pb-safe"> |
3 | | - <ul class="flex justify-around items-center w-full max-w-md min-h-14 mx-auto"> |
4 | | - <li |
| 2 | + <nav class="fixed inset-x-0 bottom-0 z-40 pb-safe pointer-events-none"> |
| 3 | + <div |
| 4 | + :class="[ |
| 5 | + 'flex', |
| 6 | + 'items-center', |
| 7 | + 'justify-center', |
| 8 | + 'gap-1', |
| 9 | +
|
| 10 | + 'w-fit', |
| 11 | + 'mx-auto', |
| 12 | + 'mb-2', |
| 13 | + 'p-1.5', |
| 14 | +
|
| 15 | + 'bg-(--ui-bg)/80', |
| 16 | + 'backdrop-blur-sm', |
| 17 | + 'rounded-full', |
| 18 | + 'ring-1 ring-(--ui-border)', |
| 19 | + 'pointer-events-auto', |
| 20 | + ]" |
| 21 | + > |
| 22 | + <template |
5 | 23 | v-for="item in menuItems" |
6 | | - :key="item.label" |
7 | | - class="flex-1" |
| 24 | + :key="item.key" |
8 | 25 | > |
9 | | - <NuxtLink |
| 26 | + <UButton |
10 | 27 | v-if="item.key === 'account' && hasLoggedIn" |
11 | | - class="relative flex justify-center items-center" |
| 28 | + class="justify-center min-w-24 h-14 rounded-full" |
| 29 | + :variant="item.isActive ? 'solid' : 'ghost'" |
| 30 | + color="neutral" |
12 | 31 | :to="item.to" |
| 32 | + size="xl" |
| 33 | + :aria-label="item.label" |
13 | 34 | > |
14 | | - <UAvatar |
15 | | - :class="[ |
16 | | - 'bg-white', |
17 | | - item.isActive |
18 | | - ? 'border-2 border-theme-black dark:border-theme-white' |
19 | | - : 'border border-muted', |
20 | | - ]" |
21 | | - :src="user?.avatar" |
22 | | - :alt="user?.displayName" |
23 | | - icon="i-material-symbols-person-2-rounded" |
24 | | - size="lg" |
25 | | - /> |
26 | | - <UserAvatarPlusBadge |
27 | | - v-if="user?.isLikerPlus" |
28 | | - :is-inverted="item.isActive" |
29 | | - /> |
30 | | - </NuxtLink> |
| 35 | + <template #leading> |
| 36 | + <div class="relative"> |
| 37 | + <UAvatar |
| 38 | + class="bg-white ring-1 ring-default border border-default" |
| 39 | + :src="user?.avatar" |
| 40 | + :alt="user?.displayName" |
| 41 | + icon="i-material-symbols-person-2-rounded" |
| 42 | + size="md" |
| 43 | + /> |
| 44 | + <UserAvatarPlusBadge |
| 45 | + v-if="user?.isLikerPlus" |
| 46 | + :color="item.isActive ? 'secondary' : 'primary'" |
| 47 | + /> |
| 48 | + </div> |
| 49 | + </template> |
| 50 | + </UButton> |
31 | 51 | <UButton |
32 | 52 | v-else |
33 | | - class="flex-col gap-0" |
| 53 | + class="flex-col gap-0 min-w-24 rounded-full" |
34 | 54 | :label="item.label" |
35 | 55 | :icon="item.icon" |
36 | | - :color="item.isActive ? 'primary' : 'neutral'" |
37 | | - variant="link" |
| 56 | + :variant="item.isActive ? 'solid' : 'ghost'" |
| 57 | + color="neutral" |
38 | 58 | :to="item.to" |
39 | 59 | size="xl" |
40 | | - block |
41 | 60 | :ui="{ label: 'text-xs' }" |
42 | 61 | > |
43 | 62 | <template |
|
50 | 69 | /> |
51 | 70 | </template> |
52 | 71 | </UButton> |
53 | | - </li> |
54 | | - </ul> |
| 72 | + </template> |
| 73 | + </div> |
55 | 74 | </nav> |
56 | 75 | </template> |
57 | 76 |
|
|
0 commit comments