From 1d8e3ef288759340030375739b38f94fde47d3c1 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Sat, 2 Aug 2014 13:38:22 +0100 Subject: [PATCH 1/3] Trim sidebar tools Just got to add a theme button --- core/ui/SideBar/Tools.tid | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/core/ui/SideBar/Tools.tid b/core/ui/SideBar/Tools.tid index 7e68c3935..d49060b6e 100644 --- a/core/ui/SideBar/Tools.tid +++ b/core/ui/SideBar/Tools.tid @@ -9,8 +9,6 @@ $:/config/PageControlButtons/Visibility/$(listItem)$ <> <> ---- - <$set name="tw-config-toolbar-icons" value="yes"> <$set name="tw-config-toolbar-text" value="yes"> @@ -31,23 +29,4 @@ $:/config/PageControlButtons/Visibility/$(listItem)$ --- -<> <$browse/> - ---- - -{{$:/snippets/encryptionstatus}} - ---- - - ---- - -{{$:/snippets/viewswitcher}} - ---- - {{$:/snippets/minithemeswitcher}} - ---- - -{{$:/snippets/languageswitcher}} From c8bba8caea7b02dac6a84155e549e03854d177c5 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Sat, 2 Aug 2014 13:38:39 +0100 Subject: [PATCH 2/3] Switch to "tw-tagged-" prefix for CSS tags --- core/modules/widgets/tiddler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/widgets/tiddler.js b/core/modules/widgets/tiddler.js index a8b10e85f..1300bd991 100755 --- a/core/modules/widgets/tiddler.js +++ b/core/modules/widgets/tiddler.js @@ -57,7 +57,7 @@ TiddlerWidget.prototype.getTagClasses = function() { if(tiddler) { var tags = []; $tw.utils.each(tiddler.fields.tags,function(tag) { - tags.push("tw-tag-" + encodeURIComponent(tag)); + tags.push("tw-tagged-" + encodeURIComponent(tag)); }); return tags.join(" "); } else { From 17f78ae9c122b41b307745100846232237c0f8a2 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Sat, 2 Aug 2014 13:39:02 +0100 Subject: [PATCH 3/3] Docs update --- .../tiddlers/concepts/CurrentTiddler.tid | 2 ++ .../tiddlers/widgets/TiddlerWidget.tid | 22 ++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/editions/tw5.com/tiddlers/concepts/CurrentTiddler.tid b/editions/tw5.com/tiddlers/concepts/CurrentTiddler.tid index 8af3fab1e..28f543cfa 100644 --- a/editions/tw5.com/tiddlers/concepts/CurrentTiddler.tid +++ b/editions/tw5.com/tiddlers/concepts/CurrentTiddler.tid @@ -5,3 +5,5 @@ title: CurrentTiddler type: text/vnd.tiddlywiki The CurrentTiddler is the current tiddler during WikiText processing. A context tiddler is set by the TiddlerWidget. It allows you to write references like `<$view field="title" format="link"/>` in TemplateTiddlers without explicitly specifying the tiddler that it applies to. + +The title of the current tiddler is contained in the widget variable ''currentTiddler''. diff --git a/editions/tw5.com/tiddlers/widgets/TiddlerWidget.tid b/editions/tw5.com/tiddlers/widgets/TiddlerWidget.tid index cc633426a..cd2c81a00 100644 --- a/editions/tw5.com/tiddlers/widgets/TiddlerWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/TiddlerWidget.tid @@ -1,5 +1,5 @@ created: 20130824154300000 -modified: 20140107114152456 +modified: 20140802114152456 tags: widget title: TiddlerWidget type: text/vnd.tiddlywiki @@ -13,3 +13,23 @@ The TiddlerWidget sets the CurrentTiddler that applies for processing its conten |!Attribute |!Description | |tiddler |The title of the tiddler to become the new CurrentTiddler | |class |CSS classes to added to the generated elements | + +! CSS Class Variables + +The tiddler widget assigns several useful CSS classes to variables that it creates: + +* ''missingTiddlerClass'': ''"tw-tiddler-exists"'' or ''"tw-tiddler-missing"'' depending upon whether the target tiddler exists +* ''shadowTiddlerClass'': ''"tw-tiddler-shadow"'' if the tiddler is a shadow tiddler +* ''systemTiddlerClass'': ''"tw-tiddler-system"'' if the tiddler is a system tiddler +* ''tiddlerTagClasses'': A space separated list of CSS classes named ''"tw-tagged-{tagname}"''. For example ''"tw-tagged-introduction"''. Note that tag names are UrlEncoded which means that the tag ''$:/tags/Macro'' appears as the CSS class ''"tw-tagged-%24%3A%2Ftags%2FMacro"'' + +You can use these variables like this: + +``` +<$tiddler tiddler="MyOtherTiddler"> +
>> +<$transclude/> + +``` + +See also [[$:/core/ui/ViewTemplate]].