mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-08-08 23:03:50 +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
|
title: $:/core/ui/PageTemplate/sidebar
|
||||||
tags: $:/tags/PageTemplate
|
tags: $:/tags/PageTemplate
|
||||||
|
|
||||||
\define config-title()
|
|
||||||
$:/config/PageControlButtons/Visibility/$(listItem)$
|
|
||||||
\end
|
|
||||||
<$scrollable fallthrough="no" class="tc-sidebar-scrollable">
|
<$scrollable fallthrough="no" class="tc-sidebar-scrollable">
|
||||||
|
|
||||||
<div class="tc-sidebar-header">
|
<div class="tc-sidebar-header">
|
||||||
@ -22,13 +19,7 @@ $:/config/PageControlButtons/Visibility/$(listItem)$
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tc-page-controls">
|
{{$:/core/ui/PageTemplate/pagecontrols}}
|
||||||
<$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>
|
|
||||||
|
|
||||||
<$transclude tiddler="$:/core/ui/SideBarLists" mode="inline"/>
|
<$transclude tiddler="$:/core/ui/SideBarLists" mode="inline"/>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user