You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
928 B
39 lines
928 B
import Link from 'next/link';
|
|
|
|
import { BlogTitle } from '@/components/blog-title';
|
|
import { cn } from '@/lib/utils';
|
|
import { allPages } from '../.contentlayer/generated';
|
|
|
|
type NavigationBarProps = {
|
|
className?: string;
|
|
};
|
|
|
|
export function NavigationBar({ className }: NavigationBarProps) {
|
|
return (
|
|
<nav
|
|
className={cn(
|
|
'flex h-8 flex-row items-center space-x-2 max-xs:text-sm sm:space-x-4',
|
|
className,
|
|
)}
|
|
>
|
|
<Link href="/">
|
|
<BlogTitle />
|
|
</Link>
|
|
<Link
|
|
href="/posts"
|
|
className="font-semibold hover:text-accent dark:hover:text-accent-dark"
|
|
>
|
|
Все статьи
|
|
</Link>
|
|
{allPages.map((page) => (
|
|
<Link
|
|
href={page.url}
|
|
key={page._id}
|
|
className="font-semibold hover:text-accent dark:hover:text-accent-dark"
|
|
>
|
|
{page.title}
|
|
</Link>
|
|
))}
|
|
</nav>
|
|
);
|
|
}
|
|
|