diff --git a/core/modules/macros/color.js b/core/modules/macros/color.js new file mode 100644 index 000000000..832ad60cb --- /dev/null +++ b/core/modules/macros/color.js @@ -0,0 +1,41 @@ +/*\ +title: $:/core/modules/macros/color.js +type: application/javascript +module-type: macro + +Color macro. + +Applies the specified colour to its content. By default, the colour value is obtained from the `color` field of the current tiddler + +\*/ +(function(){ + +/*jslint node: true, browser: true */ +/*global $tw: false */ +"use strict"; + +exports.info = { + name: "color", + params: { + "default": {byName: "default", type: "text"}, + } +}; + +exports.executeMacro = function() { + var tiddler = this.wiki.getTiddler(this.tiddlerTitle), + attributes = { + style: { + "background-color": (tiddler && tiddler.fields.color) || this.params["default"] + } + }; + if(this.classes) { + attributes["class"] = this.classes.slice(0); + } + for(var t=0; t> +}}} + +\*/ +(function(){ + +/*jslint node: true, browser: true */ +/*global $tw: false */ +"use strict"; + +exports.info = { + name: "tags", + dependentOnContextTiddler: true, + params: { + template: {byName: true, type: "tiddler"}, + filter: {byName: true, type: "filter"} + } +}; + +exports.executeMacro = function() { + var tiddler = this.wiki.getTiddler(this.tiddlerTitle), + child = $tw.Tree.Element("div",{"class":"tw-tags-wrapper"},[]); + if(tiddler && tiddler.fields.tags) { + for(var t=0; t<<>>> +}}} diff --git a/core/templates/ViewTemplate.tid b/core/templates/ViewTemplate.tid index 202ad8f84..1c6aa9b2e 100644 --- a/core/templates/ViewTemplate.tid +++ b/core/templates/ViewTemplate.tid @@ -5,7 +5,8 @@ modifier: JeremyRuston
<><
}}} {{small{ -
<> <> <>
+
<> <>
+<> }}} {{body{ <> diff --git a/tw5.com/tiddlers/Docs.tid b/tw5.com/tiddlers/Docs.tid index 9081b6d64..5d88beccf 100644 --- a/tw5.com/tiddlers/Docs.tid +++ b/tw5.com/tiddlers/Docs.tid @@ -55,6 +55,8 @@ tags: docs * SliderMacro * ZoomerMacro * ChooserMacro +* TagsMacro +* ColorMacro ! Commands diff --git a/tw5.com/tiddlers/Improvements.tid b/tw5.com/tiddlers/Improvements.tid new file mode 100644 index 000000000..f5dc3d8d1 --- /dev/null +++ b/tw5.com/tiddlers/Improvements.tid @@ -0,0 +1,12 @@ +title: Improvements +tags: docs introduction + +The following features have been improved in TiddlyWiki5: + +* TiddlyWiki can now be run under [[node.js|nodejs.org]] as well as in the browser +* TiddlyWiki is structured as a 600-line boot kernel, with everything else implemented as plugins +* Improved WikiText, with much better generation of HTML, including proper `

` tags +* Tiddlers containing images are now supported just like WikiText tiddlers, including integrated editing of bitmap and SVG images +* Use of Twitter Bootstrap stylesheet (also enabling the use of Boostrap themes such as http://bootswatch.com) +* Syntax highlighting for JavaScript and JSON tiddlers +* TiddlyWiki5 can directly build both itself and previous (2.6.x) versions of TiddlyWiki from their constituent separate files, without needing external tools diff --git a/tw5.com/tiddlers/concepts/TiddlerFilters.tid b/tw5.com/tiddlers/concepts/TiddlerFilters.tid index 0314c29b7..4a4ef8e5e 100644 --- a/tw5.com/tiddlers/concepts/TiddlerFilters.tid +++ b/tw5.com/tiddlers/concepts/TiddlerFilters.tid @@ -1,5 +1,5 @@ title: TiddlerFilters -tags: feature +tags: docs concepts TiddlyWiki has a special syntax for expressing filters. They can be used to select tiddlers for an operation, or to filter a set of tiddlers to add or remove members. diff --git a/tw5.com/tiddlers/concepts/TiddlyWiki.tid b/tw5.com/tiddlers/concepts/TiddlyWiki.tid index 0b43fea02..f96539d1a 100644 --- a/tw5.com/tiddlers/concepts/TiddlyWiki.tid +++ b/tw5.com/tiddlers/concepts/TiddlyWiki.tid @@ -1,7 +1,7 @@ title: TiddlyWiki modifier: JeremyRuston modified: 20120211110622 -tag: docs concepts +tags: docs concepts TiddlyWiki is a rich, interactive interface for manipulating complex data with structure that doesn't easily fit into conventional tools like spreadsheets or wordprocessors. diff --git a/tw5.com/tiddlers/concepts/WikiText.tid b/tw5.com/tiddlers/concepts/WikiText.tid index 6c134cc93..ec522005f 100644 --- a/tw5.com/tiddlers/concepts/WikiText.tid +++ b/tw5.com/tiddlers/concepts/WikiText.tid @@ -1,6 +1,6 @@ title: WikiText type: text/x-tiddlywiki -tags: concepts +tags: docs concepts WikiText is a concise, expressive way of typing a wide range of text formatting and hypertext features. Operations like linking become part of the punctuation of your writing. diff --git a/tw5.com/tiddlers/tags/concepts.tid b/tw5.com/tiddlers/tags/concepts.tid new file mode 100644 index 000000000..3074718b4 --- /dev/null +++ b/tw5.com/tiddlers/tags/concepts.tid @@ -0,0 +1,3 @@ +title: concepts +color: #800 + diff --git a/tw5.com/tiddlers/tags/docs.tid b/tw5.com/tiddlers/tags/docs.tid new file mode 100644 index 000000000..e73962f83 --- /dev/null +++ b/tw5.com/tiddlers/tags/docs.tid @@ -0,0 +1,3 @@ +title: docs +color: #008 + diff --git a/tw5.com/tiddlers/tags/introduction.tid b/tw5.com/tiddlers/tags/introduction.tid new file mode 100644 index 000000000..f9da1aab0 --- /dev/null +++ b/tw5.com/tiddlers/tags/introduction.tid @@ -0,0 +1,3 @@ +title: introduction +color: #840 + diff --git a/tw5.com/wiki/StoryTiddlers.tid b/tw5.com/wiki/StoryTiddlers.tid index e8ec1424b..b777a1d79 100644 --- a/tw5.com/wiki/StoryTiddlers.tid +++ b/tw5.com/wiki/StoryTiddlers.tid @@ -5,6 +5,7 @@ type: application/json "tiddlers": [ {"title": "HelloThere", "template": "$:/templates/ViewTemplate"}, {"title": "Introduction", "template": "$:/templates/ViewTemplate"}, + {"title": "Improvements", "template": "$:/templates/ViewTemplate"}, {"title": "Docs", "template": "$:/templates/ViewTemplate"} ] } \ No newline at end of file diff --git a/tw5.com/wiki/styles.css.tid b/tw5.com/wiki/styles.css.tid index 0854cefd8..202013d0c 100644 --- a/tw5.com/wiki/styles.css.tid +++ b/tw5.com/wiki/styles.css.tid @@ -27,6 +27,10 @@ body { font-weight: normal; } +.tw-tags-wrapper .label { + margin-right: 8px; +} + .tw-edit-field { border: 1px dotted #888; }