mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-08-28 12:02:40 +00:00
![Jermolene](/assets/img/avatar_default.png)
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.
34 lines
1008 B
Plaintext
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> |