作者:多米音乐_54101533 | 来源:互联网 | 2023-09-25 17:26
Purpose
This PR makes it easy to add tooltips to menu (navbar) items.
By adding new parameters to
, tooltips can be easily added to any non-dropdown menu items.
Example:
1 2 3 4 5 6 7 8 9
| ini
[[main]]
id = "someID"
name = "someName"
url = "some/URL/" # Link URL.
weight = 10
[main.params]
tooltip = "tooltipName" # Add tooltip to menu item. Not supported for dropdown items.
tooltip_placement = "bottom" # Tooltip placement. Pick bottom, left or right. Defaults to bottom. |
This PR is only supported by Hugo v0.79 or newer.
File changes/additions
Changed files:
wowchemy/layouts/partials/navbar.html
该提问来源于开源项目:wowchemy/wowchemy-hugo-modules
Awesome contribution ! I'll be using this (first I need to make some room in my menu). the Hugo version needs to be bumped right?
Not for this PR as the scope changed from the proposal in the first comment (which would have required Hugo 0.79) to the proposal in the second comment https://github.com/wowchemy/wowchemy-hugo-modules/pull/2010#issuecomment-748322912