Skip to content

Conversation

@imfing
Copy link
Owner

@imfing imfing commented May 31, 2025

  • feat: implement child menu support in main navbar
  • chore: update menu identifiers and add missing translations for development versions
image

In hugo.yaml define:

menu:
  main:
    - identifier: versions
      name: Versions
      weight: 2

    - identifier: development
      name: Development
      url: https://imfing.github.io/hextra/versions/latest/
      parent: versions
    - identifier: v0.9
      name: v0.9
      url: https://imfing.github.io/hextra/versions/v0.9/
      parent: versions

Replaces PR: #221

closes #224
closes #516

imfing added 2 commits May 31, 2025 22:41
- Added a new JavaScript file for handling dropdown functionality in the navbar.
- Implemented event listeners for toggling dropdowns, closing them on outside clicks, and dismissing with the Escape key.
- Updated navbar HTML to support dropdown items with children, enhancing the navigation experience.
- Adjusted core script imports to include the new dropdown functionality.
@netlify
Copy link

netlify bot commented May 31, 2025

Deploy Preview for hugo-hextra ready!

Name Link
🔨 Latest commit 3419f45
🔍 Latest deploy log https://app.netlify.com/projects/hugo-hextra/deploys/683c7ba7713bb90008e500ca
😎 Deploy Preview https://deploy-preview-695--hugo-hextra.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@imfing imfing linked an issue May 31, 2025 that may be closed by this pull request
@imfing imfing requested a review from Copilot May 31, 2025 21:59
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 implements child menu support in the main navbar and updates related configurations. Key changes include adding a new navbar dropdown script, refactoring the navbar template to support dropdowns for items with children, and updating menu configuration and translations.

Reviewed Changes

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

Show a summary per file
File Description
layouts/partials/scripts/core.html Enqueued the new navbar-dropdown.js script for handling dropdown logic.
layouts/partials/navbar.html Added markup for dropdown menus on nav items with children.
exampleSite/i18n/zh-cn.yaml, ja.yaml, fa.yaml Added translations for the new menu identifiers.
exampleSite/hugo_stats.json Updated stats to include new CSS class references.
exampleSite/hugo.yaml Updated menu configuration to include versions and child items.
assets/js/navbar-dropdown.js Introduced a new JS module to manage dropdown behavior in the navbar.

@imfing imfing merged commit c24d55e into main Jun 1, 2025
4 checks passed
@imfing imfing deleted the nav-nested-menu branch June 1, 2025 16:33
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.

feature request: multi-level menu Versioning Menu

2 participants