test version for review

This commit is contained in:
awe
2025-09-23 15:24:40 +03:00
parent b61e3f93d4
commit 4323dd6916
10 changed files with 189 additions and 16 deletions

View File

@ -0,0 +1,44 @@
import Link from 'next/link'
import { usePathname } from 'next/navigation'
const menuItems = [
{ href: '/', label: 'Главная' },
{ href: '/publications', label: 'Новости и публикации' },
{ href: '/rid', label: 'РИД' },
{ href: '/staff', label: 'Сотрудники' },
{ href: '/projects', label: 'Проекты' },
{ href: '/students', label: 'Студентам' },
{ href: '/contacts', label: 'Контакты' },
]
export default function Sidebar() {
const pathname = usePathname()
return (
<aside className="w-64 bg-white shadow-sm border-r min-h-screen">
<div className="p-6">
<Link href="/" className="text-xl font-bold text-gray-900 block mb-8">
Отдел Радиофотоники
</Link>
<nav className="space-y-2">
{menuItems.map((item) => {
const isActive = pathname === item.href
return (
<Link
key={item.href}
href={item.href}
className={`block px-4 py-3 rounded-lg text-sm font-medium transition-colors ${
isActive
? 'bg-blue-50 text-blue-700 border-l-4 border-blue-700'
: 'text-gray-700 hover:bg-gray-50 hover:text-blue-600'
}`}
>
{item.label}
</Link>
)
})}
</nav>
</div>
</aside>
)
}