feat: responsive sidebar, aim for a 600px timeline always (#482)
This commit is contained in:
parent
3907199a54
commit
44cf8aa89c
6 changed files with 29 additions and 39 deletions
|
@ -22,7 +22,7 @@ defineProps<{
|
|||
</div>
|
||||
<div flex items-center flex-shrink-0 gap-x-2>
|
||||
<slot name="actions" />
|
||||
<NavUser v-if="isHydrated && isMediumScreen" />
|
||||
<NavUser v-if="isHydrated" sm:hidden />
|
||||
</div>
|
||||
</div>
|
||||
<slot name="header" />
|
||||
|
|
|
@ -3,7 +3,7 @@ const { notifications } = useNotifications()
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<nav md:px3 md:py4 flex="~ col gap2" text-size-base leading-normal md:text-lg>
|
||||
<nav sm:px3 sm:py4 flex="~ col gap2" text-size-base leading-normal md:text-lg>
|
||||
<template v-if="isMastoInitialised && currentUser">
|
||||
<NavSideItem :text="$t('nav_side.home')" to="/home" icon="i-ri:home-5-line" />
|
||||
<NavSideItem :text="$t('nav_side.notifications')" to="/notifications" icon="i-ri:notification-4-line">
|
||||
|
@ -24,20 +24,6 @@ const { notifications } = useNotifications()
|
|||
<NavSideItem :text="$t('nav_side.conversations')" to="/conversations" icon="i-ri:at-line" />
|
||||
<NavSideItem :text="$t('nav_side.favourites')" to="/favourites" icon="i-ri:heart-3-line" />
|
||||
<NavSideItem :text="$t('nav_side.bookmarks')" to="/bookmarks" icon="i-ri:bookmark-line " />
|
||||
<NavSideItem
|
||||
v-if="isHydrated && isMediumScreen"
|
||||
:text="currentUser.account.displayName"
|
||||
:to="getAccountRoute(currentUser.account)"
|
||||
icon="i-ri:account-circle-line"
|
||||
>
|
||||
<template #icon>
|
||||
<AccountAvatar :account="currentUser.account" h="1.2em" md:text-size-inherit text-xl />
|
||||
</template>
|
||||
<ContentRich
|
||||
:content="getDisplayName(currentUser.account, { rich: true }) || $t('nav_side.profile')"
|
||||
:emojis="currentUser.account.emojis"
|
||||
/>
|
||||
</NavSideItem>
|
||||
</template>
|
||||
</nav>
|
||||
</template>
|
||||
|
|
|
@ -26,13 +26,15 @@ useCommand({
|
|||
|
||||
<template>
|
||||
<NuxtLink :to="to" :active-class="isMastoInitialised ? 'text-primary' : ''" group focus:outline-none @click="$scrollToTop">
|
||||
<div flex w-fit px5 py2 md:gap2 gap4 items-center transition-100 rounded-full group-hover:bg-active group-focus-visible:ring="2 current">
|
||||
<slot name="icon">
|
||||
<div :class="icon" md:text-size-inherit text-xl />
|
||||
</slot>
|
||||
<slot>
|
||||
<span>{{ text }}</span>
|
||||
</slot>
|
||||
</div>
|
||||
<CommonTooltip :disabled="!isMediumScreen" :content="text" placement="right">
|
||||
<div flex w-fit px2 mx3 lg:mx0 lg:px5 py2 gap4 items-center transition-100 rounded-full group-hover:bg-active group-focus-visible:ring="2 current">
|
||||
<slot name="icon">
|
||||
<div :class="icon" text-xl />
|
||||
</slot>
|
||||
<slot>
|
||||
<span hidden lg:block>{{ text }}</span>
|
||||
</slot>
|
||||
</div>
|
||||
</CommonTooltip>
|
||||
</NuxtLink>
|
||||
</template>
|
||||
|
|
|
@ -7,7 +7,7 @@ const sub = env === 'local' ? 'dev' : env === 'staging' ? 'preview' : 'alpha'
|
|||
<!-- Use external to force refresh page and jump to top of timeline -->
|
||||
<NuxtLink flex px3 py2 items-center text-2xl gap-2 hover:bg-active focus-visible:ring="2 current" rounded-full to="/" external>
|
||||
<img :alt="$t('app_logo')" src="/logo.svg" w-10 h-10 height="40" width="40">
|
||||
<div>
|
||||
<div hidden lg:block>
|
||||
{{ $t('app_name') }} <sup text-sm italic text-secondary mt-1>{{ sub }}</sup>
|
||||
</div>
|
||||
</NuxtLink>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<button btn-outline rounded-full font-bold py4 flex="~ gap2 center" @click="openPublishDialog()">
|
||||
<button color-primary btn-outline rounded-full ml-7 lg:ml-3 w-9 lg:w-auto font-bold py2 lg:py4 flex="~ gap2 center" @click="openPublishDialog()">
|
||||
<div i-ri:quill-pen-line />
|
||||
{{ $t('action.compose') }}
|
||||
<span hidden lg:block>{{ $t('action.compose') }}</span>
|
||||
</button>
|
||||
</template>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue