mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
Refactor the page controls to be more reusable
Moving them into their own tiddler makes it easier to transclude them elsewhere
This commit is contained in:
parent
30a757ec49
commit
485ffae366
13
core/ui/PageControls.tid
Normal file
13
core/ui/PageControls.tid
Normal file
@ -0,0 +1,13 @@
|
||||
title: $:/core/ui/PageTemplate/pagecontrols
|
||||
|
||||
\define config-title()
|
||||
$:/config/PageControlButtons/Visibility/$(listItem)$
|
||||
\end
|
||||
<div class="tc-page-controls">
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]]" variable="listItem">
|
||||
<$reveal type="nomatch" state=<<config-title>> text="hide">
|
||||
<$transclude tiddler=<<listItem>> mode="inline"/>
|
||||
</$reveal>
|
||||
</$list>
|
||||
</div>
|
||||
|
@ -1,9 +1,6 @@
|
||||
title: $:/core/ui/PageTemplate/sidebar
|
||||
tags: $:/tags/PageTemplate
|
||||
|
||||
\define config-title()
|
||||
$:/config/PageControlButtons/Visibility/$(listItem)$
|
||||
\end
|
||||
<$scrollable fallthrough="no" class="tc-sidebar-scrollable">
|
||||
|
||||
<div class="tc-sidebar-header">
|
||||
@ -22,13 +19,7 @@ $:/config/PageControlButtons/Visibility/$(listItem)$
|
||||
|
||||
</div>
|
||||
|
||||
<div class="tc-page-controls">
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]]" variable="listItem">
|
||||
<$reveal type="nomatch" state=<<config-title>> text="hide">
|
||||
<$transclude tiddler=<<listItem>> mode="inline"/>
|
||||
</$reveal>
|
||||
</$list>
|
||||
</div>
|
||||
{{$:/core/ui/PageTemplate/pagecontrols}}
|
||||
|
||||
<$transclude tiddler="$:/core/ui/SideBarLists" mode="inline"/>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user