Menubar plugin: Add optional dropdown-position

Fixes #5533
publishing-framework
jeremy@jermolene.com 2021-03-08 17:47:04 +00:00
rodzic 5e4430dbf9
commit 81546c5bf4
2 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -55,7 +55,7 @@ tags: $:/tags/PageTemplate
<$list filter="[<currentTiddler>addprefix[$:/config/plugins/menubar/MenuItems/Visibility/]get[text]] ~show +[match[show]]" variable="ignore">
<$set name="dropdown-state" value=<<qualify "$:/state/popup/topmenu/dropdown/">>>
<$set name="dropdown-state" value={{{ [<dropdown-state>addsuffix<currentTiddler>] }}}>
<$reveal type="popup" state=<<dropdown-state>> class={{{ [<currentTiddler>get[dropdown]get[class]] }}} tag="div">
<$reveal type="popup" state=<<dropdown-state>> position={{{ [<currentTiddler>get[dropdown-position]else[below]] }}} class={{{ [<currentTiddler>get[dropdown]get[class]] }}} tag="div">
<div class="tc-drop-down">
<$transclude/>
</div>

Wyświetl plik

@ -19,6 +19,7 @@ Menu items are tagged <<tag $:/tags/MenuBar>>. The following fields are used by
|caption |The text that is displayed for the menu item. Avoid links, using `~` to suppress CamelCase links if required |
|target |For simple link menu items specifies a tiddler title as the target of the link |
|is-dropdown |Set to `yes` to indicate a dropdown menu item |
|dropdown-position |Optional position for the dropdown (can be ''left'', ''above'', ''aboveleft'', ''aboveright'', ''right'', ''belowleft'', ''belowright'' or ''below'') |
|text |For dropdown menu items, specifies the body of the dropdown |
|custom-menu-content |Optional wikitext to be displayed in place of the caption |
|custom-menu-styles-wide |Optional string of styles to be applied to menu item when the menubar is wide |