Hi Jan, first of all I have to pass kudos to Jeremy who made the plugin. 
But I take kudos for an idea extending it 8-)

to 3):

first clone your $:/core/ui/ViewTemplate/title and 
$:/core/ui/EditTemplate/controls tiddlers and call the clones 
$:/core/ui/ViewTemplate/header-title and 
$:/core/ui/EditTemplate/header-controls

replace your $:/core/ui/ViewTemplate/title with this:

\define title-styles()
fill:$(foregroundColor)$;
\end
\define config-title()
$:/config/ViewToolbarButtons/Visibility/$(listItem)$
\end
\define title-state()
$:/state/templates/title/visibility/$(currentTiddler)$
\end
<$set name="titleState" value=<<title-state>>>
<div class="tc-tiddler-title tc-dynaview-set-tiddler-when-visible" data-
dynaview-set-tiddler=<<titleState>> data-dynaview-set-value="true" data-
dynaview-unset-tiddler=<<titleState>> data-dynaview-unset-value="false" data
-dynaview-has-triggered={{{ [<titleState>get[text]] }}}>
<div class="tc-titlebar">
<span class="tc-tiddler-controls">
<$list filter=
"[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]]" variable=
"listItem"><$reveal type="nomatch" state=<<config-title>> text="hide"><$set 
name="tv-config-toolbar-class" filter="[<tv-config-toolbar-class>] 
[<listItem>encodeuricomponent[]addprefix[tc-btn-]]"><$transclude tiddler=<<
listItem>>/></$set></$reveal></$list>
</span>
<$set name="tv-wikilinks" value={{$:/config/Tiddlers/TitleLinks}}>
<$link>
<$set name="foregroundColor" value={{!!color}}>
<span class="tc-tiddler-title-icon" style=<<title-styles>>>
<$transclude tiddler={{!!icon}}/>
</span>
</$set>
<$list filter="[all[current]removeprefix[$:/]]">
<h2 class="tc-title" title={{$:/language/SystemTiddler/Tooltip}}>
<span class="tc-system-title-prefix">$:/</span><$text text=<<currentTiddler
>>/>
</h2>
</$list>
<$list filter="[all[current]!prefix[$:/]]">
<h2 class="tc-title">
<$view field="title"/>
</h2>
</$list>
</$link>
</$set>
</div>

<$reveal type="nomatch" text="" default="" state=<<tiddlerInfoState>> 
class="tc-tiddler-info tc-popup-handle" animate="yes" retain="yes">

<$list 
filter="[all[shadows+tiddlers]tag[$:/tags/TiddlerInfoSegment]!has[draft.of]] 
[[$:/core/ui/TiddlerInfo]]" variable="listItem"><$transclude 
tiddler=<<listItem>> mode="block"/></$list>

</$reveal>
</div>
</$set>

replace $:/core/ui/EditTemplate/controls with this:

\define config-title()
$:/config/EditToolbarButtons/Visibility/$(listItem)$
\end
\define title-state()
$:/state/templates/title/visibility/$(currentTiddler)$
\end
<$set name="titleState" value=<<title-state>>>
<div class="tc-tiddler-title tc-tiddler-edit-title 
tc-dynaview-set-tiddler-when-visible" data-dynaview-set-tiddler=<<titleState
>> data-dynaview-set-value="true" data-dynaview-unset-tiddler=<<titleState>> 
data-dynaview-unset-value="false" data-dynaview-has-triggered={{{ [<
titleState>get[text]] }}}>
<$view field="title"/>
<span class="tc-tiddler-controls tc-titlebar"><$list filter=
"[all[shadows+tiddlers]tag[$:/tags/EditToolbar]!has[draft.of]]" variable=
"listItem"><$reveal type="nomatch" state=<<config-title>> 
text="hide"><$transclude 
tiddler=<<listItem>>/></$reveal></$list></span>
<div style="clear: both;"></div>
</div>
</$set>

Then create a tiddler tagged $:/tags/PageTemplate and put this inside:

<div style="position: fixed; width: 100%; height: 42px; background-color: 
#333333; 
color: white; top: 0; left: 0;">
<$set name="storyList" filter="[list[$:/StoryList]]">
<$list 
filter="[enlist<storyList>addprefix[$:/state/templates/title/visibility/]contains:text[true]nth[1]removeprefix[$:/state/templates/title/visibility/]]"
 
variable="topmostVisible">
<$list 
filter="[enlist<storyList>allbefore<topmostVisible>last[]!has[draft.of]]" 
template="$:/core/ui/ViewTemplate/header-title"/>
<$list filter="[enlist<storyList>allbefore<topmostVisible>last[]has[draft.of]]" 
template="$:/core/ui/EditTemplate/header-controls"/>
</$list>
</$set>
</div>

Now, if a tiddler scrolls out on top its controls should show up within the 
header

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/f5e1441e-b973-44f0-86f6-a9bf00251001%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to