Overview
The Navbar component provides a fixed, translucent navigation bar at the top of your pages. It features a backdrop blur effect, the Velaria horizontal logo, and navigation links with hover effects. The navbar remains fixed at the top during scrolling for consistent navigation access.Component code
Props
This component does not accept any props. Navigation links are hardcoded within the component.Usage example
The Navbar component is typically included in your base layout file so it appears on all pages consistently.
Styling details
Fixed positioning and backdrop
Fixed positioning and backdrop
The navbar is fixed to the top of the viewport with:
position: fixedwithtop: 0andleft: 0- Full width spanning the entire viewport
z-index: 1000to ensure it stays above other contentbackdrop-filter: blur(8px)creates a frosted glass effect- Semi-transparent black background (
rgba(0, 0, 0, 0.43)) for visibility while maintaining translucency
Layout structure
Layout structure
- Container with max-width of 1200px, centered with auto margins
- Flexbox layout with space-between justification
- Logo on the left, navigation links on the right
- All items vertically centered
Navigation links
Navigation links
Logo styling
Logo styling
- Image dimensions: 150px width, 100px height
- Wrapped in anchor tag linking to homepage
- Eager loading for immediate visibility
Navigation structure
The navbar currently includes two main navigation links:- INICIO (
/) - Homepage link - NOSOTROS (
/nosotros) - About page link
There’s a commented-out contact link in the source code that you can uncomment if needed:
Dependencies
- astro:assets: Used for the
Imagecomponent to optimize the logo image - Vercel Blob Storage: Hosts the Velaria horizontal logo image
