1
0
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:
Jermolene 2014-10-24 11:17:58 +01:00
parent 30a757ec49
commit 485ffae366
2 changed files with 14 additions and 10 deletions

13
core/ui/PageControls.tid Normal file
View 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>

View File

@ -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"/>