refactor: improve nav side UI

This commit is contained in:
三咲智子 2022-11-23 22:50:03 +08:00
parent 889b4b8a00
commit 6329a906a6
No known key found for this signature in database
GPG key ID: 69992F2250DFD93E
2 changed files with 38 additions and 11 deletions

View file

@ -2,43 +2,70 @@
</script> </script>
<template> <template>
<div px6 py2 flex="~ col gap6" text-lg> <div px3 py4 flex="~ col gap2" text-lg>
<template v-if="currentUser"> <template v-if="currentUser">
<NuxtLink flex gap2 items-center transition-100 to="/home" active-class="text-primary"> <NuxtLink
flex w-fit px5 py2 gap2 items-center transition-100 rounded-10 hover:bg-active
to="/home" active-class="text-primary"
>
<div i-ri:home-5-line /> <div i-ri:home-5-line />
<span>Home</span> <span>Home</span>
</NuxtLink> </NuxtLink>
<NuxtLink flex gap2 items-center transition-100 to="/notifications" active-class="text-primary"> <NuxtLink
flex w-fit px5 py2 gap2 items-center transition-100 rounded-10 hover:bg-active
to="/notifications" active-class="text-primary"
>
<div i-ri:notification-4-line /> <div i-ri:notification-4-line />
<span>Notifications</span> <span>Notifications</span>
</NuxtLink> </NuxtLink>
</template> </template>
<NuxtLink flex gap2 items-center transition-100 to="/explore" active-class="text-primary"> <NuxtLink
flex w-fit px5 py2 gap2 items-center transition-100 rounded-10 hover:bg-active
to="/explore" active-class="text-primary"
>
<div i-ri:hashtag /> <div i-ri:hashtag />
<span>Explore</span> <span>Explore</span>
</NuxtLink> </NuxtLink>
<NuxtLink flex gap2 items-center transition-100 to="/public/local" active-class="text-primary"> <NuxtLink
flex w-fit px5 py2 gap2 items-center transition-100 rounded-10 hover:bg-active
to="/public/local" active-class="text-primary"
>
<div i-ri:group-2-line /> <div i-ri:group-2-line />
<span>Local</span> <span>Local</span>
</NuxtLink> </NuxtLink>
<NuxtLink flex gap2 items-center transition-100 to="/public" active-class="text-primary"> <NuxtLink
flex w-fit px5 py2 gap2 items-center transition-100 rounded-10 hover:bg-active
to="/public" active-class="text-primary"
>
<div i-ri:earth-line /> <div i-ri:earth-line />
<span>Federated</span> <span>Federated</span>
</NuxtLink> </NuxtLink>
<template v-if="currentUser"> <template v-if="currentUser">
<NuxtLink flex gap2 items-center transition-100 to="/conversations" active-class="text-primary"> <NuxtLink
flex w-fit px5 py2 gap2 items-center transition-100 rounded-10 hover:bg-active
to="/conversations" active-class="text-primary"
>
<div i-ri:at-line /> <div i-ri:at-line />
<span>Conversations</span> <span>Conversations</span>
</NuxtLink> </NuxtLink>
<NuxtLink flex gap2 items-center transition-100 to="/favourites" active-class="text-primary"> <NuxtLink
flex w-fit px5 py2 gap2 items-center transition-100 rounded-10 hover:bg-active
to="/favourites" active-class="text-primary"
>
<div i-ri:heart-3-line /> <div i-ri:heart-3-line />
<span>Favorites</span> <span>Favorites</span>
</NuxtLink> </NuxtLink>
<NuxtLink flex gap2 items-center transition-100 to="/bookmarks" active-class="text-primary"> <NuxtLink
flex w-fit px5 py2 gap2 items-center transition-100 rounded-10 hover:bg-active
to="/bookmarks" active-class="text-primary"
>
<div i-ri:bookmark-line /> <div i-ri:bookmark-line />
<span>Bookmarks</span> <span>Bookmarks</span>
</NuxtLink> </NuxtLink>
<NuxtLink flex gap2 items-center transition-100 :to="`/@${currentUser.account?.username}`" active-class="text-primary"> <NuxtLink
flex w-fit px5 py2 gap2 items-center transition-100 rounded-10 hover:bg-active
:to="`/@${currentUser.account?.username}`" active-class="text-primary"
>
<AccountAvatar :account="currentUser.account" h="1.2em" /> <AccountAvatar :account="currentUser.account" h="1.2em" />
<span>Profile</span> <span>Profile</span>
</NuxtLink> </NuxtLink>

View file

@ -27,7 +27,7 @@
<div sticky top-0 h-screen flex="~ col"> <div sticky top-0 h-screen flex="~ col">
<slot name="right"> <slot name="right">
<NavTitle p5 /> <NavTitle p5 />
<NavSide border="y base" py8 /> <NavSide border="y base" />
<div flex-auto /> <div flex-auto />
<NavFooter /> <NavFooter />
</slot> </slot>