1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-17 23:34:50 +00:00
TiddlyWiki5/core/templates/PageTemplate.tid
Jeremy Ruston 8e6647b615 Initial tranche of the plugin implementation
This first commit adds some of the code needed for the plugin
mechanism, but it isn't all fully operational yet. I'm merging the
branch so that I can get some other pre-requisites done quickly on the
main branch, and then plan to return to this branch.
2012-08-06 22:34:16 +01:00

67 lines
1.9 KiB
Plaintext

title: $:/templates/PageTemplate
<!-- The navigator catches navigation events and updates the story and history tiddlers -->
<<navigator story:"$:/StoryTiddlers" history:"$:/History" ><
<!-- Zooming chooser -->
{{navigation-panel{
<<chooser><
<<list all>>
>>
}}}
<!-- 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}}
<!-- 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 class:"btn pull-right"><Save Changes>>
>>
}}}
}}}
<!-- This navigator intercepts navigation events and sets the text of the specified tiddler to the target tiddler title -->
<<navigator 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">
<<story story:"$:/StoryTiddlers" history:"$:/History" storyviewTiddler:[[$:/CurrentView]] storyview:classic >>
</div>
>>