mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-01-25 04:14:40 +00:00
Compare commits
74 Commits
v5.0.0-alp
...
v5.0.0-alp
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f1e909278c | ||
|
|
8d3613e8b4 | ||
|
|
3fd3e408fc | ||
|
|
a2fcc59648 | ||
|
|
223e9c4747 | ||
|
|
b63f7a7416 | ||
|
|
905d3e6e1e | ||
|
|
90a0eca2f5 | ||
|
|
7658789971 | ||
|
|
9257c8205f | ||
|
|
b117f74666 | ||
|
|
3b35d7dfe4 | ||
|
|
29c0f7156b | ||
|
|
0d2ed8f112 | ||
|
|
99a6b1bcc0 | ||
|
|
da4cdf2d3b | ||
|
|
26cc62cff7 | ||
|
|
b1992714ed | ||
|
|
ecca7a3ea9 | ||
|
|
4b84d9bfe5 | ||
|
|
92b1932fcf | ||
|
|
9a6e404215 | ||
|
|
939ad11eae | ||
|
|
6785c49734 | ||
|
|
45c51481de | ||
|
|
874bd7b2b8 | ||
|
|
fc6dd83f2f | ||
|
|
a8129874fb | ||
|
|
c7d5905242 | ||
|
|
02d3620d93 | ||
|
|
b304e3fe40 | ||
|
|
06a66cf24e | ||
|
|
145e3ece78 | ||
|
|
24e361da77 | ||
|
|
1b9614eb9d | ||
|
|
791033d751 | ||
|
|
9748709759 | ||
|
|
b885743efe | ||
|
|
8ec92405fd | ||
|
|
e68ab95ecb | ||
|
|
d2dbc73448 | ||
|
|
4a5a8dd773 | ||
|
|
439dfcb172 | ||
|
|
f6a4ea6b0f | ||
|
|
8681e0228d | ||
|
|
c1123cb3e9 | ||
|
|
d64590a12b | ||
|
|
e274a0c7d1 | ||
|
|
51fe1e20e8 | ||
|
|
9c4ffae1b3 | ||
|
|
3d0c6cf41e | ||
|
|
3800d3b2b1 | ||
|
|
da54236f5a | ||
|
|
c930d84d01 | ||
|
|
2317f779e9 | ||
|
|
c501e70512 | ||
|
|
8357d90e59 | ||
|
|
efef6261b8 | ||
|
|
95b7a5d4fe | ||
|
|
2c55c7ca82 | ||
|
|
02dda51269 | ||
|
|
083cb848f2 | ||
|
|
254da0b170 | ||
|
|
8b0b9eafb8 | ||
|
|
04e2f18ff1 | ||
|
|
a4783a2c19 | ||
|
|
8fb6f26729 | ||
|
|
0e7ffa677a | ||
|
|
a668f09522 | ||
|
|
2598e22422 | ||
|
|
dc6a9c6348 | ||
|
|
b1667259f0 | ||
|
|
c77b451863 | ||
|
|
9e48460940 |
@@ -225,17 +225,18 @@ $tw.utils.pad = function(value,length) {
|
||||
return s;
|
||||
};
|
||||
|
||||
// Convert a date into UTC YYYYMMDDHHMM format
|
||||
// Convert a date into UTC YYYYMMDDHHMMSSmmm format
|
||||
$tw.utils.stringifyDate = function(value) {
|
||||
return value.getUTCFullYear() +
|
||||
$tw.utils.pad(value.getUTCMonth() + 1) +
|
||||
$tw.utils.pad(value.getUTCDate()) +
|
||||
$tw.utils.pad(value.getUTCHours()) +
|
||||
$tw.utils.pad(value.getUTCMinutes()) +
|
||||
$tw.utils.pad(value.getUTCSeconds()) +
|
||||
$tw.utils.pad(value.getUTCMilliseconds(),3);
|
||||
};
|
||||
|
||||
// Parse a date from a UTC YYYYMMDDHHMMSSMMM format string
|
||||
// Parse a date from a UTC YYYYMMDDHHMMSSmmm format string
|
||||
$tw.utils.parseDate = function(value) {
|
||||
if(typeof value === "string") {
|
||||
return new Date(Date.UTC(parseInt(value.substr(0,4),10),
|
||||
|
||||
3
core/docs/types/image_gif.tid
Normal file
3
core/docs/types/image_gif.tid
Normal file
@@ -0,0 +1,3 @@
|
||||
title: $:/docs/types/image/gif
|
||||
description: GIF image
|
||||
name: image/gif
|
||||
3
core/docs/types/image_jpeg.tid
Normal file
3
core/docs/types/image_jpeg.tid
Normal file
@@ -0,0 +1,3 @@
|
||||
title: $:/docs/types/image/jpeg
|
||||
description: JPEG image
|
||||
name: image/jpeg
|
||||
3
core/docs/types/image_png.tid
Normal file
3
core/docs/types/image_png.tid
Normal file
@@ -0,0 +1,3 @@
|
||||
title: $:/docs/types/image/png
|
||||
description: PNG image
|
||||
name: image/png
|
||||
3
core/docs/types/text_plain.tid
Normal file
3
core/docs/types/text_plain.tid
Normal file
@@ -0,0 +1,3 @@
|
||||
title: $:/docs/types/text/plain
|
||||
description: Plain text
|
||||
name: text/plain
|
||||
3
core/docs/types/text_vnd.tiddlywiki.tid
Normal file
3
core/docs/types/text_vnd.tiddlywiki.tid
Normal file
@@ -0,0 +1,3 @@
|
||||
title: $:/docs/types/text/vnd.tiddlywiki
|
||||
description: TW5 wikitext
|
||||
name: text/vnd.tiddlywiki
|
||||
@@ -22,7 +22,7 @@ exports.types = {block: true};
|
||||
exports.init = function(parser) {
|
||||
this.parser = parser;
|
||||
// Regexp to match
|
||||
this.matchRegExp = /<<([^\s>]+)\s*([\s\S]*?)>>(?:\r?\n|$)/mg;
|
||||
this.matchRegExp = /<<([^>\s]+)(?:\s*)((?:[^>]|(?:>(?!>)))*?)>>(?:\r?\n|$)/mg;
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -7,10 +7,7 @@ Wiki text rule for block-level transclusion. For example:
|
||||
|
||||
```
|
||||
{{MyTiddler}}
|
||||
{{MyTiddler|tooltip}}
|
||||
{{MyTiddler||TemplateTitle}}
|
||||
{{MyTiddler|tooltip||TemplateTitle}}
|
||||
{{MyTiddler}width:40;height:50;}.class.class
|
||||
```
|
||||
|
||||
\*/
|
||||
@@ -26,7 +23,7 @@ exports.types = {block: true};
|
||||
exports.init = function(parser) {
|
||||
this.parser = parser;
|
||||
// Regexp to match
|
||||
this.matchRegExp = /\{\{([^\{\}\|]+)(?:\|([^\|\{\}]+))?(?:\|\|([^\|\{\}]+))?\}([^\}]*)\}(?:\.(\S+))?(?:\r?\n|$)/mg;
|
||||
this.matchRegExp = /\{\{([^\{\}\|]+)(?:\|\|([^\|\{\}]+))?\}\}(?:\r?\n|$)/mg;
|
||||
};
|
||||
|
||||
exports.parse = function() {
|
||||
@@ -38,17 +35,12 @@ exports.parse = function() {
|
||||
targetTitle = tr.title,
|
||||
targetField = tr.field,
|
||||
targetIndex = tr.index,
|
||||
tooltip = this.match[2],
|
||||
template = $tw.utils.trim(this.match[3]),
|
||||
style = this.match[4],
|
||||
classes = this.match[5];
|
||||
template = $tw.utils.trim(this.match[2]);
|
||||
// Prepare the transclude widget
|
||||
var transcludeNode = {
|
||||
type: "element",
|
||||
tag: "$transclude",
|
||||
attributes: {
|
||||
tiddler: {type: "string", value: template || targetTitle}
|
||||
},
|
||||
attributes: {},
|
||||
isBlock: true
|
||||
};
|
||||
var tiddlerNode = {
|
||||
@@ -60,20 +52,16 @@ exports.parse = function() {
|
||||
isBlock: true,
|
||||
children: [transcludeNode]
|
||||
};
|
||||
if(targetField) {
|
||||
transcludeNode.attributes.field = {type: "string", value: targetField};
|
||||
}
|
||||
if(targetIndex) {
|
||||
transcludeNode.attributes.index = {type: "string", value: targetIndex};
|
||||
}
|
||||
if(tooltip) {
|
||||
transcludeNode.attributes.tooltip = {type: "string", value: tooltip};
|
||||
}
|
||||
if(style) {
|
||||
transcludeNode.attributes.style = {type: "string", value: style};
|
||||
}
|
||||
if(classes) {
|
||||
transcludeNode.attributes["class"] = {type: "string", value: classes.split(".").join(" ")};
|
||||
if(template) {
|
||||
transcludeNode.attributes.tiddler = {type: "string", value: template};
|
||||
} else {
|
||||
transcludeNode.attributes.tiddler = {type: "string", value: targetTitle};
|
||||
if(targetField) {
|
||||
transcludeNode.attributes.field = {type: "string", value: targetField};
|
||||
}
|
||||
if(targetIndex) {
|
||||
transcludeNode.attributes.index = {type: "string", value: targetIndex};
|
||||
}
|
||||
}
|
||||
return [tiddlerNode];
|
||||
};
|
||||
|
||||
@@ -7,10 +7,7 @@ Wiki text rule for inline-level transclusion. For example:
|
||||
|
||||
```
|
||||
{{MyTiddler}}
|
||||
{{MyTiddler|tooltip}}
|
||||
{{MyTiddler||TemplateTitle}}
|
||||
{{MyTiddler|tooltip||TemplateTitle}}
|
||||
{{MyTiddler}width:40;height:50;}.class.class
|
||||
```
|
||||
|
||||
\*/
|
||||
@@ -26,7 +23,7 @@ exports.types = {inline: true};
|
||||
exports.init = function(parser) {
|
||||
this.parser = parser;
|
||||
// Regexp to match
|
||||
this.matchRegExp = /\{\{([^\{\}\|]+)(?:\|([^\|\{\}]+))?(?:\|\|([^\|\{\}]+))?\}([^\}]*)\}(?:\.(\S+))?/mg;
|
||||
this.matchRegExp = /\{\{([^\{\}\|]+)(?:\|\|([^\|\{\}]+))?\}\}/mg;
|
||||
};
|
||||
|
||||
exports.parse = function() {
|
||||
@@ -38,17 +35,12 @@ exports.parse = function() {
|
||||
targetTitle = tr.title,
|
||||
targetField = tr.field,
|
||||
targetIndex = tr.index,
|
||||
tooltip = this.match[2],
|
||||
template = $tw.utils.trim(this.match[3]),
|
||||
style = this.match[4],
|
||||
classes = this.match[5];
|
||||
template = $tw.utils.trim(this.match[2]);
|
||||
// Prepare the transclude widget
|
||||
var transcludeNode = {
|
||||
type: "element",
|
||||
tag: "$transclude",
|
||||
attributes: {
|
||||
tiddler: {type: "string", value: template || targetTitle}
|
||||
}
|
||||
attributes: {}
|
||||
};
|
||||
var tiddlerNode = {
|
||||
type: "element",
|
||||
@@ -58,20 +50,16 @@ exports.parse = function() {
|
||||
},
|
||||
children: [transcludeNode]
|
||||
};
|
||||
if(targetField) {
|
||||
transcludeNode.attributes.field = {type: "string", value: targetField};
|
||||
}
|
||||
if(targetIndex) {
|
||||
transcludeNode.attributes.index = {type: "string", value: targetIndex};
|
||||
}
|
||||
if(tooltip) {
|
||||
transcludeNode.attributes.tooltip = {type: "string", value: tooltip};
|
||||
}
|
||||
if(style) {
|
||||
transcludeNode.attributes.style = {type: "string", value: style};
|
||||
}
|
||||
if(classes) {
|
||||
transcludeNode.attributes["class"] = {type: "string", value: classes.split(".").join(" ")};
|
||||
if(template) {
|
||||
transcludeNode.attributes.tiddler = {type: "string", value: template};
|
||||
} else {
|
||||
transcludeNode.attributes.tiddler = {type: "string", value: targetTitle};
|
||||
if(targetField) {
|
||||
transcludeNode.attributes.field = {type: "string", value: targetField};
|
||||
}
|
||||
if(targetIndex) {
|
||||
transcludeNode.attributes.index = {type: "string", value: targetIndex};
|
||||
}
|
||||
}
|
||||
return [tiddlerNode];
|
||||
};
|
||||
|
||||
56
core/modules/savers/msdownload.js
Normal file
56
core/modules/savers/msdownload.js
Normal file
@@ -0,0 +1,56 @@
|
||||
/*\
|
||||
title: $:/core/modules/savers/msdownload.js
|
||||
type: application/javascript
|
||||
module-type: saver
|
||||
|
||||
Handles saving changes via window.navigator.msSaveBlob()
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
Select the appropriate saver module and set it up
|
||||
*/
|
||||
var MsDownloadSaver = function(wiki) {
|
||||
};
|
||||
|
||||
MsDownloadSaver.prototype.save = function(text) {
|
||||
// Get the current filename
|
||||
var filename = "tiddlywiki.html",
|
||||
p = document.location.pathname.lastIndexOf("/");
|
||||
if(p !== -1) {
|
||||
filename = document.location.pathname.substr(p+1);
|
||||
}
|
||||
// Set up the link
|
||||
var blob = new Blob([text], {type: "text/html"});
|
||||
window.navigator.msSaveBlob(blob,filename);
|
||||
return true;
|
||||
};
|
||||
|
||||
/*
|
||||
Information about this saver
|
||||
*/
|
||||
MsDownloadSaver.prototype.info = {
|
||||
name: "msdownload",
|
||||
priority: 110
|
||||
};
|
||||
|
||||
/*
|
||||
Static method that returns true if this saver is capable of working
|
||||
*/
|
||||
exports.canSave = function(wiki) {
|
||||
return !!window.navigator.msSaveBlob;
|
||||
};
|
||||
|
||||
/*
|
||||
Create an instance of this saver
|
||||
*/
|
||||
exports.create = function(wiki) {
|
||||
return new MsDownloadSaver(wiki);
|
||||
};
|
||||
|
||||
})();
|
||||
@@ -29,7 +29,7 @@ exports.removeChildren = function(node) {
|
||||
};
|
||||
|
||||
exports.hasClass = function(el,className) {
|
||||
return el.className.split(" ").indexOf(className) !== -1;
|
||||
return el && el.className && el.className.split(" ").indexOf(className) !== -1;
|
||||
};
|
||||
|
||||
exports.addClass = function(el,className) {
|
||||
|
||||
@@ -26,16 +26,28 @@ Popup.prototype.show = function(options) {
|
||||
this.title = options.title;
|
||||
this.wiki = options.wiki;
|
||||
this.anchorDomNode = options.domNode;
|
||||
$tw.utils.addClass(this.anchorDomNode,"tw-popup");
|
||||
this.rootElement.addEventListener("click",this,false);
|
||||
};
|
||||
|
||||
Popup.prototype.handleEvent = function(event) {
|
||||
if(event.type === "click" && this.anchorDomNode !== event.target && !$tw.utils.domContains(this.anchorDomNode,event.target)) {
|
||||
this.cancel();
|
||||
// Dismiss the popup if we get a click on an element that doesn't have .tw-popup class
|
||||
if(event.type === "click") {
|
||||
var node = event.target;
|
||||
while(node && !$tw.utils.hasClass(node,"tw-popup")) {
|
||||
node = node.parentNode;
|
||||
}
|
||||
if(!node) {
|
||||
this.cancel();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Popup.prototype.cancel = function() {
|
||||
if(this.anchorDomNode) {
|
||||
$tw.utils.removeClass(this.anchorDomNode,"tw-popup");
|
||||
this.anchorDomNode = null;
|
||||
}
|
||||
this.rootElement.removeEventListener("click",this,false);
|
||||
if(this.title) {
|
||||
this.wiki.deleteTiddler(this.title);
|
||||
|
||||
@@ -62,7 +62,7 @@ CheckboxWidget.prototype.handleChangeEvent = function(event) {
|
||||
var checked = this.inputDomNode.checked,
|
||||
tiddler = this.wiki.getTiddler(this.checkboxTitle);
|
||||
if(tiddler && tiddler.hasTag(this.checkboxTag) !== checked) {
|
||||
var newTags = tiddler.fields.tags.slice(0),
|
||||
var newTags = (tiddler.fields.tags || []).slice(0),
|
||||
pos = newTags.indexOf(this.checkboxTag);
|
||||
if(pos !== -1) {
|
||||
newTags.splice(pos,1);
|
||||
|
||||
@@ -24,6 +24,7 @@ var NavigatorWidget = function(parseTreeNode,options) {
|
||||
{type: "tw-cancel-tiddler", handler: "handleCancelTiddlerEvent"},
|
||||
{type: "tw-close-tiddler", handler: "handleCloseTiddlerEvent"},
|
||||
{type: "tw-close-all-tiddlers", handler: "handleCloseAllTiddlersEvent"},
|
||||
{type: "tw-close-other-tiddlers", handler: "handleCloseOtherTiddlersEvent"},
|
||||
{type: "tw-new-tiddler", handler: "handleNewTiddlerEvent"},
|
||||
{type: "tw-import-tiddlers", handler: "handleImportTiddlersEvent"},
|
||||
]);
|
||||
@@ -134,6 +135,12 @@ NavigatorWidget.prototype.handleCloseAllTiddlersEvent = function(event) {
|
||||
this.saveStoryList();
|
||||
return false;
|
||||
};
|
||||
// Close other tiddlers
|
||||
NavigatorWidget.prototype.handleCloseOtherTiddlersEvent = function(event) {
|
||||
this.storyList = [event.tiddlerTitle];
|
||||
this.saveStoryList();
|
||||
return false;
|
||||
};
|
||||
|
||||
// Place a tiddler in edit mode
|
||||
NavigatorWidget.prototype.handleEditTiddlerEvent = function(event) {
|
||||
@@ -233,8 +240,8 @@ NavigatorWidget.prototype.handleSaveTiddlerEvent = function(event) {
|
||||
if(this.storyList[t] === event.tiddlerTitle) {
|
||||
var tiddler = this.wiki.getTiddler(event.tiddlerTitle);
|
||||
if(tiddler) {
|
||||
var draftTitle = tiddler.fields["draft.title"],
|
||||
draftOf = tiddler.fields["draft.of"];
|
||||
var draftTitle = (tiddler.fields["draft.title"] || "").trim(),
|
||||
draftOf = (tiddler.fields["draft.of"] || "").trim();
|
||||
if(draftTitle) {
|
||||
var isRename = draftOf !== draftTitle,
|
||||
isConfirmed = true;
|
||||
|
||||
@@ -34,7 +34,7 @@ PasswordWidget.prototype.render = function(parent,nextSibling) {
|
||||
// Execute our logic
|
||||
this.execute();
|
||||
// Get the current password
|
||||
var password = $tw.browser ? $tw.utils.getPassword(this.passwordName) : "";
|
||||
var password = $tw.browser ? $tw.utils.getPassword(this.passwordName) || "" : "";
|
||||
// Create our element
|
||||
var domNode = this.document.createElement("input");
|
||||
domNode.setAttribute("type","password");
|
||||
|
||||
@@ -38,6 +38,7 @@ RevealWidget.prototype.render = function(parent,nextSibling) {
|
||||
this.renderChildren(domNode,null);
|
||||
if(!domNode.isTiddlyWikiFakeDom && this.type === "popup" && this.isOpen) {
|
||||
this.positionPopup(domNode);
|
||||
$tw.utils.addClass(domNode,"tw-popup"); // Make sure that clicks don't dismiss popups within the revealed content
|
||||
}
|
||||
if(!this.isOpen) {
|
||||
domNode.setAttribute("hidden","true")
|
||||
@@ -179,6 +180,8 @@ RevealWidget.prototype.updateState = function() {
|
||||
// Animate our DOM node
|
||||
if(!domNode.isTiddlyWikiFakeDom && this.type === "popup" && this.isOpen) {
|
||||
this.positionPopup(domNode);
|
||||
$tw.utils.addClass(domNode,"tw-popup"); // Make sure that clicks don't dismiss popups within the revealed content
|
||||
|
||||
}
|
||||
if(this.isOpen) {
|
||||
domNode.removeAttribute("hidden");
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*\
|
||||
title: $:/core/modules/widgets/setvariable.js
|
||||
title: $:/core/modules/widgets/set.js
|
||||
type: application/javascript
|
||||
module-type: widget
|
||||
|
||||
Setvariable widget
|
||||
Set variable widget
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
@@ -14,19 +14,19 @@ Setvariable widget
|
||||
|
||||
var Widget = require("$:/core/modules/widgets/widget.js").widget;
|
||||
|
||||
var SetVariableWidget = function(parseTreeNode,options) {
|
||||
var SetWidget = function(parseTreeNode,options) {
|
||||
this.initialise(parseTreeNode,options);
|
||||
};
|
||||
|
||||
/*
|
||||
Inherit from the base widget class
|
||||
*/
|
||||
SetVariableWidget.prototype = new Widget();
|
||||
SetWidget.prototype = new Widget();
|
||||
|
||||
/*
|
||||
Render this widget into the DOM
|
||||
*/
|
||||
SetVariableWidget.prototype.render = function(parent,nextSibling) {
|
||||
SetWidget.prototype.render = function(parent,nextSibling) {
|
||||
this.parentDomNode = parent;
|
||||
this.computeAttributes();
|
||||
this.execute();
|
||||
@@ -36,7 +36,7 @@ SetVariableWidget.prototype.render = function(parent,nextSibling) {
|
||||
/*
|
||||
Compute the internal state of the widget
|
||||
*/
|
||||
SetVariableWidget.prototype.execute = function() {
|
||||
SetWidget.prototype.execute = function() {
|
||||
// Get our parameters
|
||||
this.setName = this.getAttribute("name","currentTiddler");
|
||||
this.setValue = this.getAttribute("value");
|
||||
@@ -49,7 +49,7 @@ SetVariableWidget.prototype.execute = function() {
|
||||
/*
|
||||
Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering
|
||||
*/
|
||||
SetVariableWidget.prototype.refresh = function(changedTiddlers) {
|
||||
SetWidget.prototype.refresh = function(changedTiddlers) {
|
||||
var changedAttributes = this.computeAttributes();
|
||||
if(changedAttributes.name || changedAttributes.value) {
|
||||
this.refreshSelf();
|
||||
@@ -59,6 +59,7 @@ SetVariableWidget.prototype.refresh = function(changedTiddlers) {
|
||||
}
|
||||
};
|
||||
|
||||
exports.setvariable = SetVariableWidget;
|
||||
exports.setvariable = SetWidget;
|
||||
exports.set = SetWidget;
|
||||
|
||||
})();
|
||||
|
||||
@@ -57,6 +57,12 @@ ViewWidget.prototype.execute = function() {
|
||||
case "htmlencoded":
|
||||
this.text = this.getValueAsHtmlEncoded();
|
||||
break;
|
||||
case "urlencoded":
|
||||
this.text = this.getValueAsUrlEncoded();
|
||||
break;
|
||||
case "doubleurlencoded":
|
||||
this.text = this.getValueAsDoubleUrlEncoded();
|
||||
break;
|
||||
case "date":
|
||||
this.text = this.getValueAsDate(this.viewTemplate);
|
||||
break;
|
||||
@@ -126,15 +132,28 @@ ViewWidget.prototype.getValueAsText = function() {
|
||||
};
|
||||
|
||||
ViewWidget.prototype.getValueAsHtmlWikified = function() {
|
||||
return this.wiki.renderText("text/html","text/vnd.tiddlywiki",this.getValueAsText(),this);
|
||||
return this.wiki.renderText("text/html","text/vnd.tiddlywiki",this.getValueAsText(),{parentWidget: this});
|
||||
};
|
||||
|
||||
ViewWidget.prototype.getValueAsHtmlEncoded = function() {
|
||||
return $tw.utils.htmlEncode(this.getValueAsText());
|
||||
};
|
||||
|
||||
ViewWidget.prototype.getValueAsUrlEncoded = function() {
|
||||
return encodeURIComponent(this.getValueAsText());
|
||||
};
|
||||
|
||||
ViewWidget.prototype.getValueAsDoubleUrlEncoded = function() {
|
||||
return encodeURIComponent(encodeURIComponent(this.getValueAsText()));
|
||||
};
|
||||
|
||||
ViewWidget.prototype.getValueAsDate = function(format) {
|
||||
return $tw.utils.formatDateString(this.getValue(),format);
|
||||
var value = this.getValue();
|
||||
if(value) {
|
||||
return $tw.utils.formatDateString(value,format);
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
};
|
||||
|
||||
ViewWidget.prototype.getValueAsRelativeDate = function(format) {
|
||||
|
||||
@@ -38,8 +38,10 @@ Widget.prototype.initialise = function(parseTreeNode,options) {
|
||||
// Save widget info
|
||||
this.parseTreeNode = parseTreeNode;
|
||||
this.wiki = options.wiki;
|
||||
this.variables = options.variables || {};
|
||||
this.parentWidget = options.parentWidget;
|
||||
this.variablesConstructor = function() {};
|
||||
this.variablesConstructor.prototype = this.parentWidget ? this.parentWidget.variables : {};
|
||||
this.variables = new this.variablesConstructor();
|
||||
this.document = options.document;
|
||||
this.attributes = {};
|
||||
this.children = [];
|
||||
@@ -67,6 +69,16 @@ Widget.prototype.execute = function() {
|
||||
this.makeChildWidgets();
|
||||
};
|
||||
|
||||
/*
|
||||
Set the value of a context variable
|
||||
name: name of the variable
|
||||
value: value of the variable
|
||||
params: array of {name:, default:} for each parameter
|
||||
*/
|
||||
Widget.prototype.setVariable = function(name,value,params) {
|
||||
this.variables[name] = {value: value, params: params};
|
||||
};
|
||||
|
||||
/*
|
||||
Get the prevailing value of a context variable
|
||||
name: name of variable
|
||||
@@ -78,19 +90,14 @@ defaultValue: default value if the variable is not defined
|
||||
Widget.prototype.getVariable = function(name,options) {
|
||||
options = options || {};
|
||||
var actualParams = options.params || [];
|
||||
// Search up the widget tree for the variable name
|
||||
var node = this;
|
||||
while(node && !$tw.utils.hop(node.variables,name)) {
|
||||
node = node.parentWidget;
|
||||
}
|
||||
// If we get to the root then look for a macro module
|
||||
if(!node) {
|
||||
// If the variable doesn't exist then look for a macro module
|
||||
if(!(name in this.variables)) {
|
||||
return this.evaluateMacroModule(name,actualParams,options.defaultValue);
|
||||
}
|
||||
// Get the value
|
||||
var value = node.variables[name].value || "";
|
||||
var variable = this.variables[name],
|
||||
value = variable.value || "";
|
||||
// Substitute any parameters specified in the definition
|
||||
value = this.substituteVariableParameters(value,node.variables[name].params,actualParams);
|
||||
value = this.substituteVariableParameters(value,variable.params,actualParams);
|
||||
value = this.substituteVariableReferences(value);
|
||||
return value;
|
||||
};
|
||||
@@ -166,16 +173,6 @@ Widget.prototype.evaluateMacroModule = function(name,actualParams,defaultValue)
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Set the value of a context variable
|
||||
name: name of the variable
|
||||
value: value of the variable
|
||||
params: array of {name:, default:} for each parameter
|
||||
*/
|
||||
Widget.prototype.setVariable = function(name,value,params) {
|
||||
this.variables[name] = {value: value, params: params};
|
||||
};
|
||||
|
||||
/*
|
||||
Check whether a given context variable value exists in the parent chain
|
||||
*/
|
||||
@@ -218,7 +215,7 @@ Widget.prototype.computeAttributes = function() {
|
||||
value = self.wiki.getTextReference(attribute.textReference,"",self.getVariable("currentTiddler"));
|
||||
} else if(attribute.type === "macro") {
|
||||
var text = self.getVariable(attribute.value.name,{params: attribute.value.params});
|
||||
value = self.wiki.renderText("text/plain","text/vnd.tiddlywiki",text);
|
||||
value = self.wiki.renderText("text/plain","text/vnd.tiddlywiki",text,{parentWidget: self});
|
||||
} else { // String attribute
|
||||
value = attribute.value;
|
||||
}
|
||||
|
||||
@@ -8,14 +8,12 @@ Extension methods for the $tw.Wiki object
|
||||
Adds the following properties to the wiki object:
|
||||
|
||||
* `eventListeners` is a hashmap by type of arrays of listener functions
|
||||
* `changedTiddlers` is a hashmap describing changes to named tiddlers since wiki change events were
|
||||
last dispatched. Each entry is a hashmap containing two fields:
|
||||
* `changedTiddlers` is a hashmap describing changes to named tiddlers since wiki change events were last dispatched. Each entry is a hashmap containing two fields:
|
||||
modified: true/false
|
||||
deleted: true/false
|
||||
* `changeCount` is a hashmap by tiddler title containing a numerical index that starts at zero and is
|
||||
incremented each time a tiddler is created changed or deleted
|
||||
* `caches` is a hashmap by tiddler title containing a further hashmap of named cache objects. Caches
|
||||
are automatically cleared when a tiddler is modified or deleted
|
||||
* `changeCount` is a hashmap by tiddler title containing a numerical index that starts at zero and is incremented each time a tiddler is created changed or deleted
|
||||
* `caches` is a hashmap by tiddler title containing a further hashmap of named cache objects. Caches are automatically cleared when a tiddler is modified or deleted
|
||||
* `globalCache` is a hashmap by cache name of cache objects that are cleared whenever any tiddler change occurs
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
@@ -163,6 +161,7 @@ exports.getChangeCount = function(title) {
|
||||
exports.deleteTiddler = function(title) {
|
||||
delete this.tiddlers[title];
|
||||
this.clearCache(title);
|
||||
this.clearGlobalCache();
|
||||
this.enqueueTiddlerEvent(title,true);
|
||||
};
|
||||
|
||||
@@ -207,6 +206,7 @@ exports.addTiddler = function(tiddler) {
|
||||
// Save the tiddler
|
||||
this.tiddlers[title] = tiddler;
|
||||
this.clearCache(title);
|
||||
this.clearGlobalCache();
|
||||
this.enqueueTiddlerEvent(title);
|
||||
};
|
||||
|
||||
@@ -425,15 +425,36 @@ exports.getShadowTitles = function() {
|
||||
Retrieves a list of the tiddler titles that are tagged with a given tag
|
||||
*/
|
||||
exports.getTiddlersWithTag = function(tag) {
|
||||
// Get the list associated with the tag
|
||||
var titles = [];
|
||||
for(var title in this.tiddlers) {
|
||||
var tiddler = this.tiddlers[title];
|
||||
if($tw.utils.isArray(tiddler.fields.tags) && tiddler.fields.tags.indexOf(tag) !== -1) {
|
||||
titles.push(title);
|
||||
var self = this;
|
||||
return this.getGlobalCache("taglist-" + tag,function() {
|
||||
var tagmap = self.getTagMap();
|
||||
return self.sortByList(tagmap[tag],tag);
|
||||
});
|
||||
};
|
||||
|
||||
/*
|
||||
Get a hashmap by tag of arrays of tiddler titles
|
||||
*/
|
||||
exports.getTagMap = function() {
|
||||
var self = this;
|
||||
return this.getGlobalCache("tagmap",function() {
|
||||
var tags = {};
|
||||
// Collect up all the tags
|
||||
for(var title in self.tiddlers) {
|
||||
var tiddler = self.tiddlers[title];
|
||||
if(tiddler.fields.tags) {
|
||||
for(var index=0; index<tiddler.fields.tags.length; index++) {
|
||||
var tag = tiddler.fields.tags[index];
|
||||
if(tags[tag]) {
|
||||
tags[tag].push(title)
|
||||
} else {
|
||||
tags[tag] = [title];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return this.sortByList(titles,tag);
|
||||
return tags;
|
||||
});
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -456,7 +477,9 @@ Sorts an array of tiddler titles according to an ordered list
|
||||
*/
|
||||
exports.sortByList = function(array,listTitle) {
|
||||
var list = this.getTiddlerList(listTitle);
|
||||
if(list) {
|
||||
if(!array || array.length === 0) {
|
||||
return [];
|
||||
} else if(list) {
|
||||
var titles = [], t, title;
|
||||
// First place any entries that are present in the list
|
||||
for(t=0; t<list.length; t++) {
|
||||
@@ -557,6 +580,21 @@ exports.getTiddlerList = function(title) {
|
||||
return [];
|
||||
};
|
||||
|
||||
// Return a named global cache object. Global cache objects are cleared whenever a tiddler change occurs
|
||||
exports.getGlobalCache = function(cacheName,initializer) {
|
||||
this.globalCache = this.globalCache || {};
|
||||
if($tw.utils.hop(this.globalCache,cacheName)) {
|
||||
return this.globalCache[cacheName];
|
||||
} else {
|
||||
this.globalCache[cacheName] = initializer();
|
||||
return this.globalCache[cacheName];
|
||||
}
|
||||
};
|
||||
|
||||
exports.clearGlobalCache = function() {
|
||||
this.globalCache = {};
|
||||
}
|
||||
|
||||
// Return the named cache object for a tiddler. If the cache doesn't exist then the initializer function is invoked to create it
|
||||
exports.getCacheForTiddler = function(title,cacheName,initializer) {
|
||||
|
||||
@@ -654,7 +692,7 @@ var tweakParseTreeNodes = function(nodeList) {
|
||||
|
||||
var tweakMacroDefinition = function(nodeList) {
|
||||
if(nodeList && nodeList[0] && nodeList[0].type === "macrodef") {
|
||||
nodeList[0].type = "setvariable";
|
||||
nodeList[0].type = "set";
|
||||
nodeList[0].attributes = {
|
||||
name: {type: "string", value: nodeList[0].name},
|
||||
value: {type: "string", value: nodeList[0].text}
|
||||
@@ -726,10 +764,10 @@ exports.makeWidget = function(parser,options) {
|
||||
children: []
|
||||
},
|
||||
currWidgetNode = widgetNode;
|
||||
// Create setvariable widgets for each variable
|
||||
// Create set variable widgets for each variable
|
||||
$tw.utils.each(options.variables,function(value,name) {
|
||||
var setVariableWidget = {
|
||||
type: "setvariable",
|
||||
type: "set",
|
||||
attributes: {
|
||||
name: {type: "string", value: name},
|
||||
value: {type: "string", value: value}
|
||||
@@ -761,7 +799,7 @@ parentWidget: optional parent widget for the root node
|
||||
*/
|
||||
exports.renderText = function(outputType,textType,text,options) {
|
||||
options = options || {};
|
||||
var parser = $tw.wiki.parseText(textType,text),
|
||||
var parser = this.parseText(textType,text,options),
|
||||
widgetNode = this.makeWidget(parser,options);
|
||||
var container = $tw.document.createElement("div");
|
||||
widgetNode.render(container,null);
|
||||
@@ -878,7 +916,7 @@ exports.search = function(text,options) {
|
||||
// Function to check a given tiddler for the search term
|
||||
var searchTiddler = function(title) {
|
||||
if(!searchTermsRegExps) {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
var tiddler = self.getTiddler(title);
|
||||
if(!tiddler) {
|
||||
|
||||
3
core/ui/ControlPanel.tid
Normal file
3
core/ui/ControlPanel.tid
Normal file
@@ -0,0 +1,3 @@
|
||||
title: $:/ControlPanel
|
||||
|
||||
<div class="tw-control-panel"><<tabs "[is[shadow]!has[draft.of]tag[$:/tags/ControlPanel]] [!is[shadow]!has[draft.of]tag[$:/tags/ControlPanel]]" "$:/core/ui/ControlPanel/Basics">></div>
|
||||
11
core/ui/ControlPanel/Appearance.tid
Normal file
11
core/ui/ControlPanel/Appearance.tid
Normal file
@@ -0,0 +1,11 @@
|
||||
title: $:/core/ui/ControlPanel/Appearance
|
||||
tags: $:/tags/ControlPanel
|
||||
caption: Appearance
|
||||
|
||||
! Theme
|
||||
|
||||
{{$:/snippets/themeswitcher}}
|
||||
|
||||
! Story View
|
||||
|
||||
{{$:/snippets/viewswitcher}}
|
||||
23
core/ui/ControlPanel/Basics.tid
Normal file
23
core/ui/ControlPanel/Basics.tid
Normal file
@@ -0,0 +1,23 @@
|
||||
title: $:/core/ui/ControlPanel/Basics
|
||||
tags: $:/tags/ControlPanel
|
||||
caption: Basics
|
||||
|
||||
! Settings
|
||||
|
||||
|[[Title of this TiddlyWiki|SiteTitle]] |<$edit-text tiddler="SiteTitle" default="" tag="input"/> |
|
||||
|[[Subtitle|SiteSubtitle]] |<$edit-text tiddler="SiteSubtitle" default="" tag="input"/> |
|
||||
|[[Username for signing edits|$:/status/UserName]] |<$edit-text tiddler="$:/status/UserName" default="" tag="input"/> |
|
||||
|[[Animation duration|$:/config/AnimationDuration]] |<$edit-text tiddler="$:/config/AnimationDuration" default="" tag="input"/> |
|
||||
|[[DefaultTiddlers|$:/DefaultTiddlers]] |Choose which tiddlers are displayed at startup:<br> <$edit-text tag="textarea" tiddler="$:/DefaultTiddlers"/> |
|
||||
|
||||
! Info
|
||||
|
||||
!! Your Stuff
|
||||
|
||||
* Number of tiddlers: <$count filter="[!is[system]]"/>
|
||||
|
||||
!! TiddlyWiki's Stuff
|
||||
|
||||
* Number of system tiddlers: <$count filter="[is[system]]"/>
|
||||
* Number of shadow tiddlers: <$count filter="[is[shadow]]"/>
|
||||
** Number of over-ridden shadow tiddlers: <$count filter="[!is[system]is[shadow]]"/>
|
||||
5
core/ui/ControlPanel/Encryption.tid
Normal file
5
core/ui/ControlPanel/Encryption.tid
Normal file
@@ -0,0 +1,5 @@
|
||||
title: $:/core/ui/ControlPanel/Encryption
|
||||
tags: $:/tags/ControlPanel
|
||||
caption: Encryption
|
||||
|
||||
{{$:/snippets/encryptionstatus}}
|
||||
@@ -1,6 +1,6 @@
|
||||
title: $:/ConfigInfo
|
||||
|
||||
This tiddler displays the internal configuration of this wiki, which can be useful for troubleshooting, or just to help understand how TiddlyWiki5 works.
|
||||
title: $:/core/ui/ControlPanel/Internals
|
||||
tags: $:/tags/ControlPanel
|
||||
caption: Internals
|
||||
|
||||
! Tiddler fields
|
||||
|
||||
7
core/ui/ControlPanel/Plugins.tid
Normal file
7
core/ui/ControlPanel/Plugins.tid
Normal file
@@ -0,0 +1,7 @@
|
||||
title: $:/core/ui/ControlPanel/Plugins
|
||||
tags: $:/tags/ControlPanel
|
||||
caption: Plugins
|
||||
|
||||
<table><tbody><tr><th>Title</th><th>Description</th></tr><$list filter="[!has[draft.of]has[plugin-type]sort[title]]"><tr><td><$link to={{!!title}}><$view field="title"/></$link></td><td><$view field="description"/></td></tr></$list>
|
||||
</tbody>
|
||||
</table>
|
||||
9
core/ui/ControlPanel/Tools.tid
Normal file
9
core/ui/ControlPanel/Tools.tid
Normal file
@@ -0,0 +1,9 @@
|
||||
title: $:/core/ui/ControlPanel/Tools
|
||||
tags: $:/tags/ControlPanel
|
||||
caption: Tools
|
||||
|
||||
! Import
|
||||
|
||||
<$browse/>
|
||||
|
||||
Browse for files on your computer to import their contents (the individual tiddlers within TiddlyWiki HTML files are imported separately). You can also drag and drop files directly to the browser window.
|
||||
@@ -2,30 +2,6 @@ title: $:/core/ui/EditTemplate
|
||||
modifier: JeremyRuston
|
||||
|
||||
\define frame-classes()
|
||||
tw-tiddler-frame $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$
|
||||
tw-tiddler-frame tw-tiddler-edit-frame $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$
|
||||
\end
|
||||
<div class=<<frame-classes>>><span class="tw-tiddler-controls titlebar"> <$button message="tw-delete-tiddler" class="btn-invisible">{{$:/core/images/delete-button}}</$button> <$button message="tw-cancel-tiddler" class="btn-invisible">{{$:/core/images/cancel-button}}</$button> <$button message="tw-save-tiddler" class="btn-invisible">{{$:/core/images/done-button}}</$button> </span>
|
||||
|
||||
<$view field="title"/>
|
||||
|
||||
<$edit-text field="draft.title" class="titlebar tw-edit-texteditor"/>
|
||||
|
||||
<$transclude tiddler="$:/core/ui/TagsEditor"/>
|
||||
|
||||
<$reveal state="$:/ShowEditPreview" type="match" text="yes">
|
||||
<$transclude tiddler="$:/core/ui/EditorHint"/> <$button type="set" set="$:/ShowEditPreview" setTo="no">hide preview</$button>
|
||||
<div class="tw-tiddler-preview">
|
||||
<div class="tw-tiddler-preview-preview">
|
||||
<$transclude />
|
||||
</div>
|
||||
<div class="tw-tiddler-preview-edit">
|
||||
<$edit field="text" class="tw-edit-texteditor"/>
|
||||
</div>
|
||||
</div>
|
||||
</$reveal>
|
||||
<$reveal state="$:/ShowEditPreview" type="nomatch" text="yes">
|
||||
<$transclude tiddler="$:/core/ui/EditorHint"/> <$button type="set" set="$:/ShowEditPreview" setTo="yes">show preview</$button>
|
||||
<$edit field="text" class="tw-edit-texteditor"/>
|
||||
</$reveal>
|
||||
|
||||
<$transclude tiddler="$:/core/ui/FieldEditor"/></div>
|
||||
<div class=<<frame-classes>>><$list filter="[is[shadow]!has[draft.of]tag[$:/tags/EditTemplate]] [!is[shadow]!has[draft.of]tag[$:/tags/EditTemplate]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list></div>
|
||||
|
||||
18
core/ui/EditTemplate/body.tid
Normal file
18
core/ui/EditTemplate/body.tid
Normal file
@@ -0,0 +1,18 @@
|
||||
title: $:/core/ui/EditTemplate/body
|
||||
tags: $:/tags/EditTemplate
|
||||
|
||||
<$reveal state="$:/ShowEditPreview" type="match" text="yes">
|
||||
//<$transclude tiddler="$:/core/ui/EditorHint"/>// <$button type="set" set="$:/ShowEditPreview" setTo="no">hide preview</$button>
|
||||
<div class="tw-tiddler-preview">
|
||||
<div class="tw-tiddler-preview-preview">
|
||||
<$transclude />
|
||||
</div>
|
||||
<div class="tw-tiddler-preview-edit">
|
||||
<$edit field="text" class="tw-edit-texteditor"/>
|
||||
</div>
|
||||
</div>
|
||||
</$reveal>
|
||||
<$reveal state="$:/ShowEditPreview" type="nomatch" text="yes">
|
||||
//<$transclude tiddler="$:/core/ui/EditorHint"/>// <$button type="set" set="$:/ShowEditPreview" setTo="yes">show preview</$button>
|
||||
<$edit field="text" class="tw-edit-texteditor"/>
|
||||
</$reveal>
|
||||
4
core/ui/EditTemplate/controls.tid
Normal file
4
core/ui/EditTemplate/controls.tid
Normal file
@@ -0,0 +1,4 @@
|
||||
title: $:/core/ui/EditTemplate/controls
|
||||
tags: $:/tags/EditTemplate
|
||||
|
||||
<span class="tw-tiddler-controls titlebar"> <$list filter="[is[shadow]!has[draft.of]tag[$:/tags/EditToolbar]] [!is[shadow]!has[draft.of]tag[$:/tags/EditToolbar]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list> </span>
|
||||
14
core/ui/EditTemplate/fields.tid
Normal file
14
core/ui/EditTemplate/fields.tid
Normal file
@@ -0,0 +1,14 @@
|
||||
title: $:/core/ui/EditTemplate/fields
|
||||
tags: $:/tags/EditTemplate
|
||||
|
||||
<$fieldmangler><div class="tw-edit-fields">
|
||||
<table class="tw-edit-fields"><tbody><$list filter="[is[current]fields[]] -title -tags -text -creator -created -modified -modifier -type -[[draft.title]] -[[draft.of]]" variable="currentField"><tr class="tw-edit-field"><td class="tw-edit-field-name"><<currentField>>:</td><td class="tw-edit-field-value"><$edit-text tiddler=<<currentTiddler>> field=<<currentField>> placeholder="field value"/></td><td class="tw-edit-field-remove"><$button message="tw-remove-field" param=<<currentField>> class="btn-invisible">{{$:/core/images/delete-button}}</$button></td>
|
||||
</tr>
|
||||
</$list>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="tw-edit-field-add">//Add a new field:// <span class="tw-edit-field-add-name"><$edit-text tiddler="$:/NewFieldName" tag="input" default="" placeholder="field name" class="tw-edit-texteditor"/></span> <span class="tw-edit-field-add-button"><$button message="tw-add-field" param={{$:/NewFieldName}} set="$:/NewFieldName" setTo="" class="">add</$button></span></div>
|
||||
|
||||
</$fieldmangler>
|
||||
22
core/ui/EditTemplate/tags.tid
Normal file
22
core/ui/EditTemplate/tags.tid
Normal file
@@ -0,0 +1,22 @@
|
||||
title: $:/core/ui/EditTemplate/tags
|
||||
tags: $:/tags/EditTemplate
|
||||
|
||||
\define tag-styles()
|
||||
background-color:$(backgroundColor)$;
|
||||
\end
|
||||
<$fieldmangler><div class="tw-edit-tags-list"><$list filter="[is[current]tags[]sort[title]]" storyview="pop" itemClass="tw-tag-editor-label"><$set name="backgroundColor" value={{!!color}}><span style=<<tag-styles>> class="tw-tag-label"><$view field="title" format="text" /><$button message="tw-remove-tag" param={{!!title}} class="btn-invisible tw-remove-tag-button">×</$button></span></$set>
|
||||
</$list></div>
|
||||
|
||||
<div class="tw-add-tag">//Add a new tag:// <span class="tw-add-tag-name"><$edit-text tiddler="$:/NewTagName" tag="input" default="" placeholder="tag name" focusPopup=<<qualify "$:/state/tagsAutoComplete">> class="tw-edit-texteditor"/></span> <$button popup=<<qualify "$:/state/tagsAutoComplete">> class="btn-invisible btn-dropdown">{{$:/core/images/down-arrow}}</$button> <span class="tw-add-tag-button"><$button message="tw-add-tag" param={{$:/NewTagName}} set="$:/NewTagName" setTo="" class="">add</$button></span></div>
|
||||
|
||||
<div class="tw-block-dropdown-wrapper">
|
||||
<$reveal state=<<qualify "$:/state/tagsAutoComplete">> type="nomatch" text="" default="">
|
||||
<div class="tw-block-dropdown">
|
||||
<$linkcatcher set="$:/NewTagName" setTo="" message="tw-add-tag"><$list filter="[!is[shadow]tags[]search{$:/NewTagName}sort[title]]"><$link><$set name="backgroundColor" value={{!!color}}><span style=<<tag-styles>> class="tw-tag-label"><$view field="title" format="text"/></span></$set></$link>
|
||||
</$list>
|
||||
</$linkcatcher>
|
||||
</div>
|
||||
|
||||
</$reveal>
|
||||
</div>
|
||||
</$fieldmangler>
|
||||
6
core/ui/EditTemplate/title.tid
Normal file
6
core/ui/EditTemplate/title.tid
Normal file
@@ -0,0 +1,6 @@
|
||||
title: $:/core/ui/EditTemplate/title
|
||||
tags: $:/tags/EditTemplate
|
||||
|
||||
<$view field="title"/>
|
||||
|
||||
<$edit-text field="draft.title" class="titlebar tw-edit-texteditor"/>
|
||||
15
core/ui/EditTemplate/type.tid
Normal file
15
core/ui/EditTemplate/type.tid
Normal file
@@ -0,0 +1,15 @@
|
||||
title: $:/core/ui/EditTemplate/type
|
||||
tags: $:/tags/EditTemplate
|
||||
|
||||
<p>//Type:// <$edit-text field="type" tag="input" default="" placeholder="type" focusPopup=<<qualify "$:/state/typeDropdown">> class="tw-edit-typeeditor"/> <$button popup=<<qualify "$:/state/typeDropdown">> class="btn-invisible btn-dropdown">{{$:/core/images/down-arrow}}</$button></p>
|
||||
|
||||
<div class="tw-block-dropdown-wrapper">
|
||||
<$reveal state=<<qualify "$:/state/typeDropdown">> type="nomatch" text="" default="">
|
||||
<div class="tw-block-dropdown tw-edit-type-dropdown">
|
||||
<$linkcatcher to="!!type">
|
||||
<$list filter="[is[shadow]prefix[$:/docs/types/]] [!is[shadow]prefix[$:/docs/types/]] +[sort[description]]"><$link to={{!!name}}><$view field="description"/> (<$view field="name"/>)</$link>
|
||||
</$list>
|
||||
</$linkcatcher>
|
||||
</div>
|
||||
</$reveal>
|
||||
</div>
|
||||
4
core/ui/EditToolbar/cancel.tid
Normal file
4
core/ui/EditToolbar/cancel.tid
Normal file
@@ -0,0 +1,4 @@
|
||||
title: $:/core/ui/EditToolbar/cancel
|
||||
tags: $:/tags/EditToolbar
|
||||
|
||||
<$button message="tw-cancel-tiddler" class="btn-invisible">{{$:/core/images/cancel-button}}</$button>
|
||||
4
core/ui/EditToolbar/delete.tid
Normal file
4
core/ui/EditToolbar/delete.tid
Normal file
@@ -0,0 +1,4 @@
|
||||
title: $:/core/ui/EditToolbar/delete
|
||||
tags: $:/tags/EditToolbar
|
||||
|
||||
<$button message="tw-delete-tiddler" class="btn-invisible">{{$:/core/images/delete-button}}</$button>
|
||||
4
core/ui/EditToolbar/save.tid
Normal file
4
core/ui/EditToolbar/save.tid
Normal file
@@ -0,0 +1,4 @@
|
||||
title: $:/core/ui/EditToolbar/save
|
||||
tags: $:/tags/EditToolbar
|
||||
|
||||
<$button message="tw-save-tiddler" class="btn-invisible">{{$:/core/images/done-button}}</$button>
|
||||
@@ -1,3 +1,3 @@
|
||||
title: $:/core/ui/EditorHint
|
||||
|
||||
<span class="tw-tiddler-help">Use WikiText to add formatting, images, and dynamic features</span>
|
||||
Use WikiText to add formatting, images, and dynamic features
|
||||
@@ -1,13 +0,0 @@
|
||||
title: $:/core/ui/FieldEditor
|
||||
|
||||
<$fieldmangler><div class="tw-edit-fields">
|
||||
<table class="tw-edit-fields"><tbody><$list filter="[is[current]fields[]] -title -tags -text -creator -created -modified -modifier -[[draft.title]] -[[draft.of]]" variable="currentField"><tr class="tw-edit-field"><td class="tw-edit-field-name"><<currentField>>:</td><td class="tw-edit-field-value"><$edit-text tiddler=<<currentTiddler>> field=<<currentField>> placeholder="field value"/></td><td class="tw-edit-field-remove"><$button message="tw-remove-field" param=<<currentField>> class="btn-invisible">{{$:/core/images/delete-button}}</$button></td>
|
||||
</tr>
|
||||
</$list>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="tw-edit-field-add">Add a new field: <span class="tw-edit-field-add-name"><$edit-text tiddler="$:/NewFieldName" tag="input" default="" placeholder="field name" class="tw-edit-texteditor"/></span> <span class="tw-edit-field-add-button"><$button message="tw-add-field" param={{$:/NewFieldName}} set="$:/NewFieldName" setTo="" class="">add</$button></span></div>
|
||||
|
||||
</$fieldmangler>
|
||||
4
core/ui/PageControls/controlpanel.tid
Normal file
4
core/ui/PageControls/controlpanel.tid
Normal file
@@ -0,0 +1,4 @@
|
||||
title: $:/core/ui/PageControls/control-panel
|
||||
tags: $:/tags/PageControls
|
||||
|
||||
<$link to="$:/ControlPanel">{{$:/core/images/options-button}}</$link>
|
||||
4
core/ui/PageControls/newtiddler.tid
Normal file
4
core/ui/PageControls/newtiddler.tid
Normal file
@@ -0,0 +1,4 @@
|
||||
title: $:/core/ui/PageControls/new-tiddler
|
||||
tags: $:/tags/PageControls
|
||||
|
||||
<$button message="tw-new-tiddler" class="btn-invisible">{{$:/core/images/new-button}}</$button>
|
||||
4
core/ui/PageControls/savewiki.tid
Normal file
4
core/ui/PageControls/savewiki.tid
Normal file
@@ -0,0 +1,4 @@
|
||||
title: $:/core/ui/PageControls/save-wiki
|
||||
tags: $:/tags/PageControls
|
||||
|
||||
<$button message="tw-save-wiki" class="btn-invisible">{{$:/core/images/save-button}}</$button>
|
||||
@@ -1,6 +1,6 @@
|
||||
title: $:/core/ui/PageMacros
|
||||
|
||||
\define tabs(tabsList,default,state:"$:/currentTab")
|
||||
\define tabs(tabsList,default,state:"$:/state/tab")
|
||||
<div class="tw-tab-buttons"><$list filter="$tabsList$" variable="currentTab"><$button set=<<qualify "$state$">> setTo=<<currentTab>> default="$default$" selectedClass="tw-tab-selected"><$view tiddler=<<currentTab>> field="caption"><$macrocall $name="currentTab" $type="text/plain" $output="text/plain"/></$view> </$button>
|
||||
</$list>
|
||||
</div>
|
||||
|
||||
@@ -12,10 +12,12 @@ title: $:/core/ui/PageTemplate
|
||||
{{$:/LeftSideBar}}
|
||||
|
||||
<!-- The sidebar header -->
|
||||
<header class="sidebar-header"><div class="titlebar">{{SiteTitle}}</div><div class="tw-subtitle">{{SiteSubtitle}}</div>
|
||||
<header class="sidebar-header">
|
||||
<div class="titlebar">{{SiteTitle}}</div>
|
||||
<div class="tw-subtitle">{{SiteSubtitle}}</div>
|
||||
|
||||
<div class="tw-page-controls">
|
||||
<$button message="tw-new-tiddler" class="btn-invisible">{{$:/core/images/new-button}}</$button><$link to="$:/ControlPanel">{{$:/core/images/options-button}}</$link><$button message="tw-save-wiki" class="btn-invisible">{{$:/core/images/save-button}}</$button>
|
||||
<$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}}
|
||||
|
||||
@@ -24,7 +24,7 @@ title: $:/core/ui/SideBar
|
||||
|
||||
<$reveal state="$:/temp/search" type="match" text="">
|
||||
|
||||
<<tabs "[is[shadow]!has[draft.of]tag[$:/tags/SideBar]] [!is[shadow]!has[draft.of]tag[$:/tags/SideBar]]" "$:/core/ui/SideBar/Open" "$:/sidebartab">>
|
||||
<<tabs "[is[shadow]!has[draft.of]tag[$:/tags/SideBar]] [!is[shadow]!has[draft.of]tag[$:/tags/SideBar]]" "$:/core/ui/SideBar/Open" "$:/state/tab/sidebar">>
|
||||
|
||||
</$reveal>
|
||||
</div>
|
||||
|
||||
@@ -3,5 +3,5 @@ tags: $:/tags/SideBar
|
||||
caption: More
|
||||
|
||||
<div class="tw-more-sidebar">
|
||||
<<tabs "[is[shadow]!has[draft.of]tag[$:/tags/MoreSideBar]] [!is[shadow]!has[draft.of]tag[$:/tags/MoreSideBar]]" "$:/core/ui/MoreSideBar/Open" "$:/moresidebartab">>
|
||||
<<tabs "[is[shadow]!has[draft.of]tag[$:/tags/MoreSideBar]] [!is[shadow]!has[draft.of]tag[$:/tags/MoreSideBar]]" "$:/core/ui/MoreSideBar/Open" "$:/state/tab/moresidebar">>
|
||||
</div>
|
||||
|
||||
@@ -2,10 +2,6 @@ title: $:/core/ui/SideBar/Tools
|
||||
tags: $:/tags/SideBar
|
||||
caption: Tools
|
||||
|
||||
[[Wiki Info|$:/WikiInfo]]
|
||||
|
||||
---
|
||||
|
||||
{{$:/snippets/viewswitcher}}
|
||||
|
||||
---
|
||||
|
||||
@@ -3,7 +3,7 @@ title: $:/core/ui/TagTemplate
|
||||
\define tag-styles()
|
||||
background-color:$(backgroundColor)$;
|
||||
\end
|
||||
<span class="tw-tag-list-item"><$setvariable name="backgroundColor" value={{!!color}}><$button popup=<<qualify "$:/state/tagpopup">> class="btn-invisible tw-tag-label" style=<<tag-styles>>><$transclude tiddler={{!!icon}}/> <$view field="title" format="text" /></$button></$setvariable>
|
||||
<span class="tw-tag-list-item"><$set name="backgroundColor" value={{!!color}}><$button popup=<<qualify "$:/state/tagpopup">> class="btn-invisible tw-tag-label" style=<<tag-styles>>><$transclude tiddler={{!!icon}}/> <$view field="title" format="text" /></$button></$set>
|
||||
<$reveal state=<<qualify "$:/state/tagpopup">> type="popup" position="below" animate="yes"><div class="tw-drop-down"><$transclude tiddler="$:/core/ui/ListItemTemplate"/>
|
||||
<hr>
|
||||
<$list filter="[is[current]tagging[]]" template="$:/core/ui/ListItemTemplate"/>
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
title: $:/core/ui/TagsEditor
|
||||
|
||||
\define tag-styles()
|
||||
background-color:$(backgroundColor)$;
|
||||
\end
|
||||
<$fieldmangler><div class="tw-edit-tags-list"><$list filter="[is[current]tags[]sort[title]]" storyview="pop" itemClass="tw-tag-editor-label"><$setvariable name="backgroundColor" value={{!!color}}><span style=<<tag-styles>> class="tw-tag-label"><$view field="title" format="text" /><$button message="tw-remove-tag" param={{!!title}} class="btn-invisible tw-remove-tag-button">×</$button></span></$setvariable>
|
||||
</$list></div>
|
||||
|
||||
<div class="tw-add-tag">Add a new tag: <span class="tw-add-tag-name"><$edit-text tiddler="$:/NewTagName" tag="input" default="" placeholder="tag name" focusPopup=<<qualify "$:/state/tagsAutoComplete">> class="tw-edit-texteditor"/></span> <$button popup=<<qualify "$:/state/tagsAutoComplete">> class="btn-invisible">{{$:/core/images/down-arrow}}</$button> <span class="tw-add-tag-button"><$button message="tw-add-tag" param={{$:/NewTagName}} set="$:/NewTagName" setTo="" class="">add</$button></span></div>
|
||||
|
||||
<div class="tw-tags-autocomplete-wrapper">
|
||||
<$reveal state=<<qualify "$:/state/tagsAutoComplete">> type="nomatch" text="" default="">
|
||||
<div class="tw-tags-autocomplete">
|
||||
<$linkcatcher set="$:/NewTagName" setTo="" message="tw-add-tag"><$list filter="[!is[shadow]tags[]search{$:/NewTagName}sort[title]]"><$link><$setvariable name="backgroundColor" value={{!!color}}><span style=<<tag-styles>> class="tw-tag-label"><$view field="title" format="text"/></span></$setvariable></$link>
|
||||
</$list>
|
||||
</$linkcatcher>
|
||||
</div>
|
||||
|
||||
</$reveal>
|
||||
</div>
|
||||
</$fieldmangler>
|
||||
@@ -4,6 +4,6 @@ modifier: JeremyRuston
|
||||
\define frame-classes()
|
||||
tw-tiddler-frame $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$
|
||||
\end
|
||||
<$tiddler tiddler=<<currentTiddler>>><div class=<<frame-classes>>><$list filter="[is[shadow]!has[draft.of]tag[$:/tags/ViewTemplate]] [!is[shadow]!has[draft.of]tag[$:/tags/ViewTemplate]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list>
|
||||
<$set name="tiddlerInfoState" value=<<qualify "$:/state/tiddlerInfo">>><$tiddler tiddler=<<currentTiddler>>><div class=<<frame-classes>>><$list filter="[is[shadow]!has[draft.of]tag[$:/tags/ViewTemplate]] [!is[shadow]!has[draft.of]tag[$:/tags/ViewTemplate]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list>
|
||||
</div>
|
||||
</$tiddler>
|
||||
</$tiddler></$set>
|
||||
|
||||
@@ -4,11 +4,11 @@ tags: $:/tags/ViewTemplate
|
||||
\define title-styles()
|
||||
fill:$(foregroundColor)$;
|
||||
\end
|
||||
<div class="tw-tiddler-title"><div class="titlebar"><span class="tw-tiddler-controls"><$button popup=<<qualify "$:/state/tiddlerInfo">> class="btn-invisible" selectedClass="tw-selected">{{$:/core/images/info-button}}</$button><$button message="tw-edit-tiddler" class="btn-invisible">{{$:/core/images/edit-button}}</$button><$button message="tw-close-tiddler" class="btn-invisible">{{$:/core/images/close-button}}</$button>
|
||||
<div class="tw-tiddler-title"><div class="titlebar"><span class="tw-tiddler-controls"><$list filter="[is[shadow]!has[draft.of]tag[$:/tags/ViewToolbar]] [!is[shadow]!has[draft.of]tag[$:/tags/ViewToolbar]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list>
|
||||
|
||||
</span><$setvariable name="foregroundColor" value={{!!color}}><span style=<<title-styles>>><$transclude tiddler={{!!icon}}/></span></$setvariable> <span class="title"><$view field="title"/></span></div>
|
||||
</span><$set name="foregroundColor" value={{!!color}}><span style=<<title-styles>>><$transclude tiddler={{!!icon}}/></span></$set> <span class="title"><$view field="title"/></span></div>
|
||||
|
||||
<$reveal type="nomatch" text="" default="" state=<<qualify "$:/state/tiddlerInfo">> class="tw-tiddler-info" animate="yes">
|
||||
<$reveal type="nomatch" text="" default="" state=<<tiddlerInfoState>> class="tw-tiddler-info tw-popup" animate="yes">
|
||||
|
||||
<$transclude tiddler="$:/core/ui/TiddlerInfo"/>
|
||||
|
||||
|
||||
4
core/ui/ViewToolbar/close.tid
Normal file
4
core/ui/ViewToolbar/close.tid
Normal file
@@ -0,0 +1,4 @@
|
||||
title: $:/core/ui/ViewToolbar/close
|
||||
tags: $:/tags/ViewToolbar
|
||||
|
||||
<$button message="tw-close-tiddler" class="btn-invisible">{{$:/core/images/close-button}}</$button>
|
||||
4
core/ui/ViewToolbar/edit.tid
Normal file
4
core/ui/ViewToolbar/edit.tid
Normal file
@@ -0,0 +1,4 @@
|
||||
title: $:/core/ui/ViewToolbar/edit
|
||||
tags: $:/tags/ViewToolbar
|
||||
|
||||
<$button message="tw-edit-tiddler" class="btn-invisible">{{$:/core/images/edit-button}}</$button>
|
||||
4
core/ui/ViewToolbar/info.tid
Normal file
4
core/ui/ViewToolbar/info.tid
Normal file
@@ -0,0 +1,4 @@
|
||||
title: $:/core/ui/ViewToolbar/info
|
||||
tags: $:/tags/ViewToolbar
|
||||
|
||||
<$button popup=<<tiddlerInfoState>> class="btn-invisible" selectedClass="tw-selected">{{$:/core/images/info-button}}</$button>
|
||||
@@ -1,28 +0,0 @@
|
||||
title: $:/ControlPanel
|
||||
|
||||
''Initial setup''
|
||||
|
||||
| ![[Title of this TiddlyWiki|SiteTitle]]|<$edit-text tiddler="SiteTitle" default="" tag="input"/> |
|
||||
| ![[Subtitle|SiteSubtitle]]|<$edit-text tiddler="SiteSubtitle" default="" tag="input"/> |
|
||||
| ![[Username for signing edits|$:/status/UserName]]|<$edit-text tiddler="$:/status/UserName" default="" tag="input"/> |
|
||||
| ![[Animation duration|$:/config/AnimationDuration]]|<$edit-text tiddler="$:/config/AnimationDuration" default="" tag="input"/> |
|
||||
|
||||
Edit [[DefaultTiddlers|$:/DefaultTiddlers]] to choose which tiddlers are displayed at startup
|
||||
|
||||
{{$:/snippets/encryptionstatus}}
|
||||
|
||||
''Add plugins and tiddlers to your ~TiddlyWiki''
|
||||
|
||||
:Browse for files on your computer to import their contents (the individual tiddlers within TiddlyWiki HTML files are imported separately). <$browse/>
|
||||
|
||||
''Visual appearance''
|
||||
|
||||
*{{$:/snippets/viewswitcher}}
|
||||
*{{$:/snippets/themeswitcher}}
|
||||
*Edit [[ThemeTweaks|$:/ControlPanel/ThemeTweaks]] to change the appearance of your ~TiddlyWiki
|
||||
|
||||
''Additional information about this ~TiddlyWiki''
|
||||
|
||||
*~TiddlyWiki5 version <<version>>
|
||||
*[[Wiki Info|$:/WikiInfo]]
|
||||
*[[Internal configuration information|$:/ConfigInfo]]
|
||||
@@ -1,6 +0,0 @@
|
||||
title: $:/WikiInfo
|
||||
|
||||
* Tiddlers: <$count filter="[!is[system]]"/>
|
||||
* System tiddlers: <$count filter="[is[system]]"/>
|
||||
* Shadow tiddlers: <$count filter="[is[shadow]]"/>
|
||||
** Over-ridden shadow tiddlers: <$count filter="[!is[system]is[shadow]]"/>
|
||||
@@ -4,8 +4,8 @@ title: $:/snippets/modules
|
||||
{{$:/docs/moduletypes/$type$}}
|
||||
\end
|
||||
<$list filter="[moduletypes[]]">
|
||||
!! <<listItem>>
|
||||
<$macrocall $name="describeModuleType" type=<<listItem>>/>
|
||||
!! <$macrocall $name="currentTiddler" $type="text/plain" $output="text/plain"/>
|
||||
<$macrocall $name="describeModuleType" type=<<currentTiddler>>/>
|
||||
<ul><$list filter="[is[current]modules[]]"><li><$link><<currentTiddler>></$link>
|
||||
</li>
|
||||
</$list>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
title: $:/moresidebartab-{$:/core/ui/SideBar|$:/core/ui/SideBar/More||}{$:/core/ui/SideBar|$:/core/ui/SideBar||}{$:/core/ui/PageTemplate|$:/core/ui/PageTemplate||}
|
||||
title: $:/state/tab/moresidebar-{$:/core/ui/SideBar|$:/core/ui/SideBar/More||}{$:/core/ui/SideBar|$:/core/ui/SideBar||}{$:/core/ui/PageTemplate|$:/core/ui/PageTemplate||}
|
||||
|
||||
$:/core/ui/MoreSideBar/Tags
|
||||
@@ -1,3 +1,3 @@
|
||||
title: $:/state/sideBarTabSet-{$:/core/ui/SideBar|$:/core/ui/SideBar||}{$:/core/ui/PageTemplate|$:/core/ui/PageTemplate||}
|
||||
title: $:/state/tab/sidebar-{$:/core/ui/SideBar|$:/core/ui/SideBar||}{$:/core/ui/PageTemplate|$:/core/ui/PageTemplate||}
|
||||
|
||||
$:/core/ui/SideBar/Open
|
||||
2
core/wiki/tags/ControlPanel.tid
Normal file
2
core/wiki/tags/ControlPanel.tid
Normal file
@@ -0,0 +1,2 @@
|
||||
title: $:/tags/ControlPanel
|
||||
list: $:/core/ui/ControlPanel/Basics $:/core/ui/ControlPanel/Appearance $:/core/ui/ControlPanel/Encryption $:/core/ui/ControlPanel/Plugins $:/core/ui/ControlPanel/Tools $:/core/ui/ControlPanel/Internals
|
||||
2
core/wiki/tags/EditTemplate.tid
Normal file
2
core/wiki/tags/EditTemplate.tid
Normal file
@@ -0,0 +1,2 @@
|
||||
title: $:/tags/EditTemplate
|
||||
list: [[$:/core/ui/EditTemplate/controls]] [[$:/core/ui/EditTemplate/title]] [[$:/core/ui/EditTemplate/tags]] [[$:/core/ui/EditTemplate/body]] [[$:/core/ui/EditTemplate/type]] [[$:/core/ui/EditTemplate/fields]]
|
||||
2
core/wiki/tags/EditToolbar.tid
Normal file
2
core/wiki/tags/EditToolbar.tid
Normal file
@@ -0,0 +1,2 @@
|
||||
title: $:/tags/EditToolbar
|
||||
list: [[$:/core/ui/EditToolbar/delete]] [[$:/core/ui/EditToolbar/cancel]] [[$:/core/ui/EditToolbar/save]]
|
||||
2
core/wiki/tags/PageControls.tid
Normal file
2
core/wiki/tags/PageControls.tid
Normal file
@@ -0,0 +1,2 @@
|
||||
title: $:/tags/PageControls
|
||||
list: [[$:/core/ui/PageControls/new-tiddler]] [[$:/core/ui/PageControls/control-panel]] [[$:/core/ui/PageControls/save-wiki]]
|
||||
2
core/wiki/tags/ViewToolbar.tid
Normal file
2
core/wiki/tags/ViewToolbar.tid
Normal file
@@ -0,0 +1,2 @@
|
||||
title: $:/tags/ViewToolbar
|
||||
list: [[$:/core/ui/ViewToolbar/info]] [[$:/core/ui/ViewToolbar/edit]] [[$:/core/ui/ViewToolbar/close]]
|
||||
@@ -3,15 +3,6 @@ title: $:/snippets/themeswitcher
|
||||
Current theme: {{$:/theme}}
|
||||
|
||||
<$linkcatcher to="$:/theme">
|
||||
|
||||
<$list filter="[plugin-type[theme]sort[title]]">
|
||||
|
||||
<$reveal state="$:/theme" type="match" text={{!!title}}>•</$reveal><$reveal state="$:/theme" type="nomatch" text={{!!title}}> </$reveal> <$link to={{!!title}}>
|
||||
|
||||
<$view field="name" format="text"/>
|
||||
|
||||
</$link>
|
||||
|
||||
<$list filter="[plugin-type[theme]sort[title]]"><div><$reveal state="$:/theme" type="match" text={{!!title}}>•</$reveal><$reveal state="$:/theme" type="nomatch" text={{!!title}}> </$reveal> <$link to={{!!title}}><$view field="name" format="text"/></$link></div>
|
||||
</$list>
|
||||
|
||||
</$linkcatcher>
|
||||
|
||||
@@ -2,12 +2,7 @@ title: $:/snippets/viewswitcher
|
||||
|
||||
Current view: {{$:/view}}
|
||||
|
||||
<$linkcatcher to="$:/view">
|
||||
|
||||
<$list filter="classic zoomin pop">
|
||||
|
||||
<$reveal state="$:/view" type="match" text={{!!title}}>•</$reveal><$reveal state="$:/view" type="nomatch" text={{!!title}}> </$reveal> <$link to={{!!title}}><$view field="title"/></$link>
|
||||
|
||||
<$linkcatcher to="$:/view"><$list filter="classic zoomin pop"><div><$reveal state="$:/view" type="match" text={{!!title}}>•</$reveal><$reveal state="$:/view" type="nomatch" text={{!!title}}> </$reveal> <$link to={{!!title}}><$view field="title"/></$link>
|
||||
</div>
|
||||
</$list>
|
||||
|
||||
</$linkcatcher>
|
||||
|
||||
@@ -16,10 +16,9 @@ describe("Widget module", function() {
|
||||
|
||||
var widget = require("$:/core/modules/widgets/widget.js");
|
||||
|
||||
function createWidgetNode(parseTreeNode,wiki,variables) {
|
||||
function createWidgetNode(parseTreeNode,wiki) {
|
||||
return new widget.widget(parseTreeNode,{
|
||||
wiki: wiki,
|
||||
variables: variables || {},
|
||||
document: $tw.document
|
||||
});
|
||||
}
|
||||
@@ -229,7 +228,7 @@ describe("Widget module", function() {
|
||||
});
|
||||
});
|
||||
|
||||
it("should deal with the setvariable widget", function() {
|
||||
it("should deal with the set widget", function() {
|
||||
var wiki = new $tw.Wiki();
|
||||
// Add some tiddlers
|
||||
wiki.addTiddlers([
|
||||
@@ -239,7 +238,7 @@ describe("Widget module", function() {
|
||||
{title: "TiddlerFour", text: "TiddlerTwo"}
|
||||
]);
|
||||
// Construct the widget node
|
||||
var text = "My <$setvariable name='currentTiddler' value={{TiddlerFour}}><$transclude tiddler={{!!title}}/></$setvariable> is Jolly"
|
||||
var text = "My <$set name='currentTiddler' value={{TiddlerFour}}><$transclude tiddler={{!!title}}/></$set> is Jolly"
|
||||
var widgetNode = createWidgetNode(parseText(text,wiki),wiki);
|
||||
// Render the widget node to the DOM
|
||||
var wrapper = renderWidgetNode(widgetNode);
|
||||
@@ -264,18 +263,8 @@ describe("Widget module", function() {
|
||||
it("should deal with attributes specified as macro invocations", function() {
|
||||
var wiki = new $tw.Wiki();
|
||||
// Construct the widget node
|
||||
var text = "<div class=<<myMacro 'something' three:'thing'>>>Content</div>";
|
||||
var variables = {
|
||||
myMacro: {
|
||||
value: "My something $one$, $two$ or other $three$",
|
||||
params: [
|
||||
{name: "one", "default": "paramOne"},
|
||||
{name: "two"},
|
||||
{name: "three", "default": "paramTwo"}
|
||||
]
|
||||
}
|
||||
};
|
||||
var widgetNode = createWidgetNode(parseText(text,wiki),wiki,variables);
|
||||
var text = "\\define myMacro(one:\"paramOne\",two,three:\"paramTwo\")\nMy something $one$, $two$ or other $three$\n\\end\n<div class=<<myMacro 'something' three:'thing'>>>Content</div>";
|
||||
var widgetNode = createWidgetNode(parseText(text,wiki),wiki);
|
||||
// Render the widget node to the DOM
|
||||
var wrapper = renderWidgetNode(widgetNode);
|
||||
// Test the rendering
|
||||
|
||||
@@ -98,7 +98,16 @@ describe("WikiText parser tests", function() {
|
||||
it("should parse macro definitions", function() {
|
||||
expect(parse("\\define myMacro()\nnothing\n\\end\n")).toEqual(
|
||||
|
||||
[ { type : 'setvariable', name : 'myMacro', params : [ ], text : 'nothing', attributes : { name : { type : 'string', value : 'myMacro' }, value : { type : 'string', value : 'nothing' } }, children : [ ] } ]
|
||||
[ { type : 'set', name : 'myMacro', params : [ ], text : 'nothing', attributes : { name : { type : 'string', value : 'myMacro' }, value : { type : 'string', value : 'nothing' } }, children : [ ] } ]
|
||||
|
||||
);
|
||||
|
||||
});
|
||||
|
||||
it("should parse macro calls", function() {
|
||||
expect(parse("<<john>><<paul>><<george>><<ringo>>")).toEqual(
|
||||
|
||||
[ { type : 'element', tag : 'p', children : [ { type : 'macrocall', name : 'john', params : [ ] }, { type : 'macrocall', name : 'paul', params : [ ] }, { type : 'macrocall', name : 'george', params : [ ] }, { type : 'macrocall', name : 'ringo', params : [ ] } ] } ]
|
||||
|
||||
);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
created: 201309091516000
|
||||
creator: JeremyRuston
|
||||
modified: 201311091538002
|
||||
modified: 201311120855003
|
||||
modifier: JeremyRuston
|
||||
tags: community
|
||||
title: Community
|
||||
@@ -9,11 +9,13 @@ type: text/vnd.tiddlywiki
|
||||
! Blog posts and articles about TiddlyWiki5
|
||||
|
||||
* A gamers guide to using TiddlyWiki5: "[[Shining Ark 7 Using TiddlyWiki|http://helugame.wordpress.com/2013/09/07/shining-ark-7-using-tiddlywiki/]]"
|
||||
* An introduction to TiddlyWiki5 by [[Moongift (in Japanese)|http://www.moongift.jp/2013/11/tiddlywiki5-%E3%83%87%E3%82%B6%E3%82%A4%E3%83%B3%E5%88%B7%E6%96%B0%E3%80%82%E6%AC%A1%E3%81%AE25%E5%B9%B4%E3%82%92%E7%9B%AE%E6%8C%87%E3%81%99tiddlywiki-2/]]
|
||||
|
||||
! Hints and tips for TiddlyWiki5
|
||||
|
||||
* [[TW5 Mall|http://www.giffmex.org/tw5mall.htm]] - DaveGifford's growing catalogue of hints and tips
|
||||
* A [[guide to creating a fixed top menu|https://dl.dropboxusercontent.com/u/2638511/TW5_Test.htm]] from TonGerner
|
||||
* A new theme from [[Bob Robison|http://tw5gray.tiddlyspot.com]]
|
||||
|
||||
! Examples of TiddlyWiki5 being used in the wild
|
||||
|
||||
|
||||
@@ -18,8 +18,6 @@ This is the developer documentation hub for TiddlyWiki.
|
||||
|
||||
! Internal Objects and Mechanisms
|
||||
|
||||
{{mechanism}}
|
||||
|
||||
<$list filter="[tag[mechanism]sort[title]]" type="ul"/>
|
||||
|
||||
! Module types
|
||||
@@ -29,8 +27,6 @@ See SyncAdaptorModules.
|
||||
|
||||
!! DeserializerModules
|
||||
|
||||
Deserializers are modules that read tiddlers from different text formats:
|
||||
|
||||
{{deserializers}}
|
||||
Deserializers are modules that load tiddlers from different text formats:
|
||||
|
||||
<$list filter="[tag[deserializers]sort[title]]" type="ul"/>
|
||||
|
||||
14
editions/tw5.com/tiddlers/Release 5.0.0alpha14.tid
Normal file
14
editions/tw5.com/tiddlers/Release 5.0.0alpha14.tid
Normal file
@@ -0,0 +1,14 @@
|
||||
created: 201311101922007
|
||||
creator: JeremyRuston
|
||||
modified: 201311101922007
|
||||
modifier: JeremyRuston
|
||||
title: Release 5.0.0-alpha.14
|
||||
tags: releasenote
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.0.0-alpha.13...v5.0.0-alpha.14]]//
|
||||
|
||||
This release has several bug fixes:
|
||||
|
||||
* Improved the layout of the [[control panel|$:/ControlPanel]]
|
||||
* Fixed problem with using the CheckboxWidget to apply tags to tiddlers that don't have any existing tags
|
||||
* Fixed problem with default password for the PasswordWidget being the string "null"
|
||||
39
editions/tw5.com/tiddlers/Release 5.0.0alpha15.tid
Normal file
39
editions/tw5.com/tiddlers/Release 5.0.0alpha15.tid
Normal file
@@ -0,0 +1,39 @@
|
||||
created: 201311122050007
|
||||
creator: JeremyRuston
|
||||
modified: 201311122050007
|
||||
modifier: JeremyRuston
|
||||
title: Release 5.0.0-alpha.15
|
||||
tags: releasenote
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.0.0-alpha.14...v5.0.0-alpha.15]]//
|
||||
|
||||
!! New Features
|
||||
|
||||
* Added a dropdown to the edit template for setting the tiddler type
|
||||
* A saver module for Microsoft Internet Explorer version 10 and above. Clicking save in the sidebar causes the browser to pull up a bar at the bottom of the window where you can click ''save''. You then get a new copy of your wiki in the downloads folder.
|
||||
* Support for new `tw-close-other-tiddlers` message (eg, <$button message="tw-close-other-tiddlers">close others</$button>)
|
||||
* For http://five.tiddlywiki.com, add a tiddler info tab with a link to the static representation of the tiddler
|
||||
* Make more UI elements extensible via system tags:
|
||||
** [[$:/tags/ViewToolbar]] for the view mode tiddler toolbar
|
||||
** [[$:/tags/EditTemplate]] for the edit template
|
||||
** [[$:/tags/EditToolbar]] for the edit mode tiddler toolbar
|
||||
** [[$:/tags/PageControls]] for the page control tools in the sidebar
|
||||
|
||||
!! Improvements
|
||||
|
||||
* Rename the `<$setvariable>` to `<$set>`
|
||||
** `<$setvariable>` will temporarily remain as a synonym for `<$set>` for the next few releases
|
||||
* Improve the popup mechanism so that the tiddler info panel doesn't close so easily
|
||||
* Various improvements for working with TiddlyWeb, including:
|
||||
** Updated control panel
|
||||
|
||||
!! Bug fixes
|
||||
|
||||
* Fixed bug when creating a tiddler title starting or ending with a space
|
||||
* Fixed behaviour of tags editor dropdown when search box is empty
|
||||
* Fixed problem with interpretation of `fields` and `index` attributes of the TranscludeWidget
|
||||
* Fixed the module type names in the internal tab of the control panel
|
||||
* Improved styling for embedded PDFs
|
||||
* Fixed bug with second being omitted from serialised date formats
|
||||
|
||||
Contributors to this release include @jermolene and @grayeul.
|
||||
@@ -86,19 +86,13 @@ This will be monospaced
|
||||
You can incorporate the content of one tiddler within another using the transclusion notation:
|
||||
|
||||
* `{{MyTiddler}}` transcludes a single tiddler
|
||||
* `{{MyTiddler|tooltip}}` adds a tooltip
|
||||
* `{{MyTiddler||TemplateTitle}}` displays the tiddler through a specified [[TiddlerTemplate|TiddlerTemplates]]
|
||||
* `{{MyTiddler|tooltip||TemplateTitle}}` specifies both a tooltip and a template for the transcluded content
|
||||
* `{{MyTiddler}width:40;height:50;}.firstClass.secondClass` transcludes a single tiddler, adding the specified styles and classes to the transcluded content
|
||||
|
||||
A similar syntax can be used to transclude a list of tiddlers matching a specified [[TiddlerFilter|TiddlerFilters]]:
|
||||
|
||||
```
|
||||
{{{ [tag[mechanism]] }}}
|
||||
{{{ [tag[mechanism]] |tooltip}}}
|
||||
{{{ [tag[mechanism]] ||TemplateTitle}}}
|
||||
{{{ [tag[mechanism]] |tooltip||TemplateTitle}}}
|
||||
{{{ [tag[mechanism]] }}width:40;height:50;}.class.class
|
||||
```
|
||||
|
||||
! Images
|
||||
@@ -244,8 +238,6 @@ Here an attribute is specified as a macro invocation:
|
||||
<a href=<<MyMacro "Brian">>>link</a>
|
||||
```
|
||||
|
||||
* As a macro invocation
|
||||
|
||||
! Widgets
|
||||
|
||||
Widgets provide rich functionality within WikiText. For example, the `<$video>` widget can be used to embed videos from YouTube, Vimeo or the Internet Archive:
|
||||
|
||||
@@ -9,9 +9,11 @@ I'm the inventor of TiddlyWiki. I am available through my company FederatialLimi
|
||||
|
||||
You can find me on these services:
|
||||
|
||||
* [[Jermolene on GitHub|https://github.com/Jermolene]]
|
||||
* [[Jermolene on GitTip|https://www.gittip.com/Jermolene/]], a micropayment service
|
||||
* [[@Jermolene on Twitter|http://twitter.com/#!/jermolene]]
|
||||
* [[LinkedIn|http://www.linkedin.com/in/jermy]]
|
||||
* [[Flickr|http://www.flickr.com/photos/jermy/]]
|
||||
* [[Jermy on LinkedIn|http://www.linkedin.com/in/jermy]]
|
||||
* [[Jermy on Flickr|http://www.flickr.com/photos/jermy/]]
|
||||
|
||||
Further information:
|
||||
|
||||
|
||||
17
editions/tw5.com/tiddlers/system/StaticLink.tid
Normal file
17
editions/tw5.com/tiddlers/system/StaticLink.tid
Normal file
@@ -0,0 +1,17 @@
|
||||
title: $:/editions/tw5.com/TiddlerInfo/StaticLink
|
||||
tags: $:/tags/TiddlerInfo
|
||||
caption: Static Link
|
||||
|
||||
\define makeLink()
|
||||
http://five.tiddlywiki.com/static/<$view tiddler=<<currentTiddler>> field="title" format="doubleurlencoded"/>.html
|
||||
\end
|
||||
\define outerMakeLink()
|
||||
<$macrocall $name="makeLink" $output="text/plain"/>
|
||||
\end
|
||||
A static HTML representation of this tiddler is available at the URL:
|
||||
|
||||
<<outerMakeLink>>
|
||||
|
||||
<input value=<<outerMakeLink>> size="80"/>
|
||||
|
||||
//Note that editing the URL here won't have any effect; it is presented in a text box just to make it easier to copy and paste//
|
||||
@@ -1,18 +1,10 @@
|
||||
title: SetVariableWidget
|
||||
created: 201310241419
|
||||
creator: JeremyRuston
|
||||
modified: 201310300837
|
||||
modified: 201311151827
|
||||
modifier: JeremyRuston
|
||||
tags: widget
|
||||
|
||||
! Introduction
|
||||
The `<$setvariable>` widget has been renamed `<$set/>`; see SetWidget for more details.
|
||||
|
||||
The set variable widget assigns a value to a specified [[variable|WidgetVariables]]. The new value of the variable is availale to the content within the set variable widget.
|
||||
|
||||
! Content and Attributes
|
||||
|
||||
The content of the `<$setvariable>` widget is the scope for the value assigned to the variable.
|
||||
|
||||
|!Attribute |!Description |
|
||||
|name |The name of the variable to assign |
|
||||
|value |The value to assign to the variable |
|
||||
For the moment, you can continue to use `<$setvariable>` as a synonym for `<$set/>`, but it will be removed for the beta.
|
||||
|
||||
18
editions/tw5.com/tiddlers/widgets/SetWidget.tid
Normal file
18
editions/tw5.com/tiddlers/widgets/SetWidget.tid
Normal file
@@ -0,0 +1,18 @@
|
||||
title: SetWidget
|
||||
created: 201311151827
|
||||
creator: JeremyRuston
|
||||
modified: 201311151827
|
||||
modifier: JeremyRuston
|
||||
tags: widget
|
||||
|
||||
! Introduction
|
||||
|
||||
The set variable widget assigns a value to a specified [[variable|WidgetVariables]]. The new value of the variable is availale to the content within the set variable widget.
|
||||
|
||||
! Content and Attributes
|
||||
|
||||
The content of the `<$set>` widget is the scope for the value assigned to the variable.
|
||||
|
||||
|!Attribute |!Description |
|
||||
|name |The name of the variable to assign |
|
||||
|value |The value to assign to the variable |
|
||||
@@ -1,38 +1,27 @@
|
||||
title: TiddlyWiki5 for TiddlyWeb
|
||||
created: 201311152153
|
||||
creator: JeremyRuston
|
||||
modified: 201311152153
|
||||
modifier: JeremyRuston
|
||||
|
||||
Experimenting with ~TiddlyWeb integration for ~TiddlyWiki5. Features:
|
||||
! Features
|
||||
|
||||
* Loads skinny tiddlers from entire recipe at startup/login
|
||||
* Subsequently syncs changes back to the server
|
||||
* Polls for changes from the server
|
||||
|
||||
To do:
|
||||
! Getting Started
|
||||
|
||||
* Use of `if-match` header
|
||||
* Deleting tiddlers
|
||||
* Routing newly created tiddlers to TiddlyWeb
|
||||
To try it out, create a new space, include the space ''tw5tiddlyweb'', and then visit ''{myspace}.tiddlyspace.com/tw5''.
|
||||
|
||||
To try it out, create a new space, include the space `tw5tiddlyweb`, and then visit `<myspace>.tiddlyspace.com/tw5`.
|
||||
If you want to make TiddlyWiki5 the default view for your space, then create a tiddler called ''ServerSettings'' and give it the text:
|
||||
|
||||
----
|
||||
```
|
||||
index: tw5
|
||||
```
|
||||
|
||||
Current [[login status|$:/status/IsLoggedIn]]: {{$:/status/IsLoggedIn}}
|
||||
! Issues
|
||||
|
||||
Current [[username|$:/status/UserName]]: {{$:/status/UserName}}
|
||||
|
||||
----
|
||||
|
||||
<$reveal state="$:/status/IsLoggedIn" type="nomatch" text="yes">
|
||||
Log in to ~TiddlyWeb: <$button message="tw-login" class="btn btn-info">Login</$button>
|
||||
</$reveal>
|
||||
<$reveal state="$:/status/IsLoggedIn" type="match" text="yes">
|
||||
Log out of ~TiddlyWeb: <$button message="tw-logout" class="btn btn-warning">Logout</$button>
|
||||
</$reveal>
|
||||
|
||||
<$button message="tw-server-refresh" class="btn btn-warning">Refresh</$button>
|
||||
|
||||
----
|
||||
|
||||
All tiddlers:
|
||||
|
||||
<$list filter="[!is[system]]" template="TiddlerListTemplate"/>
|
||||
* ''$:/DefaultTiddlers'' doesn't work because thanks to lazy loading it is only loaded after it is needed
|
||||
* Ignores ''if-match'' header, so doesn't detect clashes on save
|
||||
* UI state (eg current tab status) is shared between all users of the wiki, meaning that the UI can spontaneously change in response to a server sync
|
||||
|
||||
@@ -115,4 +115,4 @@ Tobias Beer, @tobibeer, 2013/09/21
|
||||
|
||||
Nate Cain, @natecain, 2013/09/30
|
||||
|
||||
|
||||
Bob Robison, @grayeul, 2013/11/11
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "tiddlywiki",
|
||||
"preferGlobal": "true",
|
||||
"version": "5.0.0-alpha.13",
|
||||
"version": "5.0.0-alpha.15",
|
||||
"author": "Jeremy Ruston <jeremy@jermolene.com>",
|
||||
"description": "a non-linear personal web notebook",
|
||||
"contributors": [
|
||||
|
||||
3
plugins/tiddlywiki/markdown/docs_type_markdown.tid
Normal file
3
plugins/tiddlywiki/markdown/docs_type_markdown.tid
Normal file
@@ -0,0 +1,3 @@
|
||||
title: $:/docs/types/text/x-markdown
|
||||
description: Markdown
|
||||
name: text/x-markdown
|
||||
@@ -1,12 +1,16 @@
|
||||
title: $:/core/ui/ServerControlPanel
|
||||
|
||||
----
|
||||
title: $:/plugins/tiddlywiki/tiddlyweb/ServerControlPanel
|
||||
caption: Server
|
||||
tags: $:/tags/ControlPanel
|
||||
|
||||
<$reveal state="$:/status/IsLoggedIn" type="nomatch" text="yes">
|
||||
Log in to ~TiddlyWeb: <$button message="tw-login" class="btn btn-info">Login</$button>
|
||||
</$reveal>
|
||||
<$reveal state="$:/status/IsLoggedIn" type="match" text="yes">
|
||||
Log out of ~TiddlyWeb: <$button message="tw-logout" class="btn btn-warning">Logout</$button>
|
||||
Logged in as {{$:/status/UserName}} <$button message="tw-logout" class="btn btn-warning">Logout</$button>
|
||||
</$reveal>
|
||||
|
||||
Host configuration: <$edit-text tiddler="$:/config/tiddlyweb/host" tag="input" default=""/>
|
||||
|
||||
<blockquote>//for example, `$protocol$//$host$/folder`, where `$protocol$` is replaced by the protocol (typically `http` or `https`), and `$host$` by the host name//</blockquote>
|
||||
|
||||
<$button message="tw-server-refresh" class="btn btn-warning">Refresh</$button> to fetch changes from the server immediately
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
title: $:/ControlPanel/ThemeTweaks
|
||||
title: $:/themes/tiddlywiki/snowwhite/themetweaks
|
||||
tags: $:/tags/ControlPanel
|
||||
caption: Theme Tweaks
|
||||
|
||||
You can tweak certain aspects of the ''Snow White'' theme.
|
||||
|
||||
//Currently, you need to toggle to a different theme and back (or save and restart) TiddlyWiki before these changes take effect. Also take care to preserve any backticks (`) in the settings//
|
||||
//Currently, you need to toggle to a different theme and back (or save and restart TiddlyWiki) before these changes take effect. Also take care to preserve any backticks (`) in the settings//
|
||||
|
||||
! Colours
|
||||
|
||||
|
||||
@@ -139,9 +139,9 @@ table tfoot tr td {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
embed {
|
||||
max-width: 100%;
|
||||
max-height: 280px;
|
||||
.tw-tiddler-frame embed {
|
||||
width: 100%;
|
||||
height: 600px;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -331,17 +331,15 @@ a.tw-tiddlylink-external {
|
||||
}
|
||||
|
||||
.tw-page-controls svg {
|
||||
height: 1.5em;
|
||||
height: 1.75em;
|
||||
min-width: 1px;
|
||||
padding-right: 0.5em;
|
||||
fill: #fff;
|
||||
<<filter "drop-shadow(1px 1px 2px rgba(0,0,0,0.15))">>
|
||||
<<transition "fill 150ms ease-in-out">>
|
||||
}
|
||||
|
||||
.tw-page-controls svg:hover {
|
||||
fill: #000;
|
||||
<<filter "drop-shadow(1px 1px 2px rgba(255,255,255,0.9))">>
|
||||
}
|
||||
|
||||
.tw-menu-list-item {
|
||||
@@ -360,6 +358,15 @@ a.tw-tiddlylink-external {
|
||||
padding-left: 7px;
|
||||
}
|
||||
|
||||
.story-river {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.tw-story-spacer {
|
||||
position: absolute;
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
@media (max-width: {{$:/themes/tiddlywiki/snowwhite/metrics##storywidth}}) {
|
||||
.sidebar-header {
|
||||
padding: 14px;
|
||||
@@ -382,7 +389,7 @@ a.tw-tiddlylink-external {
|
||||
overflow-x: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
margin: 0 0 0 -42px;
|
||||
padding: 84px 0 28px 42px;
|
||||
padding: 70px 0 28px 42px;
|
||||
}
|
||||
|
||||
.story-river {
|
||||
@@ -390,7 +397,7 @@ a.tw-tiddlylink-external {
|
||||
left: {{$:/themes/tiddlywiki/snowwhite/metrics##storyleft}};
|
||||
top: {{$:/themes/tiddlywiki/snowwhite/metrics##storytop}};
|
||||
width: {{$:/themes/tiddlywiki/snowwhite/metrics##storywidth}};
|
||||
padding: 42px;
|
||||
padding: 56px 42px 42px 42px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -415,7 +422,6 @@ a.tw-tiddlylink-external {
|
||||
}
|
||||
|
||||
.tw-tiddler-info {
|
||||
overflow: hidden;
|
||||
padding: 14px 42px 14px 42px;
|
||||
background-color: #f8f8f8;
|
||||
border-top: 1px solid #ddd;
|
||||
@@ -565,6 +571,15 @@ canvas.tw-edit-bitmapeditor {
|
||||
** Tiddler edit mode
|
||||
*/
|
||||
|
||||
.tw-tiddler-edit-frame em {
|
||||
color: #999;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.tw-edit-type-dropdown a.tw-tiddlylink-missing {
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.tw-edit-tags-list {
|
||||
margin: 14px 0 14px 0;
|
||||
}
|
||||
@@ -578,44 +593,6 @@ canvas.tw-edit-bitmapeditor {
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
.tw-tags-autocomplete-wrapper {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.tw-tags-autocomplete {
|
||||
position: absolute;
|
||||
min-width: 280px;
|
||||
border: 1px solid {{$:/themes/tiddlywiki/snowwhite/colourmappings##dropdownborder}};
|
||||
background-color: {{$:/themes/tiddlywiki/snowwhite/colourmappings##dropdownbackground}};
|
||||
<<border-radius 4px>>
|
||||
<<box-shadow "2px 2px 10px rgba(0, 0, 0, 0.5)">>
|
||||
padding: 0 0 0 0;
|
||||
margin: 4px 0 0 0;
|
||||
white-space: nowrap;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.tw-tags-autocomplete a {
|
||||
display: block;
|
||||
padding: 4px 14px 4px 14px;
|
||||
}
|
||||
|
||||
.tw-tags-autocomplete a:hover {
|
||||
color: {{$:/themes/tiddlywiki/snowwhite/colourmappings##linkbackground}};
|
||||
background-color: {{$:/themes/tiddlywiki/snowwhite/colourmappings##linkforeground}};
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.tw-add-tag {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.tw-add-tag svg {
|
||||
height: 1em;
|
||||
width: 1em;
|
||||
fill: #999;
|
||||
}
|
||||
|
||||
.tw-add-tag-name {
|
||||
display: inline-block;
|
||||
width: 15%;
|
||||
@@ -673,10 +650,6 @@ canvas.tw-edit-bitmapeditor {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.tw-edit-field-add {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.tw-edit-field-add-name {
|
||||
display: inline-block;
|
||||
width: 15%;
|
||||
@@ -691,6 +664,12 @@ canvas.tw-edit-bitmapeditor {
|
||||
** Dropdowns
|
||||
*/
|
||||
|
||||
.btn-dropdown svg {
|
||||
height: 1em;
|
||||
width: 1em;
|
||||
fill: #999;
|
||||
}
|
||||
|
||||
.tw-drop-down {
|
||||
min-width: 280px;
|
||||
border: 1px solid {{$:/themes/tiddlywiki/snowwhite/colourmappings##dropdownborder}};
|
||||
@@ -726,6 +705,34 @@ canvas.tw-edit-bitmapeditor {
|
||||
padding: 0 0.5em 0 0.5em;
|
||||
}
|
||||
|
||||
.tw-block-dropdown-wrapper {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.tw-block-dropdown {
|
||||
position: absolute;
|
||||
min-width: 280px;
|
||||
border: 1px solid {{$:/themes/tiddlywiki/snowwhite/colourmappings##dropdownborder}};
|
||||
background-color: {{$:/themes/tiddlywiki/snowwhite/colourmappings##dropdownbackground}};
|
||||
<<border-radius 4px>>
|
||||
<<box-shadow "2px 2px 10px rgba(0, 0, 0, 0.5)">>
|
||||
padding: 0 0 0 0;
|
||||
margin: 4px 0 0 0;
|
||||
white-space: nowrap;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.tw-block-dropdown a {
|
||||
display: block;
|
||||
padding: 4px 14px 4px 14px;
|
||||
}
|
||||
|
||||
.tw-block-dropdown a:hover {
|
||||
color: {{$:/themes/tiddlywiki/snowwhite/colourmappings##linkbackground}};
|
||||
background-color: {{$:/themes/tiddlywiki/snowwhite/colourmappings##linkforeground}};
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/*
|
||||
** Modals
|
||||
*/
|
||||
@@ -840,8 +847,8 @@ canvas.tw-edit-bitmapeditor {
|
||||
|
||||
.tw-tab-buttons button {
|
||||
color: #666;
|
||||
margin-left: 4px;
|
||||
margin-right: 4px;
|
||||
margin-left: 2px;
|
||||
margin-right: 2px;
|
||||
font-weight: 300;
|
||||
border: none;
|
||||
background: inherit;
|
||||
@@ -956,3 +963,15 @@ canvas.tw-edit-bitmapeditor {
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
}
|
||||
|
||||
/*
|
||||
** Control panel
|
||||
*/
|
||||
|
||||
.tw-control-panel td {
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.tw-control-panel table, .tw-control-panel table input, .tw-control-panel table textarea {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
title: $:/themes/tiddlywiki/snowwhite/colours
|
||||
type: application/x-tiddler-dictionary
|
||||
|
||||
primary: `#5959C0`
|
||||
primary: `#007dff`
|
||||
background: `#fff`
|
||||
foreground: `#333`
|
||||
pagebackground: `#ececec`
|
||||
|
||||
5
themes/tiddlywiki/starlight/themetweaks.tid
Normal file
5
themes/tiddlywiki/starlight/themetweaks.tid
Normal file
@@ -0,0 +1,5 @@
|
||||
title: $:/themes/tiddlywiki/starlight/themetweaks
|
||||
tags: $:/tags/ControlPanel
|
||||
caption: Star Tweaks
|
||||
|
||||
Demo of a control panel tab dynamically loaded with a theme.
|
||||
Reference in New Issue
Block a user