1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-25 01:20:30 +00:00

Rearrange system tag configuration

By rearranging the `[all[]]` operator we are able to ensure that shadow
tiddlers get processed before ordinary tiddlers. This makes it easier
to create custom stylesheets that override the core.
This commit is contained in:
Jermolene 2014-04-18 09:28:14 +01:00
parent 89165fc51d
commit 9fbe72a877
28 changed files with 28 additions and 28 deletions

View File

@ -5,7 +5,7 @@ module-type: filteroperator
Filter operator for selecting tiddlers Filter operator for selecting tiddlers
[all[tiddlers+shadows]] [all[shadows+tiddlers]]
\*/ \*/
(function(){ (function(){

View File

@ -1,5 +1,5 @@
title: $:/AdvancedSearch title: $:/AdvancedSearch
<div class="tw-advanced-search"> <div class="tw-advanced-search">
<<tabs "[all[tiddlers+shadows]tag[$:/tags/AdvancedSearch]!has[draft.of]]" "$:/core/ui/AdvancedSearch/System">> <<tabs "[all[shadows+tiddlers]tag[$:/tags/AdvancedSearch]!has[draft.of]]" "$:/core/ui/AdvancedSearch/System">>
</div> </div>

View File

@ -12,7 +12,7 @@ caption: {{$:/language/Search/Filter/Caption}}
<div class="tw-block-dropdown-wrapper"> <div class="tw-block-dropdown-wrapper">
<$reveal state=<<qualify "$:/state/filterDropdown">> type="nomatch" text="" default=""> <$reveal state=<<qualify "$:/state/filterDropdown">> type="nomatch" text="" default="">
<div class="tw-block-dropdown tw-edit-type-dropdown"> <div class="tw-block-dropdown tw-edit-type-dropdown">
<$list filter="[all[tiddlers+shadows]tag[$:/tags/Filter]]"><$link to={{!!filter}}><$transclude field="description"/></$link> <$list filter="[all[shadows+tiddlers]tag[$:/tags/Filter]]"><$link to={{!!filter}}><$transclude field="description"/></$link>
</$list> </$list>
</div> </div>
</$reveal> </$reveal>

View File

@ -1,5 +1,5 @@
title: $:/ControlPanel title: $:/ControlPanel
<div class="tw-control-panel"> <div class="tw-control-panel">
<<tabs "[all[tiddlers+shadows]tag[$:/tags/ControlPanel]!has[draft.of]]" "$:/core/ui/ControlPanel/Basics">> <<tabs "[all[shadows+tiddlers]tag[$:/tags/ControlPanel]!has[draft.of]]" "$:/core/ui/ControlPanel/Basics">>
</div> </div>

View File

@ -5,5 +5,5 @@ caption: {{$:/language/ControlPanel/Advanced/Caption}}
{{$:/language/ControlPanel/Advanced/Hint}} {{$:/language/ControlPanel/Advanced/Hint}}
<div class="tw-control-panel"> <div class="tw-control-panel">
<<tabs "[all[tiddlers+shadows]tag[$:/tags/ControlPanel/Advanced]!has[draft.of]]" "$:/core/ui/ControlPanel/Advanced/TiddlerFields">> <<tabs "[all[shadows+tiddlers]tag[$:/tags/ControlPanel/Advanced]!has[draft.of]]" "$:/core/ui/ControlPanel/Advanced/TiddlerFields">>
</div> </div>

View File

@ -5,5 +5,5 @@ caption: {{$:/language/ControlPanel/Appearance/Caption}}
{{$:/language/ControlPanel/Appearance/Hint}} {{$:/language/ControlPanel/Appearance/Hint}}
<div class="tw-control-panel"> <div class="tw-control-panel">
<<tabs "[all[tiddlers+shadows]tag[$:/tags/ControlPanel/Appearance]!has[draft.of]]" "$:/core/ui/ControlPanel/Appearance/Theme">> <<tabs "[all[shadows+tiddlers]tag[$:/tags/ControlPanel/Appearance]!has[draft.of]]" "$:/core/ui/ControlPanel/Appearance/Theme">>
</div> </div>

View File

@ -6,7 +6,7 @@ tw-tiddler-frame tw-tiddler-edit-frame $(missingTiddlerClass)$ $(shadowTiddlerCl
<div class=<<frame-classes>>> <div class=<<frame-classes>>>
<$set name="storyTiddler" value=<<currentTiddler>>> <$set name="storyTiddler" value=<<currentTiddler>>>
<$keyboard key="ctrl+enter" message="tw-save-tiddler"> <$keyboard key="ctrl+enter" message="tw-save-tiddler">
<$list filter="[all[tiddlers+shadows]tag[$:/tags/EditTemplate]!has[draft.of]]" variable="listItem"> <$list filter="[all[shadows+tiddlers]tag[$:/tags/EditTemplate]!has[draft.of]]" variable="listItem">
<$transclude tiddler=<<listItem>>/> <$transclude tiddler=<<listItem>>/>
</$list> </$list>
</$keyboard> </$keyboard>

View File

@ -1,4 +1,4 @@
title: $:/core/ui/EditTemplate/controls title: $:/core/ui/EditTemplate/controls
tags: $:/tags/EditTemplate tags: $:/tags/EditTemplate
<span class="tw-tiddler-controls titlebar"> <$list filter="[all[tiddlers+shadows]tag[$:/tags/EditToolbar]!has[draft.of]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list> </span> <span class="tw-tiddler-controls titlebar"> <$list filter="[all[shadows+tiddlers]tag[$:/tags/EditToolbar]!has[draft.of]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list> </span>

View File

@ -8,7 +8,7 @@ tags: $:/tags/EditTemplate
<$reveal state=<<qualify "$:/state/typeDropdown">> type="nomatch" text="" default=""> <$reveal state=<<qualify "$:/state/typeDropdown">> type="nomatch" text="" default="">
<div class="tw-block-dropdown tw-edit-type-dropdown"> <div class="tw-block-dropdown tw-edit-type-dropdown">
<$linkcatcher to="!!type"> <$linkcatcher to="!!type">
<$list filter="[all[tiddlers+shadows]prefix[$:/language/Docs/Types/]] +[sort[description]]"><$link to={{!!name}}><$view field="description"/> (<$view field="name"/>)</$link> <$list filter="[all[shadows+tiddlers]prefix[$:/language/Docs/Types/]] +[sort[description]]"><$link to={{!!name}}><$view field="description"/> (<$view field="name"/>)</$link>
</$list> </$list>
</$linkcatcher> </$linkcatcher>
</div> </div>

View File

@ -1,5 +1,5 @@
title: $:/core/Filters/SystemTags title: $:/core/Filters/SystemTags
tags: $:/tags/Filter tags: $:/tags/Filter
filter: [all[tiddlers+shadows]tags[]is[system]sort[title]] filter: [all[shadows+tiddlers]tags[]is[system]sort[title]]
description: {{$:/language/Filters/SystemTags}} description: {{$:/language/Filters/SystemTags}}

View File

@ -54,6 +54,6 @@ background-image: -ms-linear-gradient($gradient$);
\end \end
<$list filter="[all[tiddlers+shadows]tag[$:/tags/stylesheet]]"> <$list filter="[all[shadows+tiddlers]tag[$:/tags/stylesheet]]">
<$transclude/> <$transclude/>
</$list> </$list>

View File

@ -16,7 +16,7 @@ tw-page-container tw-page-view-$(themeTitle)$ tw-language-$(languageTitle)$
<$dropzone> <$dropzone>
<$list filter="[all[tiddlers+shadows]tag[$:/tags/PageTemplate]!has[draft.of]]" variable="listItem"> <$list filter="[all[shadows+tiddlers]tag[$:/tags/PageTemplate]!has[draft.of]]" variable="listItem">
<$transclude tiddler=<<listItem>>/> <$transclude tiddler=<<listItem>>/>

View File

@ -3,6 +3,6 @@ tags: $:/tags/PageTemplate
<div class="tw-alerts"> <div class="tw-alerts">
<$list filter="[all[tiddlers+shadows]tag[$:/tags/Alert]!has[draft.of]]" template="$:/core/ui/AlertTemplate" storyview="pop"/> <$list filter="[all[shadows+tiddlers]tag[$:/tags/Alert]!has[draft.of]]" template="$:/core/ui/AlertTemplate" storyview="pop"/>
</div> </div>

View File

@ -21,7 +21,7 @@ tags: $:/tags/PageTemplate
<div class="tw-page-controls"> <div class="tw-page-controls">
<$list filter="[all[tiddlers+shadows]tag[$:/tags/PageControls]!has[draft.of]]" variable="listItem"> <$list filter="[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]]" variable="listItem">
<$transclude tiddler=<<listItem>> mode="inline"/> <$transclude tiddler=<<listItem>> mode="inline"/>

View File

@ -3,6 +3,6 @@ tags: $:/tags/PageTemplate
<span class="tw-topbar tw-topbar-left"> <span class="tw-topbar tw-topbar-left">
<$list filter="[all[tiddlers+shadows]tag[$:/tags/TopLeftBar]!has[draft.of]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list> <$list filter="[all[shadows+tiddlers]tag[$:/tags/TopLeftBar]!has[draft.of]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list>
</span> </span>

View File

@ -3,6 +3,6 @@ tags: $:/tags/PageTemplate
<span class="tw-topbar tw-topbar-right"> <span class="tw-topbar tw-topbar-right">
<$list filter="[all[tiddlers+shadows]tag[$:/tags/TopRightBar]!has[draft.of]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list> <$list filter="[all[shadows+tiddlers]tag[$:/tags/TopRightBar]!has[draft.of]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list>
</span> </span>

View File

@ -3,5 +3,5 @@ tags: $:/tags/SideBar
caption: {{$:/language/SideBar/More/Caption}} caption: {{$:/language/SideBar/More/Caption}}
<div class="tw-more-sidebar"> <div class="tw-more-sidebar">
<<tabs "[all[tiddlers+shadows]tag[$:/tags/MoreSideBar]!has[draft.of]]" "$:/core/ui/MoreSideBar/Tags" "$:/state/tab/moresidebar">> <<tabs "[all[shadows+tiddlers]tag[$:/tags/MoreSideBar]!has[draft.of]]" "$:/core/ui/MoreSideBar/Tags" "$:/state/tab/moresidebar">>
</div> </div>

View File

@ -18,6 +18,6 @@ title: $:/core/ui/SideBarLists
</div> </div>
</$reveal> </$reveal>
<$reveal state="$:/temp/search" type="match" text=""> <$reveal state="$:/temp/search" type="match" text="">
<<tabs "[all[tiddlers+shadows]tag[$:/tags/SideBar]!has[draft.of]]" "$:/core/ui/SideBar/Open" "$:/state/tab/sidebar">> <<tabs "[all[shadows+tiddlers]tag[$:/tags/SideBar]!has[draft.of]]" "$:/core/ui/SideBar/Open" "$:/state/tab/sidebar">>
</$reveal> </$reveal>
</div> </div>

View File

@ -7,7 +7,7 @@ title: $:/TagManager
<$reveal state=<<qualify "$:/state/iconDropdown/$title$">> type="nomatch" text="" default=""> <$reveal state=<<qualify "$:/state/iconDropdown/$title$">> type="nomatch" text="" default="">
<$linkcatcher to="$title$!!icon"> <$linkcatcher to="$title$!!icon">
<div class="tw-block-dropdown tw-edit-type-dropdown"> <div class="tw-block-dropdown tw-edit-type-dropdown">
<$list filter="[all[tiddlers+shadows]is[image]] [all[tiddlers+shadows]tag[$:/tags/Image]] +[sort[title]]"> <$list filter="[all[shadows+tiddlers]is[image]] [all[shadows+tiddlers]tag[$:/tags/Image]] +[sort[title]]">
<$link to={{!!title}}> <$link to={{!!title}}>
<$view field="title"/> <$view field="title"/>
</$link> </$link>

View File

@ -1,3 +1,3 @@
title: $:/core/ui/TiddlerInfo title: $:/core/ui/TiddlerInfo
<<tabs "[all[tiddlers+shadows]tag[$:/tags/TiddlerInfo]!has[draft.of]]" "$:/core/ui/TiddlerInfo/References">> <<tabs "[all[shadows+tiddlers]tag[$:/tags/TiddlerInfo]!has[draft.of]]" "$:/core/ui/TiddlerInfo/References">>

View File

@ -2,7 +2,7 @@ title: $:/core/ui/TiddlerInfo/Advanced
tags: $:/tags/TiddlerInfo tags: $:/tags/TiddlerInfo
caption: {{$:/language/TiddlerInfo/Advanced/Caption}} caption: {{$:/language/TiddlerInfo/Advanced/Caption}}
<$list filter="[all[tiddlers+shadows]tag[$:/tags/TiddlerInfo/Advanced]!has[draft.of]]" variable="listItem"> <$list filter="[all[shadows+tiddlers]tag[$:/tags/TiddlerInfo/Advanced]!has[draft.of]]" variable="listItem">
<$transclude tiddler=<<listItem>>/> <$transclude tiddler=<<listItem>>/>
</$list> </$list>

View File

@ -3,6 +3,6 @@ title: $:/core/ui/ViewTemplate
\define frame-classes() \define frame-classes()
tw-tiddler-frame tw-tiddler-view-frame $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$ tw-tiddler-frame tw-tiddler-view-frame $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$
\end \end
<$set name="storyTiddler" value=<<currentTiddler>>><$set name="tiddlerInfoState" value=<<qualify "$:/state/tiddlerInfo">>><$tiddler tiddler=<<currentTiddler>>><div class=<<frame-classes>>><$list filter="[all[tiddlers+shadows]tag[$:/tags/ViewTemplate]!has[draft.of]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list> <$set name="storyTiddler" value=<<currentTiddler>>><$set name="tiddlerInfoState" value=<<qualify "$:/state/tiddlerInfo">>><$tiddler tiddler=<<currentTiddler>>><div class=<<frame-classes>>><$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewTemplate]!has[draft.of]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list>
</div> </div>
</$tiddler></$set></$set> </$tiddler></$set></$set>

View File

@ -7,7 +7,7 @@ fill:$(foregroundColor)$;
<div class="tw-tiddler-title"> <div class="tw-tiddler-title">
<div class="titlebar"> <div class="titlebar">
<span class="tw-tiddler-controls"> <span class="tw-tiddler-controls">
<$list filter="[all[tiddlers+shadows]tag[$:/tags/ViewToolbar]!has[draft.of]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list> <$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list>
</span> </span>
<$set name="foregroundColor" value={{!!color}}> <$set name="foregroundColor" value={{!!color}}>
<span style=<<title-styles>>> <span style=<<title-styles>>>

View File

@ -4,7 +4,7 @@ title: $:/snippets/paletteswitcher
<<lingo Prompt>> <$view tiddler={{$:/palette}} field="name"/> <<lingo Prompt>> <$view tiddler={{$:/palette}} field="name"/>
<$linkcatcher to="$:/palette"> <$linkcatcher to="$:/palette">
<div class="tw-chooser"><$list filter="[all[tiddlers+shadows]tag[$:/tags/Palette]sort[description]]"><div class="tw-chooser-item"><$link to={{!!title}}><div><$reveal state="$:/palette" type="match" text={{!!title}}>&bull;</$reveal><$reveal state="$:/palette" type="nomatch" text={{!!title}}>&nbsp;</$reveal> ''<$view field="name" format="text"/>'' - <$view field="description" format="text"/></div><$transclude tiddler="$:/snippets/currpalettepreview"/></$link></div> <div class="tw-chooser"><$list filter="[all[shadows+tiddlers]tag[$:/tags/Palette]sort[description]]"><div class="tw-chooser-item"><$link to={{!!title}}><div><$reveal state="$:/palette" type="match" text={{!!title}}>&bull;</$reveal><$reveal state="$:/palette" type="nomatch" text={{!!title}}>&nbsp;</$reveal> ''<$view field="name" format="text"/>'' - <$view field="description" format="text"/></div><$transclude tiddler="$:/snippets/currpalettepreview"/></$link></div>
</$list> </$list>
</div> </div>
</$linkcatcher> </$linkcatcher>

View File

@ -33,7 +33,7 @@ Previously, it was common to have `[is[shadow]]` at the start of a filter string
In 5.0.9, that filter has been changed to: In 5.0.9, that filter has been changed to:
``` ```
[all[tiddlers+shadows]tag[$:/tags/AdvancedSearch]!has[draft.of]] [all[shadows+tiddlers]tag[$:/tags/AdvancedSearch]!has[draft.of]]
``` ```
Note how the ''all'' operator allows operations to be performed on tiddlers from combinations of sources. Note how the ''all'' operator allows operations to be performed on tiddlers from combinations of sources.

View File

@ -22,4 +22,4 @@ System tags are used to give special behaviour to tiddlers:
These are the system tags in use in this wiki: These are the system tags in use in this wiki:
{{{ [all[tiddlers+shadows]tags[]prefix[$:/]] +[sort[title]] }}} {{{ [all[shadows+tiddlers]tags[]prefix[$:/]] +[sort[title]] }}}

View File

@ -11,7 +11,7 @@ For example:
|!Filter String |!Description | |!Filter String |!Description |
|`[tag[mytag]]` |Returns all tiddlers tagged `mytag` | |`[tag[mytag]]` |Returns all tiddlers tagged `mytag` |
|`[all[shadows]tag[mytag]]` |Returns all ShadowTiddlers tagged `mytag` | |`[all[shadows]tag[mytag]]` |Returns all ShadowTiddlers tagged `mytag` |
|`[all[tiddlers+shadows]tag[mytag]]` |Returns all ShadowTiddlers and non-ShadowTiddlers tagged `mytag` | |`[all[shadows+tiddlers]tag[mytag]]` |Returns all ShadowTiddlers and non-ShadowTiddlers tagged `mytag` |
|`[!tag[mytag]]` |Returns all tiddlers not tagged `mytag` | |`[!tag[mytag]]` |Returns all tiddlers not tagged `mytag` |
|`[tag[mytag]!tag[exclude]]` |Returns all tiddlers tagged `mytag` that are not tagged `mytag` | |`[tag[mytag]!tag[exclude]]` |Returns all tiddlers tagged `mytag` that are not tagged `mytag` |

View File

@ -1,6 +1,6 @@
title: $:/editions/clientserver/download-offline title: $:/editions/clientserver/download-offline
\define saveTiddlerFilter() \define saveTiddlerFilter()
[all[tiddlers+shadows]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] -[[$:/plugins/tiddlywiki/filesystem]] -[[$:/plugins/tiddlywiki/tiddlyweb]] +[sort[title]] [all[shadows+tiddlers]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] -[[$:/plugins/tiddlywiki/filesystem]] -[[$:/plugins/tiddlywiki/tiddlyweb]] +[sort[title]]
\end \end
{{$:/core/templates/tiddlywiki5.html}} {{$:/core/templates/tiddlywiki5.html}}