Navigation Component
The portfolio template features a fixed vertical navigation bar with icon-based links that automatically highlight as users scroll through different sections. This navigation uses Bootstrap’s ScrollSpy feature for automatic active state management.Structure
The navigation is implemented as a fixed sidebar element that appears on the left side of the screen on desktop devices.Navigation HTML (lines 103-139)
ScrollSpy Integration
ScrollSpy is activated on the<body> element to automatically update navigation links based on scroll position:
Body Tag Configuration (line 53)
ScrollSpy Attributes
ScrollSpy Attributes
- data-bs-spy=“scroll” - Enables Bootstrap ScrollSpy functionality
- data-bs-target=“#navigation-bar” - Specifies which navigation element to update
- tabindex=“0” - Makes the body focusable for ScrollSpy to work correctly
Styling
The navigation styling creates a vertical pill-style menu with hover and active states:Navigation Styles (style.css 104-149)
Key Features
Auto-highlighting
Links automatically gain the
.active class as users scroll to corresponding sectionsSmooth Scrolling
Clicking navigation icons triggers smooth scroll to the target section
Icon-based Design
Uses Tabler Icons for a clean, minimal aesthetic with tooltips on hover
Scale Animation
Icons scale to 1.25x on hover and when active for visual feedback
Navigation Icons
Each section has a corresponding Tabler Icon:| Section | Icon Class | Visual |
|---|---|---|
| Home | ti-home | House icon |
| About | ti-user | Person silhouette |
| Resume | ti-school | Graduation cap |
| Portfolio | ti-briefcase | Briefcase |
| Contact | ti-phone | Phone |
Responsive Behavior
The navigation has different visibility rules based on screen size:Responsive Breakpoints (style.css 437-458)
On screens smaller than 1200px (tablets and mobile), the vertical navigation is hidden and users navigate via the offcanvas menu instead.
Accessibility Features
The navigation includes several accessibility enhancements:ARIA Labels
ARIA Labels
Each link has
aria-label attributes for screen readers describing the section it navigates to.Bootstrap Tooltips
Bootstrap Tooltips
Tooltips are initialized on all navigation links with
data-bs-toggle="tooltip" providing hover text for visual users.Active State
Active State
The
aria-current="page" attribute marks the currently active section for assistive technologies.Keyboard Navigation
Keyboard Navigation
Customizing Navigation
Adding a New Section
To add a new navigation item:Changing Icon Colors
Modify the navigation colors by updating CSS variables:Custom Navigation Colors
Adjusting Position
Change the navigation placement:Navigation Position
Tooltip Initialization
Tooltips require JavaScript initialization, which is handled in the inline script:Tooltip Initialization (index.html 547-552)