1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-16 06:44:50 +00:00
TiddlyWiki5/core/ui/ViewTemplate/title.tid
Jermolene c7b4febae3 Optimise ordering of filter expressions
We get a significant speed improvement of >10% by rearranging filter
operators to bring to the front the operators likely to reduce the size
working list.
2014-04-06 11:50:16 +01:00

34 lines
1008 B
Plaintext

title: $:/core/ui/ViewTemplate/title
tags: $:/tags/ViewTemplate
\define title-styles()
fill:$(foregroundColor)$;
\end
<div class="tw-tiddler-title">
<div class="titlebar">
<span class="tw-tiddler-controls">
<$list filter="[all[tiddlers+shadows]tag[$:/tags/ViewToolbar]!has[draft.of]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list>
</span>
<$set name="foregroundColor" value={{!!color}}>
<span style=<<title-styles>>>
<$transclude tiddler={{!!icon}}/>
</span>
</$set>
<$list filter="[all[current]removeprefix[$:/]]">
<span class="title" title={{$:/language/SystemTiddler/Tooltip}}>
<span class="tw-system-title-prefix">$:/</span><$text text=<<currentTiddler>>/>
</span>
</$list>
<$list filter="[all[current]!prefix[$:/]]">
<span class="title">
<$view field="title"/>
</span>
</$list>
</div>
<$reveal type="nomatch" text="" default="" state=<<tiddlerInfoState>> class="tw-tiddler-info tw-popup" animate="yes" retain="yes">
<$transclude tiddler="$:/core/ui/TiddlerInfo"/>
</$reveal>
</div>