Skip to content

Conversation

@AlphaGameDeveloper
Copy link
Member

🎯 Overview

This PR introduces a completely enhanced navigation system with dropdown menus, hover functionality, and a beautiful mobile submenu experience that feels like a native app!

✨ Features Added

🖱️ Desktop Dropdown Functionality

  • Hover-triggered dropdowns - Smooth hover animations on desktop
  • Clickable main links - Parent dropdown items remain navigable
  • Backdrop blur effects - Modern glassmorphism styling
  • Smooth transitions - Beautiful fade-in/slide-down animations
  • Auto-close behavior - Smart dropdown management

📱 Mobile Submenu Navigation

  • Hierarchical navigation - Tap dropdown items to enter full-screen submenus
  • Native app feel - Smooth slide transitions and proper back button
  • Large tap targets - Mobile-optimized button sizes
  • Prominent main links - Clear hierarchy with main page links highlighted
  • Auto-close on selection - Intelligent menu management

🛠️ Data-Driven Configuration

  • Flexible YAML structure - Easy dropdown configuration in _data/header.yaml
  • Support for dividers - Visual separation in dropdown menus
  • Backward compatibility - Falls back to original static menu if no items defined

📁 Files Modified

Core Navigation Files

  • _includes/navbar-item.html - Enhanced to support dropdown arrays
  • _includes/header.html - Updated to use data-driven structure with fallback
  • _data/header.yaml - Added example dropdown configuration

Styling & Scripts

  • _sass/_navigation.scss - Enhanced dropdown styling and mobile submenu styles
  • assets/js/dropdown-hover.js - New hover functionality and mobile submenu navigation
  • _layouts/default.html - Added new script inclusion

🎨 Example Configuration

navbar:
  items:
    - title: "Programs"
      href: "/programs/"
      dropdown:
        - title: "Confirmation"
          href: "/confirmation/"
        - title: "Ministries"
          href: "/ministries/"
        - divider: true
        - title: "Resources"
          href: "/resources/"

💡 How It Works

Desktop Experience

  1. Hover over dropdown → Shows menu instantly
  2. Click dropdown toggle → Navigate to main page
  3. Click dropdown items → Navigate to specific pages

Mobile Experience

  1. Tap dropdown toggle → Enter full-screen submenu
  2. Tap back button → Return to main menu
  3. Tap main link in submenu → Navigate to parent page
  4. Tap submenu items → Navigate and close menu

🔧 Technical Implementation

  • Responsive design - Different behaviors for desktop vs mobile
  • Event delegation - Efficient click handling
  • CSS transitions - Smooth animations without JavaScript
  • Accessibility friendly - Proper ARIA attributes and focus management
  • Bootstrap compatible - Works seamlessly with existing Bootstrap navbar

✅ Browser Support

  • Modern browsers with CSS backdrop-filter support
  • Graceful degradation for older browsers
  • Touch-friendly mobile interactions
  • Keyboard navigation support

🎉 Result

The navigation now provides a premium user experience with:

  • Professional desktop dropdowns with hover functionality
  • Mobile-first submenu navigation that feels like a native app
  • Flexible, data-driven configuration for easy maintenance
  • Beautiful animations and transitions throughout

Perfect for the St. Anthony Youth website! wags tail

Copilot AI review requested due to automatic review settings August 13, 2025 20:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces an enhanced navigation system with dropdown menus for desktop and full-screen mobile navigation, along with support pages for youth programs. The implementation includes hover-triggered dropdowns on desktop, native app-style mobile navigation, and data-driven configuration through YAML.

  • Enhanced mobile navigation with full-screen overlay and smooth animations
  • Added comprehensive JavaScript handling for mobile menu toggling and interaction
  • Created new program pages for Youth Group and Confirmation with detailed content

Reviewed Changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
pages/youthgroup.md New Youth Group program page with meeting details and description
pages/confirmation.md New Confirmation program page with faith-focused content and class information
assets/js/main.js Added extensive mobile navigation handling with menu toggling and event management
assets/js/healthcheck.js Enhanced health status checking with response time logging and cache headers
_sass/_navigation.scss Comprehensive mobile navigation styling with full-screen overlay and animations
_layouts/post.html Added conditional author bio section and post tags display
_includes/header.html Removed Bootstrap data attributes for custom navigation handling
_data/experiments.yaml New configuration file for experimental site features

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

navbarToggler.setAttribute('aria-expanded', 'false');

// Toggle mobile menu
navbarToggler.addEventListener('click', function(e) {
Copy link

Copilot AI Aug 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable responseMilliseconds is declared without let, const, or var on line 37 in healthcheck.js, making it an implicit global variable. This creates a potential conflict since main.js is loaded after healthcheck.js and both files may interact with global scope.

Copilot uses AI. Check for mistakes.
throw new Error(`HTTP error! status: ${response.status}`);
}

responseMilliseconds = Date.now() - startTime;
Copy link

Copilot AI Aug 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable responseMilliseconds is declared without let, const, or var, making it an implicit global variable. This should be declared with let or const to avoid polluting the global scope.

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@AlphaGameDeveloper AlphaGameDeveloper merged commit a7d484a into master Aug 13, 2025
1 check failed
@AlphaGameDeveloper AlphaGameDeveloper deleted the feature/better-navigation-bar branch August 13, 2025 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants