From 2c367c5476da70ce9c2b37838febcdf437b9aca4 Mon Sep 17 00:00:00 2001 From: Andreas Abeck Date: Wed, 18 Mar 2015 18:52:33 +0100 Subject: [PATCH 1/4] added localisation for encryption dialog & de-DE translation --- boot/boot.js | 28 ++++++++++++++++++---------- core/language/en-GB/Misc.multids | 6 ++++++ core/modules/startup/password.js | 2 +- languages/de-DE/Misc.multids | 6 ++++++ 4 files changed, 31 insertions(+), 11 deletions(-) diff --git a/boot/boot.js b/boot/boot.js index f9f8d16f2..7161da3bd 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -490,20 +490,28 @@ $tw.utils.PasswordPrompt.prototype.createPrompt = function(options) { children = [dm("h1",{text: options.serviceName})]; if(!options.noUserName) { children.push(dm("input",{ - attributes: {type: "text", name: "username", placeholder: "Username"} + attributes: {type: "text", name: "username", placeholder: $tw.language.getString("Encryption/Username")} })); } children.push(dm("input",{ - attributes: {type: "password", name: "password", placeholder: "Password"} + attributes: { + type: "password", + name: "password", + placeholder: ( $tw.language == undefined ? "Password" : $tw.language.getString("Encryption/Password") ) + } })); if(options.repeatPassword) { children.push(dm("input",{ - attributes: {type: "password", name: "password2", placeholder: "Repeat password"} + attributes: { + type: "password", + name: "password2", + placeholder: $tw.language.getString("Encryption/RepeatPassword") + } })); } if(options.canCancel) { children.push(dm("button",{ - text: "Cancel", + text: $tw.language.getString("Encryption/Cancel"), eventListeners: [{ name: "click", handlerFunction: function(event) { @@ -537,7 +545,7 @@ $tw.utils.PasswordPrompt.prototype.createPrompt = function(options) { }); // Check that the passwords match if(options.repeatPassword && data.password !== data.password2) { - alert("Passwords do not match"); + alert($tw.language.getString("Encryption/PasswordNoMatch")); } else { // Call the callback if(options.callback(data)) { @@ -551,7 +559,7 @@ $tw.utils.PasswordPrompt.prototype.createPrompt = function(options) { } }); } - } + } event.preventDefault(); return false; },true); @@ -1925,9 +1933,9 @@ $tw.boot.isStartupTaskEligible = function(taskModule) { Global Hooks mechanism which allows plugins to modify default functionality */ $tw.hooks = $tw.hooks || { names: {}}; - + /* -Add hooks to the hashmap +Add hooks to the hashmap */ $tw.hooks.addHook = function(hookName,definition) { if($tw.utils.hop($tw.hooks.names,hookName)) { @@ -1937,9 +1945,9 @@ $tw.hooks.addHook = function(hookName,definition) { $tw.hooks.names[hookName] = [definition]; } }; - + /* -Invoke the hook by key +Invoke the hook by key */ $tw.hooks.invokeHook = function(hookName, value) { if($tw.utils.hop($tw.hooks.names,hookName)) { diff --git a/core/language/en-GB/Misc.multids b/core/language/en-GB/Misc.multids index d165ce99d..f56540882 100644 --- a/core/language/en-GB/Misc.multids +++ b/core/language/en-GB/Misc.multids @@ -10,8 +10,14 @@ ConfirmOverwriteTiddler: Do you wish to overwrite the tiddler "<$text text=<>/>"? DefaultNewTiddlerTitle: New Tiddler DropMessage: Drop here (or use the 'Escape' key to cancel) +Encryption/Cancel: Cancel Encryption/ConfirmClearPassword: Do you wish to clear the password? This will remove the encryption applied when saving this wiki Encryption/PromptSetPassword: Set a new password for this TiddlyWiki +Encryption/Username: Username +Encryption/Password: Password +Encryption/RepeatPassword: Repeat password +Encryption/PasswordNoMatch: Passwords do not match +Encryption/SetPassword: Set password InvalidFieldName: Illegal characters in field name "<$text text=<>/>". Fields can only contain lowercase letters, digits and the characters underscore (`_`), hyphen (`-`) and period (`.`) MissingTiddler/Hint: Missing tiddler "<$text text=<>/>" - click {{$:/core/images/edit-button}} to create OfficialPluginLibrary: Official ~TiddlyWiki Plugin Library diff --git a/core/modules/startup/password.js b/core/modules/startup/password.js index 6205b3e7d..5e8bd5352 100644 --- a/core/modules/startup/password.js +++ b/core/modules/startup/password.js @@ -23,7 +23,7 @@ exports.startup = function() { $tw.passwordPrompt.createPrompt({ serviceName: $tw.language.getString("Encryption/PromptSetPassword"), noUserName: true, - submitText: "Set password", + submitText: $tw.language.getString("Encryption/SetPassword"), canCancel: true, repeatPassword: true, callback: function(data) { diff --git a/languages/de-DE/Misc.multids b/languages/de-DE/Misc.multids index 0dd8a6afc..19967cbcb 100644 --- a/languages/de-DE/Misc.multids +++ b/languages/de-DE/Misc.multids @@ -10,8 +10,14 @@ ConfirmOverwriteTiddler: Tiddler: "<$text text=<>/>" existiert! OK übers ConfirmEditShadowTiddler: Sie sind dabei, einen Schatten-Tiddler zu verändern. Zukünftige, automatische Anpassungen werden dadurch unterdrückt. Sie können Ihre Änderungen rückgängig machen, indem Sie diesen Tiddler wieder löschen. Wollen Sie den Tiddler: "<$text text=<<title>>/>" ändern? DefaultNewTiddlerTitle: Neuer Tiddler DropMessage: Hierher ziehen (oder Escape um abzubrechen) +Encryption/Cancel: Abbrechen Encryption/ConfirmClearPassword: Wollen Sie das Passwort löschen? Damit wird die Verschlüsselung beim nächsten Speichervorgang abgeschalten! Encryption/PromptSetPassword: Der TiddlyWiki Inhalt wird mit dem nächsten Speichern verschlüsselt! +Encryption/Username: Benutzername +Encryption/Password: Passwort +Encryption/RepeatPassword: Passwort wiederholen +Encryption/PasswordNoMatch: Passwörter stimmen nicht überein +Encryption/SetPassword: Passwort setzen InvalidFieldName: Das Feld: "<$text text=<<fieldName>>/>" enthält illegale Zeichen. Felder müssen klein geschrieben werden. Erlaubte Sonderzeichen sind: Zahlen, Unterstrich (`_`), Minus (`-`) und Punkt (`.`). MissingTiddler/Hint: Fehlender Tiddler "<$text text=<<currentTiddler>>/>" - klicken Sie {{$:/core/images/edit-button}} um ihn zu erzeugen. OfficialPluginLibrary: Offizielles ~TiddlyWiki Plugin Verzeichnis From 00f35fe41a7e6a030716daede793346356dfd9ae Mon Sep 17 00:00:00 2001 From: Jermolene <jeremy@osmosoft.com> Date: Sat, 21 Mar 2015 14:17:42 +0000 Subject: [PATCH 2/4] Don't HTML encode single quotes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit They don’t get automatically decoded when the browser reads the resulting HTML. So, instead, we’ll solve 1e9e1a1fdc260bd8a19fa5d244590dabb5dfd7f5 by switching to double quotes for attribute values. --- core/modules/utils/fakedom.js | 4 ++-- core/modules/utils/utils.js | 4 ++-- editions/test/tiddlers/tests/test-widget.js | 16 ++++++++-------- editions/test/tiddlers/tests/test-wikitext.js | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/core/modules/utils/fakedom.js b/core/modules/utils/fakedom.js index 13f162f69..0d6ea6d42 100755 --- a/core/modules/utils/fakedom.js +++ b/core/modules/utils/fakedom.js @@ -134,7 +134,7 @@ Object.defineProperty(TW_Element.prototype, "outerHTML", { for(a=0; a<attr.length; a++) { v = this.attributes[attr[a]]; if(v !== undefined) { - output.push(" ",attr[a],"='",$tw.utils.htmlEncode(v),"'"); + output.push(" ",attr[a],"=\"",$tw.utils.htmlEncode(v),"\""); } } } @@ -144,7 +144,7 @@ Object.defineProperty(TW_Element.prototype, "outerHTML", { style.push(s + ":" + this.style[s] + ";"); } if(style.length > 0) { - output.push(" style='",style.join(""),"'") + output.push(" style=\"",style.join(""),"\"") } } output.push(">"); diff --git a/core/modules/utils/utils.js b/core/modules/utils/utils.js index 35bc1ff32..eed24a840 100644 --- a/core/modules/utils/utils.js +++ b/core/modules/utils/utils.js @@ -363,10 +363,10 @@ exports.getRelativeDate = function(delta) { }; }; -// Convert & to "&", < to "<", > to ">", " to """ ' to "'" +// Convert & to "&", < to "<", > to ">", " to """ exports.htmlEncode = function(s) { if(s) { - return s.toString().replace(/&/mg,"&").replace(/</mg,"<").replace(/>/mg,">").replace(/\"/mg,""").replace(/\'/mg,"'"); + return s.toString().replace(/&/mg,"&").replace(/</mg,"<").replace(/>/mg,">").replace(/\"/mg,"""); } else { return ""; } diff --git a/editions/test/tiddlers/tests/test-widget.js b/editions/test/tiddlers/tests/test-widget.js index 95536fb63..a1ad79823 100755 --- a/editions/test/tiddlers/tests/test-widget.js +++ b/editions/test/tiddlers/tests/test-widget.js @@ -69,7 +69,7 @@ describe("Widget module", function() { var wrapper = renderWidgetNode(widgetNode); describe("should render", function() { // Test the rendering - expect(wrapper.innerHTML).toBe("A text node<div class='myClass' title='myTitle'> and the content of a DIV<div> and an inner DIV</div> and back in the outer DIV</div>"); + expect(wrapper.innerHTML).toBe("A text node<div class=\"myClass\" title=\"myTitle\"> and the content of a DIV<div> and an inner DIV</div> and back in the outer DIV</div>"); // Test the sequence numbers in the DOM expect(wrapper.sequenceNumber).toBe(0); expect(wrapper.children[0].sequenceNumber).toBe(1); @@ -113,7 +113,7 @@ describe("Widget module", function() { var wrapper = renderWidgetNode(widgetNode); describe("should render", function() { // Test the rendering - expect(wrapper.innerHTML).toBe("A text node<div class='myClass' title='the quick brown fox'> and the content of a DIV<div> and an inner DIV</div> and back in the outer DIVthe quick brown fox</div>the quick brown fox"); + expect(wrapper.innerHTML).toBe("A text node<div class=\"myClass\" title=\"the quick brown fox\"> and the content of a DIV<div> and an inner DIV</div> and back in the outer DIVthe quick brown fox</div>the quick brown fox"); // Test the sequence numbers in the DOM expect(wrapper.sequenceNumber).toBe(0); expect(wrapper.children[0].sequenceNumber).toBe(1); @@ -131,7 +131,7 @@ describe("Widget module", function() { refreshWidgetNode(widgetNode,wrapper,["TiddlerOne"]); describe("should refresh", function() { // Test the refreshing - expect(wrapper.innerHTML).toBe("A text node<div class='myClass' title='jumps over the lazy dog'> and the content of a DIV<div> and an inner DIV</div> and back in the outer DIVjumps over the lazy dog</div>jumps over the lazy dog"); + expect(wrapper.innerHTML).toBe("A text node<div class=\"myClass\" title=\"jumps over the lazy dog\"> and the content of a DIV<div> and an inner DIV</div> and back in the outer DIVjumps over the lazy dog</div>jumps over the lazy dog"); // Test the sequence numbers in the DOM expect(wrapper.sequenceNumber).toBe(0); expect(wrapper.children[0].sequenceNumber).toBe(1); @@ -163,7 +163,7 @@ describe("Widget module", function() { var wrapper = renderWidgetNode(widgetNode); describe("should detect the recursion", function() { // Test the rendering - expect(wrapper.innerHTML).toBe("<span class='tc-error'>Recursive transclusion error in transclude widget</span>\n"); + expect(wrapper.innerHTML).toBe("<span class=\"tc-error\">Recursive transclusion error in transclude widget</span>\n"); }); }); @@ -171,12 +171,12 @@ describe("Widget module", function() { it("should deal with SVG elements", function() { var wiki = new $tw.Wiki(); // Construct the widget node - var text = "<svg class='tv-image-new-button' viewBox='83 81 50 50' width='22pt' height='22pt'><path d='M 101.25 112.5 L 101.25 127.5 C 101.25 127.5 101.25 127.5 101.25 127.5 L 101.25 127.5 C 101.25 129.156855 102.593146 130.5 104.25 130.5 L 111.75 130.5 C 113.406854 130.5 114.75 129.156854 114.75 127.5 L 114.75 112.5 L 129.75 112.5 C 131.406854 112.5 132.75 111.156854 132.75 109.5 L 132.75 102 C 132.75 100.343146 131.406854 99 129.75 99 L 114.75 99 L 114.75 84 C 114.75 82.343146 113.406854 81 111.75 81 L 104.25 81 C 104.25 81 104.25 81 104.25 81 C 102.593146 81 101.25 82.343146 101.25 84 L 101.25 99 L 86.25 99 C 86.25 99 86.25 99 86.25 99 C 84.593146 99 83.25 100.343146 83.25 102 L 83.25 109.5 C 83.25 109.5 83.25 109.5 83.25 109.5 L 83.25 109.5 C 83.25 111.156855 84.593146 112.5 86.25 112.5 Z'/></svg>\n"; + var text = "<svg class=\"tv-image-new-button\" viewBox=\"83 81 50 50\" width=\"22pt\" height=\"22pt\"><path d=\"M 101.25 112.5 L 101.25 127.5 C 101.25 127.5 101.25 127.5 101.25 127.5 L 101.25 127.5 C 101.25 129.156855 102.593146 130.5 104.25 130.5 L 111.75 130.5 C 113.406854 130.5 114.75 129.156854 114.75 127.5 L 114.75 112.5 L 129.75 112.5 C 131.406854 112.5 132.75 111.156854 132.75 109.5 L 132.75 102 C 132.75 100.343146 131.406854 99 129.75 99 L 114.75 99 L 114.75 84 C 114.75 82.343146 113.406854 81 111.75 81 L 104.25 81 C 104.25 81 104.25 81 104.25 81 C 102.593146 81 101.25 82.343146 101.25 84 L 101.25 99 L 86.25 99 C 86.25 99 86.25 99 86.25 99 C 84.593146 99 83.25 100.343146 83.25 102 L 83.25 109.5 C 83.25 109.5 83.25 109.5 83.25 109.5 L 83.25 109.5 C 83.25 111.156855 84.593146 112.5 86.25 112.5 Z\"/></svg>\n"; var widgetNode = createWidgetNode(parseText(text,wiki,{parseAsInline:true}),wiki); // Render the widget node to the DOM var wrapper = renderWidgetNode(widgetNode); // Test the rendering - expect(wrapper.innerHTML).toBe("<svg class='tv-image-new-button' height='22pt' viewBox='83 81 50 50' width='22pt'><path d='M 101.25 112.5 L 101.25 127.5 C 101.25 127.5 101.25 127.5 101.25 127.5 L 101.25 127.5 C 101.25 129.156855 102.593146 130.5 104.25 130.5 L 111.75 130.5 C 113.406854 130.5 114.75 129.156854 114.75 127.5 L 114.75 112.5 L 129.75 112.5 C 131.406854 112.5 132.75 111.156854 132.75 109.5 L 132.75 102 C 132.75 100.343146 131.406854 99 129.75 99 L 114.75 99 L 114.75 84 C 114.75 82.343146 113.406854 81 111.75 81 L 104.25 81 C 104.25 81 104.25 81 104.25 81 C 102.593146 81 101.25 82.343146 101.25 84 L 101.25 99 L 86.25 99 C 86.25 99 86.25 99 86.25 99 C 84.593146 99 83.25 100.343146 83.25 102 L 83.25 109.5 C 83.25 109.5 83.25 109.5 83.25 109.5 L 83.25 109.5 C 83.25 111.156855 84.593146 112.5 86.25 112.5 Z'></path></svg>\n"); + expect(wrapper.innerHTML).toBe("<svg class=\"tv-image-new-button\" height=\"22pt\" viewBox=\"83 81 50 50\" width=\"22pt\"><path d=\"M 101.25 112.5 L 101.25 127.5 C 101.25 127.5 101.25 127.5 101.25 127.5 L 101.25 127.5 C 101.25 129.156855 102.593146 130.5 104.25 130.5 L 111.75 130.5 C 113.406854 130.5 114.75 129.156854 114.75 127.5 L 114.75 112.5 L 129.75 112.5 C 131.406854 112.5 132.75 111.156854 132.75 109.5 L 132.75 102 C 132.75 100.343146 131.406854 99 129.75 99 L 114.75 99 L 114.75 84 C 114.75 82.343146 113.406854 81 111.75 81 L 104.25 81 C 104.25 81 104.25 81 104.25 81 C 102.593146 81 101.25 82.343146 101.25 84 L 101.25 99 L 86.25 99 C 86.25 99 86.25 99 86.25 99 C 84.593146 99 83.25 100.343146 83.25 102 L 83.25 109.5 C 83.25 109.5 83.25 109.5 83.25 109.5 L 83.25 109.5 C 83.25 111.156855 84.593146 112.5 86.25 112.5 Z\"></path></svg>\n"); expect(wrapper.firstChild.namespaceURI).toBe("http://www.w3.org/2000/svg"); }); @@ -268,7 +268,7 @@ describe("Widget module", function() { // Render the widget node to the DOM var wrapper = renderWidgetNode(widgetNode); // Test the rendering - expect(wrapper.innerHTML).toBe("<p><div class='My something something, or other thing'>Content</div></p>"); + expect(wrapper.innerHTML).toBe("<p><div class=\"My something something, or other thing\">Content</div></p>"); }); it("should deal with built-in macros", function() { @@ -283,7 +283,7 @@ describe("Widget module", function() { // Render the widget node to the DOM var wrapper = renderWidgetNode(widgetNode); // Test the rendering - expect(wrapper.innerHTML).toBe("<p><a href='data:text/vnd.tiddlywiki,Jolly%20Old%20World'>My linky link</a></p>"); + expect(wrapper.innerHTML).toBe("<p><a href=\"data:text/vnd.tiddlywiki,Jolly%20Old%20World\">My linky link</a></p>"); }); it("should deal with the list widget", function() { diff --git a/editions/test/tiddlers/tests/test-wikitext.js b/editions/test/tiddlers/tests/test-wikitext.js index ad7e96bde..37cbf65ed 100644 --- a/editions/test/tiddlers/tests/test-wikitext.js +++ b/editions/test/tiddlers/tests/test-wikitext.js @@ -43,7 +43,7 @@ describe("WikiText tests", function() { expect(wiki.renderTiddler("text/html","TiddlerThree")).toBe("<p>The speed of sound</p><p>The light of speed</p>"); }); it("should support attributes specified as macro invocations", function() { - expect(wiki.renderTiddler("text/html","TiddlerFour")).toBe("<p><a class='tc-tiddlylink tc-tiddlylink-missing' href='#This%20is%20my%20''amazingly''%20groovy%20macro!'>This is a link</a></p>"); + expect(wiki.renderTiddler("text/html","TiddlerFour")).toBe("<p><a class=\"tc-tiddlylink tc-tiddlylink-missing\" href=\"#This%20is%20my%20''amazingly''%20groovy%20macro!\">This is a link</a></p>"); }); it("should identify wikiwords to automatically link", function() { expect(wiki.renderText("text/html","text/vnd-tiddlywiki","No wikilinks here").indexOf("<a") !== -1).toBe(false); From a60ea1d89b6347bede40a6074f86d90ccc3e646a Mon Sep 17 00:00:00 2001 From: Jermolene <jeremy@osmosoft.com> Date: Sat, 21 Mar 2015 15:52:28 +0000 Subject: [PATCH 3/4] Remove cheatsheet from help panel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We’d rather present this information as a panel within the tiddler editor so that we can (for example), allow clicks on a snippet to insert it automatically into the editor at the current cursor position. For the moment, we’ll just remove the cheatsheet. Post-5.1.8 we’ll add it back to the editor --- plugins/tiddlywiki/help/tabs/Cheatsheet.tid | 776 -------------------- 1 file changed, 776 deletions(-) delete mode 100644 plugins/tiddlywiki/help/tabs/Cheatsheet.tid diff --git a/plugins/tiddlywiki/help/tabs/Cheatsheet.tid b/plugins/tiddlywiki/help/tabs/Cheatsheet.tid deleted file mode 100644 index db0960d0c..000000000 --- a/plugins/tiddlywiki/help/tabs/Cheatsheet.tid +++ /dev/null @@ -1,776 +0,0 @@ -title: $:/plugins/tiddlywiki/help/HelpPanel/Cheatsheet -tags: $:/tags/HelpPanel -caption: Cheatsheet - -<dl class="tc-help-cheatsheet"> -<dt> - -``` -''bold'' -``` -</dt> -<dd>''bold''</dd> - -<dt> - -``` -//italics// -``` -</dt> -<dd>//italics//</dd> - -<dt> - -``` -''//bold italics//'' -``` -</dt> -<dd>''//bold italics//''</dd> - -<dt> - -``` -__underline__ -``` -</dt> -<dd>__underline__</dd> - -<dt> - -``` -~~strikethrough~~ -``` -</dt> -<dd>~~strikethrough~~</dd> - -<dt> - -``` -super^^script^^ -``` -</dt> -<dd>super^^script^^</dd> - -<dt> - -``` -sub,,script,, -``` -</dt> -<dd>sub,,script,,</dd> - -<dt> - -``` -foo -- bar -foo --- bar -``` -</dt> -<dd>foo -- bar (En dash)<br>foo --- bar (Em dash)<br></dd> - -<dt> - -``` -!Heading 1 -!!Heading 2 -!!!Heading 3 -``` -</dt> -<dd> - -!Heading 1 -!!Heading 2 -!!!Heading 3 -</dd> - -<dt> - -``` ---- -horizontal rules -<hr> -``` -</dt> -<dd> - ---- -horizontal rules -<hr> -</dd> - -<dt><pre>`code`</pre></dt> -<dd>`code` ...via backticks</dd> - -<dt><pre>``with `backticks` ``</pre></dt> -<dd>``with `backticks` ``</dd> - -<dt> -<pre>``` -monospaced -codeblock -```</pre> -</dt> - -<dd> - -``` -monospaced -codeblock -``` -</dd> - -<dt> - -``` -""" -force -hard -linebreaks -like -this... -""" -``` -</dt> - - -<dd> - -""" -force -hard -linebreaks -like -this... -""" -</dd> - -<dt> - -``` -...since -new paragraphs -need two linebreaks - -in tw5 -``` -</dt> - -<dd> - -...since -new paragraphs -need two linebreaks - -in tw5 -</dd> - - -<dt> - -``` -> block ->> quotes ->>> are easy -``` -</dt> - -<dd> - -> block ->> quotes ->>> are <br>easy -</dd> - - -<dt> - -``` -<<< -real -easy -<<< -``` -</dt> - -<dd> - -<<< -real -easy -<<< -</dd> - - -<dt> - -``` -* unordered -** list -``` -</dt> - -<dd> - -* unordered -** list -</dd> - -<dt> - -``` -# ordered -## list -``` -</dt> - -<dd> - -# ordered -## list -</dd> - -<dt> - -``` -;definition -:term -``` -</dt> - -<dd> - -;definition -:term -</dd> - -<dt> - -``` -# mixed -#* lists -#;you -#:know -#>like so -``` -</dt> - -<dd> - -# mixed -#* lists -#;you -#:know -#>like so -</dd> - -<dt> - -``` -!.h1-class.red CSS -#.li-class.red classes -*.li-class.red can be -;.dt-class.red assigned -:.dd-class.red like ->.blockquote-class.red this -``` -</dt> - -<dd> - -!.h1-class.red CSS -#.li-class.red classes -*.li-class.red can be -;.dt-class.red assigned -:.dd-class.red like ->.blockquote-class.red this -</dd> - - -<dt> - -``` -[[The Tiddler]] -[[pretty title|The Tiddler]] -``` -</dt> -<dd> - -[[The Tiddler]]<br> -[[pretty title|The Tiddler]] -</dd> - -<dt> - -``` -CamelCase -~SuppressedCamelCase -``` -</dt> -<dd> - -CamelCase<br> -~SuppressedWikiLink -</dd> - -<dt> - -``` -http://tiddlywiki.com -[[pretty|http://pretty.com]] -~http://not.alink.com -``` -</dt> -<dd> - -http://tiddlywiki.com<br> -[[google|http://google.com]]<br> -~http://not.alink.com -</dd> - -<dt> - -``` -file://///windows/network<br> -file:///c:/Windows/foo<br> -file:///linux/local<br> -``` -</dt> -<dd> - -file://///windows/network<br> -file:///c:/Windows/foo<br> -file:///linux/local<br> -`file:///` only via local tw! -</dd> - -<dt> - -``` -[ext[forced.link.com]] -[ext[tw|tiddlywiki.com]] -[ext[foo|file:///c:/foo]] -[ext[relative/path]] -``` -</dt> -<dd> - -[ext[forced.link.com]]<br> -[ext[tw|tiddlywiki.com]]<br> -[ext[foo|file:///c:/foo]]<br> -[ext[relative/path]] -</dd> - -<dt> - -``` -[img[example.jpg]] -[img[tooltip|example.jpg]] -[img width=16 [example.jpg]] -[img class="tc-image" [example.jpg]] -``` -</dt> - -<dd> - -[img[http://www.tiddlywiki.com/favicon.ico]]<br> -[img[tooltip|http://www.tiddlywiki.com/favicon.ico]]<br> -[img width=16 [http://www.tiddlywiki.com/favicon.ico]]<br> -[img class="tc-image" [http://www.tiddlywiki.com/favicon.ico]] -</dd> - -<dt> - -``` -[img[http://www.tiddlywiki.com/favicon.ico]] -[img[path/image.jpg]] -``` -</dt> - -<dd> - -[img[http://www.tiddlywiki.com/favicon.ico]] -</dd> - -<dt> - -``` -[img width={{!!mywidth}} class=<<image-classes>> [example.jpg]] - -{{example.jpg}} -``` -</dt> - -<dd> - -params via -[[transclusion|http://tiddlywiki.com/#Transclusion%20in%20WikiText]] or -[[macro|http://tiddlywiki.com/#Macros%20in%20WikiText]]<br><br><br> - -embed via transclusion -</dd> - - -<dt> - -``` -@@.myStyleClass.red -;term -:definition -@@ -``` -</dt> - -<dd> - -@@.myStyleClass.red -;term -:definition -@@ -</dd> - -<dt> - -``` -@@color:red; -;css styles -:apply directly like this -@@ - -@@color:red; or this @@ -``` -</dt> - -<dd> - -@@color:red; -;css styles -:apply directly like this -@@ - -@@color:red; or this @@ -</dd> - -<dt> - -``` -@@.tc-tiddler-frame -@@width:200px;height:50px; -or combine both -@@ -``` -</dt> - -<dd> - -@@.tc-tiddler-frame -@@width:200px;height:50px; -or combine both -@@ -</dd> - -<dt> - -``` -@@.purple Am I purple?@@ - -<style> -.purple{color:purple;} -</style> -``` -</dt> -<dd> -@@.purple Am I purple?@@ - -<style> -.purple{color:purple;} -</style> -</dd> - -<dt style="font-size:80%;"> - -``` -| !Header | !Header | Mhhh ?!? | -|^NE |^ N |^ NW| -|W | ✦ | E| -|,SW |, S |, SE| -|merge|left|<| -|and|now| vertical | -|>| right|~| -``` -</dt> -<dd style="font-size:80%;"> - -| !Header | !Header | Mhhh ?!? | -|^NW |^ @@padding:0 7px 14px 7px;display:block; N@@ |^ NE| -|W | ✦ | @@padding:7px 0;display:block; E@@| -|,SW |, @@padding:14px 7px 0 7px;display:block; S@@ |, SE| -|merge|left|<| -|and|now| vertical | -|>| right|~| -</dd> - - -<dt> - -``` -<article class="hello"> -HTML tags work like that. -<!-- even comments --> -</article> -``` -</dt> - -<dd> - -<article class="hello"> -HTML tags work like that. -<!-- even comments --> -</article> -</dd> - -<dt> - -``` -<a href={{TiddlerWithURL}}>link</a> -<b class=<<getClass>>>bold</b> -``` -</dt> - -<dd> - -<a href={{TiddlerWithURL}}>link</a> -<b class=<<version>>>bold</b> - -set attributes via transclusion or macro -</dd> - - -<dt> - -``` -<div address="""attribute, -"quoted", -with, -linebreaks.""">inspect me!</div> -``` -</dt> - -<dd> - -<div address="""attribute, -"quoted", -with, -linebreaks.""">inspect me!</div> -</dd> - - -<dt> - -``` -*nest<div> - -;via -:html -</div> -``` -</dt> - -<dd> - -*nest <div> - -;via -:html -</div> -</dd> - - -<dt> - -``` -{{Foo}} -{{Foo||Bar}} -{{||Foo}} -{{Foo!!bar}} -{{!!bar}} -{{Foo##index}} -{{##index}} -{{{ [tag[Foo]] }}} -{{{ [tag[Foo]] ||Bar}}} -``` -</dt> - -<dd> - -» [[transcludes|http://tiddlywiki.com/#Transclusion%20in%20WikiText]] tiddler `Foo`<br> -» `Foo` with template `Bar`<br> -» template `Foo` for `CurrentTiddler`<br> -» field `bar` of `Foo`<br> -» field `bar` of `CurrentTiddler`<br> -» `index` of datatiddler `Foo`<br> -» `index` of `CurrentTiddler` (=data)<br> -» list of tiddlers tagged `Foo`<br> -» same using template `Bar` -</dd> - - -<dt> - -``` -\define run(foo:'bar') [[$foo$]] - -<<run "foo bar">> -``` -</dt> -<dd> - -» defines macro `run`<br> -» with parameter `foo`<br> -» whose value defaults to `bar`<br> -» outputs a link to value of param:<br> -  [[foo bar]] -</dd> - -<dt> - -``` -\define test() -I am $(x)$. -\end - -<$set name="x" value="y -of z"> -<<test>> -</$set> -``` -</dt> - -<dd> - -» defines macro test which<br> -» outputs value of variable x<br><br> - -» sets variable x to: "y<br> -  of z" //(multiline allowed)//<br> -» runs macro test which outputs:<br> -  "I am y of z." -</dd> - -<dt> - -``` -\define test(x, y, z:'0') -$x$ $y$ $z$ -\end - -<$macrocall -$name="test" -x=<<version>> -y={{!!title}}/> -``` -</dt> - -<dd> - -» defines macro test<br> -» outputs 3 params<br><br> - -» calls test via macrocall widget<br> -» using macro version as param x<br> -» and transclusion as param y<br><br> - -» outputs:<br> -  <<version>> Markup 0 -</dd> - - - -<dt> - -``` -$$$text/unknown -plain text, not //formatted// -$$$ -``` -</dt> -<dd> - -$$$text/unknown -plain text, not //formatted// -$$$ - -<br> -These are [[Typed Blocks|http://tiddlywiki.com/#Typed%20Blocks%20in%20WikiText]] -</dd> - - -<dt> - -``` -$$$image/svg+xml -<svg xmlns="http://www.w3.org/2000/svg" width="150" height="100"> - <circle cx="100" cy="50" r="40" stroke="black" stroke-width="2" fill="green" /> -</svg> -$$$ -``` -</dt> -<dd> - -$$$image/svg+xml -<svg xmlns="http://www.w3.org/2000/svg" width="150" height="100"> - <circle cx="100" cy="50" r="40" stroke="black" stroke-width="2" fill="green" /> -</svg> -$$$ -</dd> - -<dt> - -``` -$$$.svg -<svg xmlns="http://www.w3.org/2000/svg" width="150" height="100"> - <circle cx="100" cy="50" r="40" stroke="black" stroke-width="2" fill="red" /> -</svg> -$$$ -``` -</dt> -<dd> - -$$$.svg -<svg xmlns="http://www.w3.org/2000/svg" width="150" height="100"> - <circle cx="100" cy="50" r="40" stroke="black" stroke-width="2" fill="red" /> -</svg> -$$$ -</dd> - -<dt> - -``` -$$$text/vnd.tiddlywiki>text/html -This is ''some'' wikitext -$$$ -``` -</dt> -<dd> - -$$$text/vnd.tiddlywiki>text/html -This is ''some'' wikitext -$$$ -</dd> - -<dt> - -``` -$$$text/vnd.tiddlywiki>text/plain -This is ''some'' wikitext -$$$ -``` -</dt> -<dd> - -$$$text/vnd.tiddlywiki>text/plain -This is ''some'' wikitext -$$$ -</dd> - - -</dl> From 17696e450529a8e09e5b4c0caddfc45b76b84870 Mon Sep 17 00:00:00 2001 From: Jermolene <jeremy@osmosoft.com> Date: Sat, 21 Mar 2015 16:33:15 +0000 Subject: [PATCH 4/4] Fix for selected toolbar buttons in Firefox See https://github.com/Jermolene/TiddlyWiki5/issues/1599 --- themes/tiddlywiki/snowwhite/base.tid | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/tiddlywiki/snowwhite/base.tid b/themes/tiddlywiki/snowwhite/base.tid index cb8da020b..e9f342119 100644 --- a/themes/tiddlywiki/snowwhite/base.tid +++ b/themes/tiddlywiki/snowwhite/base.tid @@ -38,8 +38,8 @@ tags: [[$:/tags/Stylesheet]] <<transition "fill 150ms ease-in-out">> } -.tc-tiddler-controls button.tc-selected svg, -.tc-page-controls button.tc-selected svg { +.tc-tiddler-controls button.tc-selected, +.tc-page-controls button.tc-selected { <<filter "drop-shadow(0px -1px 2px rgba(0,0,0,0.25))">> }