Navigation Components
The navigation system consists of three interconnected components:Header.astro, Navigation.astro, and NavItem.astro.
Header.astro
The main site header with sticky positioning, logo, navigation menu, and primary CTA.Structure
The Header component includes:- Sticky positioning with backdrop blur
- Site logo with icon and brand name
- Navigation menu (hidden on mobile)
- “Como ser Socio” CTA button
Navigation Items
The header defines the site’s navigation structure:Usage Example
Standard implementation (from index.astro:15)Styling Details
Container (Header.astro:13-15):- Material Symbol
home_pinicon - “RENACER” wordmark
- Primary color branding
- Uppercase, bold typography
/workspace/source/src/components/Header.astro:1-30
Navigation.astro
Container component that renders the navigation menu from an array of items.Props
Array of navigation items with display text and URL paths.
Features
- Hidden on mobile, visible on medium screens and up (
hidden md:flex) - Horizontal flexbox layout with gap spacing
- Iterates through
listItemsto generate NavItem components
Implementation
Navigation structure (Navigation.astro:10-20):Usage Example
/workspace/source/src/components/Navigation.astro:1-21
NavItem.astro
Individual navigation link component.Props
The display text for the navigation link.
The URL path for the navigation link.
Styling
Link styles (NavItem.astro:5-7):Implementation
/workspace/source/src/components/NavItem.astro:1-9
Navigation Architecture
The three-component system provides:- Header: Top-level container with branding and layout
- Navigation: List container that maps over nav items
- NavItem: Individual link with consistent styling
Data Flow
Responsive Behavior
Desktop (md and up)
- Full navigation menu visible
- Horizontal layout with consistent spacing
- Hover effects on links
Mobile (below md breakpoint)
- Navigation menu hidden (
hidden md:flex) - Only logo and CTA button visible
- Note: Mobile menu implementation not present in current source
Customization Examples
Adding a new navigation item
In Header.astro, update thelistItems array:
Active link styling
To highlight the current page, you could extend NavItem.astro:Best Practices
- Keep navigation concise: Limit to 5-7 top-level items for clarity
- Descriptive labels: Use clear, action-oriented navigation text
- Consistent ordering: Maintain the same navigation order across all pages
- Mobile consideration: Plan for mobile menu implementation (hamburger, drawer, etc.)
- Accessibility: Ensure proper semantic HTML (
<nav>,<ul>,<li>) for screen readers