mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-02-23 06:20:01 +00:00
48 lines
1.3 KiB
Plaintext
48 lines
1.3 KiB
Plaintext
title: $:/plugins/tiddlywiki/text-slicer/templates/display-document
|
|
|
|
\define config-show-toolbar()
|
|
$:/plugins/tiddlywiki/text-slicer/config/show-toolbar/$(currentTiddler)$
|
|
\end
|
|
|
|
\define config-view-type()
|
|
$:/plugins/tiddlywiki/text-slicer/config/view-type/$(currentTiddler)$
|
|
\end
|
|
|
|
\define display-document()
|
|
<<display-heading-tiddler level:'h1'>>
|
|
\end
|
|
|
|
\define display-tiddler()
|
|
<$set name="tv-show-toolbar" value={{$(config-show-toolbar)$}}>
|
|
|
|
View: <$select tiddler=<<config-view-type>> default="display-document">
|
|
<option value="display-document">Document</option>
|
|
<option value="toc-selective-expandable">Outline</option>
|
|
<option value="toc-tabbed-internal-nav">Tabbed outline</option>
|
|
</$select>
|
|
|
|
<$checkbox tiddler=<<config-show-toolbar>> field="text" checked="yes" unchecked="no" default="no"> Show toolbar</$checkbox>
|
|
|
|
<div class='tc-table-of-contents'>
|
|
|
|
<$set name="tv-show-toolbar" value={{$(config-show-toolbar)$}}>
|
|
|
|
<$list filter="[field:title[$(config-view-type)$]]" variable="listItem" emptyMessage="""
|
|
|
|
<$macrocall $name="display-document" tag=<<currentTiddler>> template="$:/plugins/tiddlywiki/text-slicer/templates/toc-entry"/>
|
|
|
|
""">
|
|
|
|
<$macrocall $name={{$(config-view-type)$}} tag=<<currentTiddler>> template="$:/plugins/tiddlywiki/text-slicer/templates/toc-entry"/>
|
|
|
|
</$list>
|
|
|
|
</$set>
|
|
|
|
</div>
|
|
|
|
</$set>
|
|
\end
|
|
|
|
<<display-tiddler>>
|