Rearrange sidebar ordering
This commit is contained in:
parent
bd074e15fa
commit
7ceff69f39
|
@ -15,9 +15,9 @@ export function ManifoldLogo(props: {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Link href={user ? '/home' : '/'}>
|
<Link href={user ? '/home' : '/'}>
|
||||||
<a className={clsx('flex flex-shrink-0 flex-row gap-4', className)}>
|
<a className={clsx('group flex flex-shrink-0 flex-row gap-4', className)}>
|
||||||
<img
|
<img
|
||||||
className="transition-all hover:rotate-12"
|
className="transition-all group-hover:rotate-12"
|
||||||
src={darkBackground ? '/logo-white.svg' : '/logo.svg'}
|
src={darkBackground ? '/logo-white.svg' : '/logo.svg'}
|
||||||
width={45}
|
width={45}
|
||||||
height={45}
|
height={45}
|
||||||
|
|
|
@ -43,7 +43,7 @@ export function getNavigationOptions() {
|
||||||
export function ProfileSummary(props: { user: User | undefined }) {
|
export function ProfileSummary(props: { user: User | undefined }) {
|
||||||
const { user } = props
|
const { user } = props
|
||||||
return (
|
return (
|
||||||
<Row className="group avatar items-center gap-4 py-6 text-gray-600">
|
<Row className="group avatar items-center gap-4 py-6 text-gray-600 group-hover:text-gray-900">
|
||||||
<Avatar avatarUrl={user?.avatarUrl} username={user?.username} noLink />
|
<Avatar avatarUrl={user?.avatarUrl} username={user?.username} noLink />
|
||||||
|
|
||||||
<div className="truncate text-left sm:w-32">
|
<div className="truncate text-left sm:w-32">
|
||||||
|
|
|
@ -11,7 +11,6 @@ import Link from 'next/link'
|
||||||
import { useRouter } from 'next/router'
|
import { useRouter } from 'next/router'
|
||||||
import { useFollowedFolds } from '../../hooks/use-fold'
|
import { useFollowedFolds } from '../../hooks/use-fold'
|
||||||
import { useUser } from '../../hooks/use-user'
|
import { useUser } from '../../hooks/use-user'
|
||||||
import { Spacer } from '../layout/spacer'
|
|
||||||
import { ManifoldLogo } from './manifold-logo'
|
import { ManifoldLogo } from './manifold-logo'
|
||||||
import { MenuButton } from './menu'
|
import { MenuButton } from './menu'
|
||||||
import { getNavigationOptions, ProfileSummary } from './profile-menu'
|
import { getNavigationOptions, ProfileSummary } from './profile-menu'
|
||||||
|
@ -78,10 +77,21 @@ export default function Sidebar() {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<nav aria-label="Sidebar" className="sticky top-4 divide-y divide-gray-300">
|
<nav aria-label="Sidebar" className="sticky top-4 divide-y divide-gray-300">
|
||||||
<div className="space-y-1 pb-8">
|
<div className="space-y-1 pb-6">
|
||||||
<ManifoldLogo hideText />
|
<ManifoldLogo hideText />
|
||||||
<Spacer h={4} />
|
</div>
|
||||||
|
|
||||||
|
{user && (
|
||||||
|
<div>
|
||||||
|
<Link href={`/${user.username}`}>
|
||||||
|
<a className="group">
|
||||||
|
<ProfileSummary user={user} />
|
||||||
|
</a>
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
|
<div className="space-y-1 py-6">
|
||||||
{navigation.map((item) => (
|
{navigation.map((item) => (
|
||||||
<SidebarItem item={item} currentPage={currentPage} />
|
<SidebarItem item={item} currentPage={currentPage} />
|
||||||
))}
|
))}
|
||||||
|
@ -92,17 +102,7 @@ export default function Sidebar() {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{user && (
|
<div className="pt-6">
|
||||||
<div>
|
|
||||||
<Link href={`/${user.username}`}>
|
|
||||||
<a>
|
|
||||||
<ProfileSummary user={user} />
|
|
||||||
</a>
|
|
||||||
</Link>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
|
|
||||||
<div className="pt-10">
|
|
||||||
<SidebarItem
|
<SidebarItem
|
||||||
item={{ name: 'Communities', href: '/folds', icon: UserGroupIcon }}
|
item={{ name: 'Communities', href: '/folds', icon: UserGroupIcon }}
|
||||||
currentPage={currentPage}
|
currentPage={currentPage}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user