feat: child menu support in navbar (#695)

* feat: implement child menu support in main navbar

- 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.

* chore: update menu identifiers and add missing translations for development versions

* chore: update hugo stats

* chore: update script name

* chore: update menu item names to include arrows for external links
This commit is contained in:
Xin
2025-06-01 17:33:45 +01:00
committed by GitHub
parent a44de285b2
commit c24d55ee40
8 changed files with 145 additions and 18 deletions

View File

@ -58,7 +58,7 @@ markup:
extensions:
passthrough:
delimiters:
block: [['\[', '\]'], ['$$', '$$']]
block: [['\[', '\]'], ["$$", "$$"]]
inline: [['\(', '\)']]
enable: true
@ -70,9 +70,8 @@ menu:
name: Documentation
pageRef: /docs
weight: 1
- identifier: showcase
name: Showcase
pageRef: /showcase
- identifier: versions
name: Versions
weight: 2
- identifier: blog
name: Blog
@ -82,15 +81,27 @@ menu:
name: About
pageRef: /about
weight: 4
- name: Search
- identifier: showcase
name: Showcase
pageRef: /showcase
weight: 5
- name: Search
weight: 6
params:
type: search
- name: GitHub
weight: 6
weight: 7
url: "https://github.com/imfing/hextra"
params:
icon: github
- 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
sidebar:
- identifier: more
@ -163,7 +174,7 @@ params:
# date | lastmod | publishDate | title | weight
sortBy: date
sortOrder: desc # or "asc"
article:
displayPagination: true