1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-08-07 14:23:53 +00:00

Menubar: Fix positioning of toprightbar when narrow

Fixes #4477
This commit is contained in:
Jeremy Ruston 2020-03-24 10:35:07 +00:00
parent 4232b402ab
commit 2d9a9703cb
3 changed files with 4 additions and 3 deletions

View File

@ -3,7 +3,7 @@ tags: $:/tags/MenuBar
description: Items from $:/tags/TopRightBar description: Items from $:/tags/TopRightBar
caption: Legacy Top Right Bar caption: Legacy Top Right Bar
custom-menu-content: <$transclude tiddler="$:/plugins/tiddlywiki/menubar/items/toprightbar" mode="inline"/> custom-menu-content: <$transclude tiddler="$:/plugins/tiddlywiki/menubar/items/toprightbar" mode="inline"/>
custom-menu-styles: float: right; custom-menu-styles-wide: float: right;
<$list filter="[all[shadows+tiddlers]tag[$:/tags/TopRightBar]!has[draft.of]reverse[]]" variable="listItem" storyview="pop"> <$list filter="[all[shadows+tiddlers]tag[$:/tags/TopRightBar]!has[draft.of]reverse[]]" variable="listItem" storyview="pop">

View File

@ -6,7 +6,7 @@ tags: $:/tags/PageTemplate
<$list filter="[all[shadows+tiddlers]tag[$:/tags/MenuBar]!has[draft.of]]"> <$list filter="[all[shadows+tiddlers]tag[$:/tags/MenuBar]!has[draft.of]]">
<$list filter="[<currentTiddler>addprefix[$:/config/plugins/menubar/MenuItems/Visibility/]get[text]] ~show +[match[show]]" variable="ignore"> <$list filter="[<currentTiddler>addprefix[$:/config/plugins/menubar/MenuItems/Visibility/]get[text]] ~show +[match[show]]" variable="ignore">
<$list filter="[[$size$]match[wide]] ~[<currentTiddler>get[show-when]match[$size$]] ~[{$:/state/popup/menubar/hamburger}match[yes]]" variable="ignore"> <$list filter="[[$size$]match[wide]] ~[<currentTiddler>get[show-when]match[$size$]] ~[{$:/state/popup/menubar/hamburger}match[yes]]" variable="ignore">
<li style={{!!custom-menu-styles}} class={{{ [<currentTiddler>get[show-when]addprefix[tc-menubar-]] tc-menubar-item +[join[ ]] }}}> <li style={{!!custom-menu-styles-$size$}} class={{{ [<currentTiddler>get[show-when]addprefix[tc-menubar-]] tc-menubar-item +[join[ ]] }}}>
<$list filter="[<currentTiddler>!is-dropdown[yes]]" variable="listItem" emptyMessage=""" <$list filter="[<currentTiddler>!is-dropdown[yes]]" variable="listItem" emptyMessage="""
<!-- Dropdown --> <!-- Dropdown -->
<$set name="dropdown-state" value=<<qualify "$:/state/popup/topmenu/dropdown/">>> <$set name="dropdown-state" value=<<qualify "$:/state/popup/topmenu/dropdown/">>>

View File

@ -21,7 +21,8 @@ Menu items are tagged <<tag $:/tags/MenuBar>>. The following fields are used by
|is-dropdown |Set to `yes` to indicate a dropdown menu item | |is-dropdown |Set to `yes` to indicate a dropdown menu item |
|text |For dropdown menu items, specifies the body of the dropdown | |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-content |Optional wikitext to be displayed in place of the caption |
|custom-menu-styles |Optional string of styles to be applied to menu item | |custom-menu-styles-wide |Optional string of styles to be applied to menu item when the menubar is wide |
|custom-menu-styles-narrow |Optional string of styles to be applied to menu item when the menubar is narrow |
Custom menu items should make sure that the clickable link or button is an immediate child, and not wrapped in another element. Custom menu items should make sure that the clickable link or button is an immediate child, and not wrapped in another element.