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.
		
		
		
		
		
			
		
			
				
					
					
						
							42 lines
						
					
					
						
							931 B
						
					
					
				
			
		
		
	
	
							42 lines
						
					
					
						
							931 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>
 | |
|   );
 | |
| }
 | |
| 
 |