1
0

feat: moving home nav item out and put it on top

reducing space between parameter and account
This commit is contained in:
Michel Edighoffer 2023-01-09 01:39:59 +01:00
parent 9e24cbe5aa
commit 2388392308
3 changed files with 25 additions and 4 deletions

View File

@ -12,7 +12,6 @@ const { notifications } = useNotifications()
<NavSideItem :text="$t('nav.search')" to="/search" icon="i-ri:search-line" xl:hidden :command="command" />
<div shrink hidden sm:block mt-4 />
<NavSideItem :text="$t('nav.home')" to="/home" icon="i-ri:home-5-line" user-only :command="command" />
<NavSideItem :text="$t('nav.notifications')" to="/notifications" icon="i-ri:notification-4-line" user-only :command="command">
<template #icon>
<div flex relative>
@ -34,6 +33,6 @@ const { notifications } = useNotifications()
<NavSideItem :text="$t('nav.federated')" :to="`/${currentServer}/public`" icon="i-ri:earth-line" :command="command" />
<div shrink hidden sm:block mt-4 />
<NavSideItem :text="$t('nav.settings')" to="/settings" icon="i-ri:settings-3-line" :command="command" />
<NavSideItem :text="$t('nav.settings')" to="/settings" icon="i-ri:settings-3-line" :command="command" class="-mb-2" />
</nav>
</template>

View File

@ -20,11 +20,33 @@ const { env } = useBuildInfo()
</NuxtLink>
<div hidden xl:flex items-center me-8 mt-2>
<NuxtLink
key="back"
:aria-label="$t('nav.back')"
@click="$router.go(-1)"
opacity-50 @click="$router.back()"
>
<div i-ri:arrow-left-line class="rtl-flip" btn-text />
</NuxtLink>
<NuxtLink
key="home"
:aria-label="$t('nav.home')"
to="/home"
outline-none
>
<div i-ri:home-5-line btn-text />
</NuxtLink>
</div>
</div>
</template>
<style scoped>
.v-enter-active,
.v-leave-active {
transition: opacity 0.5s ease;
}
.v-enter-from,
.v-leave-to {
opacity: 0;
}
</style>

View File

@ -25,7 +25,7 @@ const showUserPicker = logicAnd(
<div hidden xl:block>
<UserSignInEntry v-if="!currentUser" />
</div>
<div v-if="currentUser" p6 pb8 w-full>
<div v-if="currentUser" p6 w-full>
<div hidden xl-block>
<UserPicker v-if="showUserPicker" />
<div v-else flex="~" items-center justify-between>