Skip to main content

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)
  • 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 sections

Smooth 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
Each section has a corresponding Tabler Icon:
You can change icons by replacing the icon class names. Browse Tabler Icons for alternatives.

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:
Each link has aria-label attributes for screen readers describing the section it navigates to.
Tooltips are initialized on all navigation links with data-bs-toggle="tooltip" providing hover text for visual users.
The aria-current="page" attribute marks the currently active section for assistive technologies.
All links are keyboard-accessible and can be activated with Enter/Space keys.

Customizing Navigation

Adding a New Section

To add a new navigation item:
1

Add the section to your HTML

Create a new section with an id attribute:
2

Add navigation link

Insert a new list item in the navigation:
3

Test ScrollSpy

Scroll through your page to ensure the new item highlights correctly when its section is visible.

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)
Do not remove this script or tooltips will not appear when hovering over navigation icons.

Mobile Alternative

On mobile devices (< 1200px width), the vertical navigation is replaced by the hamburger menu that opens the offcanvas sidebar. See the Hero Section documentation for details on the mobile menu implementation.