1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-06-04 23:54:06 +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 title: $:/core/ui/PageTemplate
<!-- The navigator catches navigation events and updates the story and history tiddlers -->
<$navigator story="$:/StoryList" history="$:/HistoryList"> <$navigator story="$:/StoryList" history="$:/HistoryList">
<$dropzone> <$dropzone>
<!-- The optional topbar --> <$list filter="[is[shadow]!has[draft.of]tag[$:/tags/PageTemplate]] [!is[shadow]!has[draft.of]tag[$:/tags/PageTemplate]]" variable="listItem">
{{$:/TopSideBar}}
<!-- The optional leftsidebar --> <$transclude tiddler=<<listItem>>/>
{{$:/LeftSideBar}}
<!-- The sidebar header --> </$list>
<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>
</$dropzone> </$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 title: $:/core/ui/SideBarLists
<!-- The implementation of tabs here is currently a bit unreadable -->
<div class="tw-sidebar-lists"> <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 !! 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 * Refactored control panel to add ''Saving'' tab that includes TiddlySpot options
!! Bug fixes !! Bug fixes
* *
Contributors to this release include @jermolene and @grayeul. Contributors to this release include @jermolene.