@@ -3,11 +3,11 @@ import Link from 'next/link';
33import { usePathname } from 'next/navigation' ;
44import { Map , ChevronsLeft , ChevronsRight , HeartPlus } from 'lucide-react' ;
55import { useContextAPI } from '../../../_lib/context/contextAPI' ;
6-
6+ import '../../../_lib/styles/sidebar.css'
77export default function Sidebar ( ) {
88 const pathname = usePathname ( ) ;
99 const { isCollapsed, toggleSidebar, token } = useContextAPI ( ) ;
10-
10+ console . log ( "sidebar token=>" , token )
1111 const navItems = [
1212 { label : 'Map' , href : '/' , icon : < Map size = { 20 } /> } ,
1313 ...( token ? [ { label : 'Favorites' , href : '/favorites' , icon : < HeartPlus size = { 20 } /> } ] : [ ] ) ,
@@ -16,11 +16,11 @@ export default function Sidebar() {
1616 return (
1717 < aside className = { `
1818 h-screen bg-white border-r border-gray-200 py-3 px-2 flex flex-col gap-y-6
19- transition-all duration-300 ease-in-out shadow-sm shadow-gray-200
20- ${ isCollapsed ? 'w-[60px]' : 'w-[200px]' }
19+ transition-all duration-300 ease-in-out shadow-sm shadow-gray-200
20+ ${ isCollapsed ? 'w-[60px]' : ' w-[60px] md: w-[200px]' }
2121 ` } >
22- < div className = { `flex ${ isCollapsed ? 'flex-col' : '' } justify-between items-center` } >
23- < span className = { `text-base font-medium ${ isCollapsed && 'mt-2' } ` } > Chemnitz Culture </ span >
22+ < div className = { `flex ${ isCollapsed ? 'flex-col' : ' flex-col md:flex-row ' } justify-between items-center` } >
23+ < span className = { `text-2xl font-bold ml-2 ${ isCollapsed && 'mt-2' } ` } > KultLink </ span >
2424 < button
2525 onClick = { toggleSidebar }
2626 className = "p-1 rounded-md hover:bg-gray-100 transition-colors hover:cursor-pointer"
@@ -45,17 +45,7 @@ export default function Sidebar() {
4545 { icon }
4646 </ span >
4747 { ! isCollapsed && (
48- < span className = "hover:cursor-pointer" > { label } </ span >
49- ) }
50- { isCollapsed && (
51- < span className = "
52- absolute left-full ml-4 px-2 py-1 rounded-md
53- bg-gray-800 text-white text-sm
54- invisible opacity-0 group-hover:visible group-hover:opacity-100
55- transition-opacity duration-200
56- " >
57- { label }
58- </ span >
48+ < span className = " menu md:block text-sm hover:cursor-pointer transition-opacity duration-200" > { label } </ span >
5949 ) }
6050 </ Link >
6151 ) ) }
@@ -64,7 +54,7 @@ export default function Sidebar() {
6454 { isCollapsed && (
6555 < div className = "mt-auto text-center" >
6656 < span className = "text-xs text-gray-500 rotate-90 inline-block origin-center whitespace-nowrap" >
67- Chemnitz
57+ KultLink
6858 </ span >
6959 </ div >
7060 ) }
0 commit comments