Overview
The CV builder uses several navigation components to provide routing and layout structure:- Navbar - Top navigation bar with main application sections
- Sidebar - Side navigation for profile sections with photo upload
- SidebarDisenios - Specialized sidebar for CV design templates
- Footer - Footer component (basic structure)
Navbar Component
Location:src/components/Navbar.jsx
The Navbar provides top-level navigation between main application sections with active state highlighting.
Dependencies
src/components/Navbar.jsx:2-6
Font Configuration
src/components/Navbar.jsx:8-11
Route Detection
The component usesusePathname() to detect the current route and highlight active sections:
src/components/Navbar.jsx:20-31
Navigation Structure
src/components/Navbar.jsx:41-90
Navigation Items
| Item | Route | Active Condition |
|---|---|---|
| Logo | / | - |
| Inicio | / | Exact match / |
| Perfil | /perfil/info-personal | Starts with /perfil/ AND in perfilPaths |
| Diseños | /disenios/cv1 | Starts with /disenios/ AND in diseniosPaths |
| Importante | /importante | Exact match /importante |
Active State Styling
Active navigation items receive theSeleccionadoNavbar CSS class:
Responsive Layout
The navbar adapts between mobile and desktop:- Mobile: Vertical layout, centered logo, full-width navigation
- Desktop: Horizontal layout, left-aligned logo, compact navigation
src/components/Navbar.jsx:40
Sidebar Component
Location:src/components/Sidebar.jsx
The Sidebar provides navigation for profile sections and includes the photo upload component.
Dependencies
src/components/Sidebar.jsx:2-10
State Management
isOpen- Mobile dropdown visibilitytitulo- Current section title for mobilepathName- Active route detection
src/components/Sidebar.jsx:13-20
Desktop Layout
src/components/Sidebar.jsx:25-93
Profile Navigation Links
src/components/Sidebar.jsx:28-79
Sidebar Sections
| Section | Route |
|---|---|
| Información Personal | /perfil/info-personal |
| Información Académica | /perfil/info-academica |
| Experiencia Laboral | /perfil/experiencia-laboral |
| Competencias | /perfil/competencias |
| Referencias Profesionales | /perfil/ref-profesionales |
| Referencias Personales | /perfil/ref-personales |
Data Management Section
Bottom section provides data operations:src/components/Sidebar.jsx:81-92
Mobile Dropdown
Mobile version uses a dropdown toggle:src/components/Sidebar.jsx:94-211
Mobile Link Pattern
Mobile links update the title and close dropdown:src/components/Sidebar.jsx:110-122
SidebarDisenios Component
Location:src/components/disenios/SidebarDisenios.jsx
Specialized sidebar for CV design template selection.
Dependencies
src/components/disenios/SidebarDisenios.jsx:2-7
State
src/components/disenios/SidebarDisenios.jsx:10-13
Desktop Layout
src/components/disenios/SidebarDisenios.jsx:17-23
Mobile Dropdown
src/components/disenios/SidebarDisenios.jsx:25-50
Design Templates
The sidebar displays links to three CV design templates:- CV1
- CV2
- CV3
LinkDisenios component with a dato prop.
Footer Component
Location:src/components/Footer.jsx
Basic footer structure (minimal implementation):
src/components/Footer.jsx:1-12
Styling Conventions
Active State Classes
SeleccionadoNavbar- Active navbar itemSeleccionadoSidebar- Active sidebar item
Layout Classes
Barra- Container class for navigation barsButton- Standard button stylingTitulo- Title/heading styling
Responsive Patterns
hidden md:flex- Desktop onlyblock md:hidden- Mobile onlyflex-col md:flex-row- Vertical mobile, horizontal desktop
Integration Example
Layout with Navigation
Best Practices
- Use
usePathname()for active route detection - Implement separate mobile/desktop layouts with Tailwind breakpoints
- Apply consistent active state styling
- Group related navigation items logically
- Provide visual feedback for current location
- Use dropdown menus for mobile navigation
- Include icons for better mobile UX
- Keep navigation structure flat and simple
- Maintain consistent spacing and alignment
- Use semantic HTML for accessibility
