1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-27 03:57:21 +00:00

Refactor page template to be tag driven

This commit is contained in:
Jermolene 2013-11-19 14:12:31 +00:00
parent 26ed978cf9
commit b8875e126f
6 changed files with 34 additions and 30 deletions

View File

@ -1,37 +1,14 @@
title: $:/core/ui/PageTemplate
<!-- The navigator catches navigation events and updates the story and history tiddlers -->
<$navigator story="$:/StoryList" history="$:/HistoryList">
<$dropzone>
<!-- The optional topbar -->
{{$:/TopSideBar}}
<$list filter="[is[shadow]!has[draft.of]tag[$:/tags/PageTemplate]] [!is[shadow]!has[draft.of]tag[$:/tags/PageTemplate]]" variable="listItem">
<!-- The optional leftsidebar -->
{{$:/LeftSideBar}}
<$transclude tiddler=<<listItem>>/>
<!-- The sidebar header -->
<header class="sidebar-header">
<div class="titlebar">{{SiteTitle}}</div>
<div class="tw-subtitle">{{SiteSubtitle}}</div>
<div class="tw-page-controls">
<$list filter="[is[shadow]!has[draft.of]tag[$:/tags/PageControls]] [!is[shadow]!has[draft.of]tag[$:/tags/PageControls]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list>
</div>
{{$:/core/ui/SideBar}}
</header>
<!-- The story river -->
<section class="story-river">
<!-- The main story -->
<$list filter="[list[$:/StoryList]]" history="$:/HistoryList" template="$:/core/ui/ViewTemplate" editTemplate="$:/core/ui/EditTemplate" storyview={{$:/view}} />
<!-- End of story river -->
</section>
</$list>
</$dropzone>

View File

@ -0,0 +1,14 @@
title: $:/core/ui/PageTemplate/sidebar
tags: $:/tags/PageTemplate
<header class="sidebar-header">
<div class="titlebar">{{SiteTitle}}</div>
<div class="tw-subtitle">{{SiteSubtitle}}</div>
<div class="tw-page-controls">
<$list filter="[is[shadow]!has[draft.of]tag[$:/tags/PageControls]] [!is[shadow]!has[draft.of]tag[$:/tags/PageControls]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list>
</div>
{{$:/core/ui/SideBarLists}}
</header>

View File

@ -0,0 +1,10 @@
title: $:/core/ui/PageTemplate/story
tags: $:/tags/PageTemplate
<section class="story-river">
<!-- The main story -->
<$list filter="[list[$:/StoryList]]" history="$:/HistoryList" template="$:/core/ui/ViewTemplate" editTemplate="$:/core/ui/EditTemplate" storyview={{$:/view}} />
<!-- End of story river -->
</section>

View File

@ -1,6 +1,4 @@
title: $:/core/ui/SideBar
<!-- The implementation of tabs here is currently a bit unreadable -->
title: $:/core/ui/SideBarLists
<div class="tw-sidebar-lists">

View File

@ -0,0 +1,3 @@
title: $:/tags/PageTemplate
list: [[$:/core/ui/PageTemplate/sidebar]] [[$:/core/ui/PageTemplate/story]]

View File

@ -13,10 +13,12 @@ tags: releasenote
!! Improvements
* The page building blocks are now driven by the system tag `$:/tags/PageTemplate`
** [[$:/TopSideBar]] and [[$:/LeftSideBar]] are no longer specially treated; use the new tag instead
* Refactored control panel to add ''Saving'' tab that includes TiddlySpot options
!! Bug fixes
*
Contributors to this release include @jermolene and @grayeul.
Contributors to this release include @jermolene.