mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-25 17:40:29 +00:00
f77b3a54ca
We'll probably rename the navigationcatcher macro, because the name is rubbish.
101 lines
2.8 KiB
Plaintext
101 lines
2.8 KiB
Plaintext
title: $:/templates/PageTemplate
|
|
|
|
<!-- The navigator catches navigation events and updates the story and history tiddlers -->
|
|
<<navigationcatcher ><
|
|
|
|
<!-- Zooming chooser -->
|
|
{{navigation-panel{
|
|
<<chooser><
|
|
((( [!is[shadow]sort[title]] )) <div><<view title link>></div> )
|
|
>>
|
|
}}}
|
|
|
|
<!-- Zooming navigator -->
|
|
<<zoomigator>>
|
|
|
|
<!-- The top navigation bar -->
|
|
<div class="navbar navbar-fixed-top">
|
|
<div class="navbar-inner">
|
|
<div class="container">
|
|
{{nav{
|
|
|
|
<!-- Navigation menu -->
|
|
* HelloThere
|
|
* [[Docs]]
|
|
*{{divider-vertical}}
|
|
|
|
<!-- Search box -->
|
|
<form class="form-search">
|
|
|
|
{{search-query{
|
|
<<edit tiddler:[[$:/search/text]] type:search requireFocus:yes>>
|
|
}}}
|
|
|
|
<div style="position:absolute; z-index:1000;">
|
|
|
|
<<reveal state:[[$:/search/text]] type:nomatch text:""><
|
|
|
|
<div class="open">
|
|
|
|
{{dropdown-menu{
|
|
* <<list filter:"[!is[shadow]searchVia[$:/search/text]sort[title]limit[50]]" template:"$:/templates/SearchResultTemplate" emptyMessage:"//No results//">>
|
|
}}}
|
|
|
|
</div>
|
|
|
|
>>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
<!-- New tiddler button -->
|
|
<<button NewTiddler class:"btn btn-success"><New>>
|
|
|
|
<!-- Full screen button -->
|
|
<<button full-screen class:"btn btn-warning"><Full screen>>
|
|
|
|
<!-- View button -->
|
|
<<button popup:ViewDropDownState class:"btn btn-danger"><View <span class="caret"></span>>>
|
|
|
|
<!-- View dropdown -->
|
|
{{pull-right{
|
|
<<reveal state:[[$:/EditMode]] type:nomatch text:yes><
|
|
<<button modal param:[[$:/messages/EnterEditMode]] set:[[$:/EditMode]] setTo:yes class:"btn btn-success"><Edit>>
|
|
>>
|
|
|
|
<!-- Save changes is only visible in edit mode -->
|
|
<<reveal state:[[$:/EditMode]] type:match text:yes><
|
|
<<button save-wiki param:"$:/core/templates/tiddlywiki5.encrypted.template.html" class:"btn pull-right"><Save Changes (encrypted)>>
|
|
>>
|
|
<<reveal state:[[$:/EditMode]] type:match text:yes><
|
|
<<button save-wiki class:"btn pull-right"><Save Changes>>
|
|
>>
|
|
}}}
|
|
|
|
}}}
|
|
|
|
<!-- This navigator intercepts navigation events and sets the text of the specified tiddler to the target tiddler title -->
|
|
<<navigationcatcher set:[[$:/CurrentView]]><
|
|
<<reveal state:ViewDropDownState type:popup position:below><
|
|
<div class="open">
|
|
{{dropdown-menu tw-suppress-missing-tiddlylink{
|
|
* <<link to:classic>< <<reveal state:[[$:/CurrentView]] type:match text:classic>< <span class="tw-ticked-menu-item"></span> >> Classic>>
|
|
* <<link to:sideways>< <<reveal state:[[$:/CurrentView]] type:match text:sideways>< <span class="tw-ticked-menu-item"></span> >> Sideways>>
|
|
* <<link to:zoomin>< <<reveal state:[[$:/CurrentView]] type:match text:zoomin>< <span class="tw-ticked-menu-item"></span> >> Zoomin>>
|
|
}}}
|
|
</div>
|
|
>>
|
|
>>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- The main story references the same story and history tiddlers as the outer navigator -->
|
|
<div class="container">
|
|
<<list filter:"[list[$:/StoryList]]" template:"$:/templates/ViewTemplate" editTemplate:"$:/templates/EditTemplate" listview:classic >>
|
|
</div>
|
|
|
|
>>
|
|
|