mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-01-26 04:43:42 +00:00
Compare commits
2 Commits
bind-scrol
...
fix-tiddle
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a479376959 | ||
|
|
5051436ba0 |
@@ -35,7 +35,7 @@ Instantiate parse rule
|
|||||||
exports.init = function(parser) {
|
exports.init = function(parser) {
|
||||||
this.parser = parser;
|
this.parser = parser;
|
||||||
// Regexp to match
|
// Regexp to match
|
||||||
this.matchRegExp = /\\(function|procedure|widget)\s+([^(\s]+)\((\s*([^)]*))?\)(\s*\r?\n)?/mg;
|
this.matchRegExp = /^\\(function|procedure|widget)\s+([^(\s]+)\((\s*([^)]*))?\)(\s*\r?\n)?/mg;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -53,7 +53,7 @@ exports.parse = function() {
|
|||||||
var reEnd;
|
var reEnd;
|
||||||
if(this.match[5]) {
|
if(this.match[5]) {
|
||||||
// If so, the end of the body is marked with \end
|
// If so, the end of the body is marked with \end
|
||||||
reEnd = new RegExp("(\\r?\\n[^\\S\\n\\r]*\\\\end[^\\S\\n\\r]*(?:" + $tw.utils.escapeRegExp(this.match[2]) + ")?(?:$|\\r?\\n))","mg");
|
reEnd = new RegExp("(\\r?\\n\\\\end[^\\S\\n\\r]*(?:" + $tw.utils.escapeRegExp(this.match[2]) + ")?(?:$|\\r?\\n))","mg");
|
||||||
} else {
|
} else {
|
||||||
// Otherwise, the end of the definition is marked by the end of the line
|
// Otherwise, the end of the definition is marked by the end of the line
|
||||||
reEnd = /($|\r?\n)/mg;
|
reEnd = /($|\r?\n)/mg;
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ Instantiate parse rule
|
|||||||
exports.init = function(parser) {
|
exports.init = function(parser) {
|
||||||
this.parser = parser;
|
this.parser = parser;
|
||||||
// Regexp to match
|
// Regexp to match
|
||||||
this.matchRegExp = /\\parameters\s*\(([^)]*)\)(\s*\r?\n)?/mg;
|
this.matchRegExp = /^\\parameters\s*\(([^)]*)\)(\s*\r?\n)?/mg;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -27,11 +27,6 @@ exports.startup = function() {
|
|||||||
if($tw.browser) {
|
if($tw.browser) {
|
||||||
$tw.browser.isIE = (/msie|trident/i.test(navigator.userAgent));
|
$tw.browser.isIE = (/msie|trident/i.test(navigator.userAgent));
|
||||||
$tw.browser.isFirefox = !!document.mozFullScreenEnabled;
|
$tw.browser.isFirefox = !!document.mozFullScreenEnabled;
|
||||||
// 2023-07-21 Edge returns UA below. So we use "isChromeLike"
|
|
||||||
//'mozilla/5.0 (windows nt 10.0; win64; x64) applewebkit/537.36 (khtml, like gecko) chrome/114.0.0.0 safari/537.36 edg/114.0.1823.82'
|
|
||||||
$tw.browser.isChromeLike = navigator.userAgent.toLowerCase().indexOf("chrome") > -1;
|
|
||||||
$tw.browser.hasTouch = !!window.matchMedia && window.matchMedia("(pointer: coarse)").matches;
|
|
||||||
$tw.browser.isMobileChrome = $tw.browser.isChromeLike && $tw.browser.hasTouch;
|
|
||||||
}
|
}
|
||||||
// Platform detection
|
// Platform detection
|
||||||
$tw.platform = {};
|
$tw.platform = {};
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ exports.makeDraggable = function(options) {
|
|||||||
if(dataTransfer.setDragImage) {
|
if(dataTransfer.setDragImage) {
|
||||||
if(dragImageType === "pill") {
|
if(dragImageType === "pill") {
|
||||||
dataTransfer.setDragImage(dragImage.firstChild,-16,-16);
|
dataTransfer.setDragImage(dragImage.firstChild,-16,-16);
|
||||||
} else if(dragImageType === "blank") {
|
} else if (dragImageType === "blank") {
|
||||||
dragImage.removeChild(dragImage.firstChild);
|
dragImage.removeChild(dragImage.firstChild);
|
||||||
dataTransfer.setDragImage(dragImage,0,0);
|
dataTransfer.setDragImage(dragImage,0,0);
|
||||||
} else {
|
} else {
|
||||||
@@ -106,9 +106,7 @@ exports.makeDraggable = function(options) {
|
|||||||
dataTransfer.setData("text/vnd.tiddler",jsonData);
|
dataTransfer.setData("text/vnd.tiddler",jsonData);
|
||||||
dataTransfer.setData("text/plain",titleString);
|
dataTransfer.setData("text/plain",titleString);
|
||||||
dataTransfer.setData("text/x-moz-url","data:text/vnd.tiddler," + encodeURIComponent(jsonData));
|
dataTransfer.setData("text/x-moz-url","data:text/vnd.tiddler," + encodeURIComponent(jsonData));
|
||||||
}
|
} else {
|
||||||
// If browser is Chrome-like and has a touch-input device do NOT .setData
|
|
||||||
if(!($tw.browser.isMobileChrome)) {
|
|
||||||
dataTransfer.setData("URL","data:text/vnd.tiddler," + encodeURIComponent(jsonData));
|
dataTransfer.setData("URL","data:text/vnd.tiddler," + encodeURIComponent(jsonData));
|
||||||
}
|
}
|
||||||
dataTransfer.setData("Text",titleString);
|
dataTransfer.setData("Text",titleString);
|
||||||
|
|||||||
@@ -171,42 +171,6 @@ ScrollableWidget.prototype.render = function(parent,nextSibling) {
|
|||||||
parent.insertBefore(this.outerDomNode,nextSibling);
|
parent.insertBefore(this.outerDomNode,nextSibling);
|
||||||
this.renderChildren(this.innerDomNode,null);
|
this.renderChildren(this.innerDomNode,null);
|
||||||
this.domNodes.push(this.outerDomNode);
|
this.domNodes.push(this.outerDomNode);
|
||||||
// If the scroll position is bound to a tiddler
|
|
||||||
if(this.scrollableBind) {
|
|
||||||
// After a delay for rendering, scroll to the bound position
|
|
||||||
setTimeout(this.updateScrollPositionFromBoundTiddler.bind(this),50);
|
|
||||||
// Save scroll position on DOM scroll event
|
|
||||||
this.outerDomNode.addEventListener("scroll",function(event) {
|
|
||||||
var existingTiddler = self.wiki.getTiddler(self.scrollableBind),
|
|
||||||
newTiddlerFields = {
|
|
||||||
title: self.scrollableBind,
|
|
||||||
"scroll-left": self.outerDomNode.scrollLeft.toString(),
|
|
||||||
"scroll-top": self.outerDomNode.scrollTop.toString()
|
|
||||||
};
|
|
||||||
if(!existingTiddler || (existingTiddler.fields["scroll-left"] !== newTiddlerFields["scroll-left"] || existingTiddler.fields["scroll-top"] !== newTiddlerFields["scroll-top"])) {
|
|
||||||
self.wiki.addTiddler(new $tw.Tiddler(existingTiddler,newTiddlerFields));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
ScrollableWidget.prototype.updateScrollPositionFromBoundTiddler = function() {
|
|
||||||
var tiddler = this.wiki.getTiddler(this.scrollableBind);
|
|
||||||
if(tiddler) {
|
|
||||||
var scrollLeftTo = this.outerDomNode.scrollLeft;
|
|
||||||
if(parseFloat(tiddler.fields["scroll-left"]).toString() === tiddler.fields["scroll-left"]) {
|
|
||||||
scrollLeftTo = parseFloat(tiddler.fields["scroll-left"]);
|
|
||||||
}
|
|
||||||
var scrollTopTo = this.outerDomNode.scrollTop;
|
|
||||||
if(parseFloat(tiddler.fields["scroll-top"]).toString() === tiddler.fields["scroll-top"]) {
|
|
||||||
scrollTopTo = parseFloat(tiddler.fields["scroll-top"]);
|
|
||||||
}
|
|
||||||
this.outerDomNode.scrollTo({
|
|
||||||
top: scrollTopTo,
|
|
||||||
left: scrollLeftTo,
|
|
||||||
behavior: "instant"
|
|
||||||
})
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -214,7 +178,6 @@ Compute the internal state of the widget
|
|||||||
*/
|
*/
|
||||||
ScrollableWidget.prototype.execute = function() {
|
ScrollableWidget.prototype.execute = function() {
|
||||||
// Get attributes
|
// Get attributes
|
||||||
this.scrollableBind = this.getAttribute("bind");
|
|
||||||
this.fallthrough = this.getAttribute("fallthrough","yes");
|
this.fallthrough = this.getAttribute("fallthrough","yes");
|
||||||
this["class"] = this.getAttribute("class");
|
this["class"] = this.getAttribute("class");
|
||||||
// Make child widgets
|
// Make child widgets
|
||||||
@@ -230,9 +193,6 @@ ScrollableWidget.prototype.refresh = function(changedTiddlers) {
|
|||||||
this.refreshSelf();
|
this.refreshSelf();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if(changedAttributes.bind || changedTiddlers[this.getAttribute("bind")]) {
|
|
||||||
this.updateScrollPositionFromBoundTiddler();
|
|
||||||
}
|
|
||||||
return this.refreshChildren(changedTiddlers);
|
return this.refreshChildren(changedTiddlers);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -41,43 +41,28 @@ TranscludeWidget.prototype.execute = function() {
|
|||||||
this.collectAttributes();
|
this.collectAttributes();
|
||||||
this.collectStringParameters();
|
this.collectStringParameters();
|
||||||
this.collectSlotFillParameters();
|
this.collectSlotFillParameters();
|
||||||
// Determine whether we're being used in inline or block mode
|
// Get the target text and parse tree nodes that we are transcluding
|
||||||
var parseAsInline = !this.parseTreeNode.isBlock;
|
var target = this.getTransclusionTarget(),
|
||||||
if(this.transcludeMode === "inline") {
|
parseTreeNodes;
|
||||||
parseAsInline = true;
|
this.sourceText = target.text;
|
||||||
} else if(this.transcludeMode === "block") {
|
this.parserType = target.type;
|
||||||
parseAsInline = false;
|
this.parseAsInline = target.parseAsInline;
|
||||||
}
|
|
||||||
// Set 'thisTiddler'
|
|
||||||
this.setVariable("thisTiddler",this.transcludeTitle);
|
|
||||||
var parseTreeNodes, target;
|
|
||||||
// Process the transclusion according to the output type
|
// Process the transclusion according to the output type
|
||||||
switch(this.transcludeOutput || "text/html") {
|
switch(this.transcludeOutput || "text/html") {
|
||||||
case "text/html":
|
case "text/html":
|
||||||
// Return the parse tree nodes of the target
|
// Return the parse tree nodes
|
||||||
target = this.parseTransclusionTarget(parseAsInline);
|
|
||||||
this.parseAsInline = target.parseAsInline;
|
|
||||||
parseTreeNodes = target.parseTreeNodes;
|
parseTreeNodes = target.parseTreeNodes;
|
||||||
break;
|
break;
|
||||||
case "text/raw":
|
case "text/raw":
|
||||||
// Just return the raw text
|
// Just return the raw text
|
||||||
target = this.getTransclusionTarget();
|
parseTreeNodes = [{type: "text", text: this.sourceText}];
|
||||||
parseTreeNodes = [{type: "text", text: target.text}];
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// "text/plain" is the plain text result of wikifying the text
|
// text/plain
|
||||||
target = this.parseTransclusionTarget(parseAsInline);
|
var plainText = this.wiki.renderText("text/plain",this.parserType,this.sourceText,{parentWidget: this});
|
||||||
var widgetNode = this.wiki.makeWidget(target.parser,{
|
parseTreeNodes = [{type: "text", text: plainText}];
|
||||||
parentWidget: this,
|
|
||||||
document: $tw.fakeDocument
|
|
||||||
});
|
|
||||||
var container = $tw.fakeDocument.createElement("div");
|
|
||||||
widgetNode.render(container,null);
|
|
||||||
parseTreeNodes = [{type: "text", text: container.textContent}];
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
this.sourceText = target.text;
|
|
||||||
this.parserType = target.type;
|
|
||||||
// Set the legacy transclusion context variables only if we're not transcluding a variable
|
// Set the legacy transclusion context variables only if we're not transcluding a variable
|
||||||
if(!this.transcludeVariable) {
|
if(!this.transcludeVariable) {
|
||||||
var recursionMarker = this.makeRecursionMarker();
|
var recursionMarker = this.makeRecursionMarker();
|
||||||
@@ -174,44 +159,17 @@ TranscludeWidget.prototype.collectSlotFillParameters = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Get transcluded details as an object {text:,type:}
|
Get transcluded parse tree nodes as an object {text:,type:,parseTreeNodes:,parseAsInline:}
|
||||||
*/
|
*/
|
||||||
TranscludeWidget.prototype.getTransclusionTarget = function() {
|
TranscludeWidget.prototype.getTransclusionTarget = function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
var text;
|
// Determine whether we're being used in inline or block mode
|
||||||
// Return the text and type of the target
|
var parseAsInline = !this.parseTreeNode.isBlock;
|
||||||
if(this.hasAttribute("$variable")) {
|
if(this.transcludeMode === "inline") {
|
||||||
if(this.transcludeVariable) {
|
parseAsInline = true;
|
||||||
// Transcluding a variable
|
} else if(this.transcludeMode === "block") {
|
||||||
var variableInfo = this.getVariableInfo(this.transcludeVariable,{params: this.getOrderedTransclusionParameters()});
|
parseAsInline = false;
|
||||||
text = variableInfo.text;
|
|
||||||
return {
|
|
||||||
text: variableInfo.text,
|
|
||||||
type: this.transcludeType
|
|
||||||
};
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// Transcluding a text reference
|
|
||||||
var parserInfo = this.wiki.getTextReferenceParserInfo(
|
|
||||||
this.transcludeTitle,
|
|
||||||
this.transcludeField,
|
|
||||||
this.transcludeIndex,
|
|
||||||
{
|
|
||||||
subTiddler: this.transcludeSubTiddler,
|
|
||||||
defaultType: this.transcludeType
|
|
||||||
});
|
|
||||||
return {
|
|
||||||
text: parserInfo.text,
|
|
||||||
type: parserInfo.type
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
Get transcluded parse tree nodes as an object {text:,type:,parseTreeNodes:,parseAsInline:}
|
|
||||||
*/
|
|
||||||
TranscludeWidget.prototype.parseTransclusionTarget = function(parseAsInline) {
|
|
||||||
var self = this;
|
|
||||||
var parser;
|
var parser;
|
||||||
// Get the parse tree
|
// Get the parse tree
|
||||||
if(this.hasAttribute("$variable")) {
|
if(this.hasAttribute("$variable")) {
|
||||||
@@ -277,7 +235,7 @@ TranscludeWidget.prototype.parseTransclusionTarget = function(parseAsInline) {
|
|||||||
}
|
}
|
||||||
$tw.utils.addAttributeToParseTreeNode(parser.tree[0],name,param["default"])
|
$tw.utils.addAttributeToParseTreeNode(parser.tree[0],name,param["default"])
|
||||||
});
|
});
|
||||||
} else if(srcVariable && !srcVariable.isFunctionDefinition) {
|
} else if(srcVariable && (srcVariable.isMacroDefinition || !srcVariable.isFunctionDefinition)) {
|
||||||
// For macros and ordinary variables, wrap the parse tree in a vars widget assigning the parameters to variables named "__paramname__"
|
// For macros and ordinary variables, wrap the parse tree in a vars widget assigning the parameters to variables named "__paramname__"
|
||||||
parser = {
|
parser = {
|
||||||
tree: [
|
tree: [
|
||||||
@@ -308,14 +266,25 @@ TranscludeWidget.prototype.parseTransclusionTarget = function(parseAsInline) {
|
|||||||
defaultType: this.transcludeType
|
defaultType: this.transcludeType
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// Set 'thisTiddler'
|
||||||
|
this.setVariable("thisTiddler",this.transcludeTitle);
|
||||||
// Return the parse tree
|
// Return the parse tree
|
||||||
return {
|
if(parser) {
|
||||||
parser: parser,
|
return {
|
||||||
parseTreeNodes: parser ? parser.tree : (this.slotFillParseTrees["ts-missing"] || []),
|
parseTreeNodes: parser.tree,
|
||||||
parseAsInline: parseAsInline,
|
parseAsInline: parseAsInline,
|
||||||
text: parser && parser.source,
|
text: parser.source,
|
||||||
type: parser && parser.type
|
type: parser.type
|
||||||
};
|
};
|
||||||
|
} else {
|
||||||
|
// If there's no parse tree then return the missing slot value
|
||||||
|
return {
|
||||||
|
parseTreeNodes: (this.slotFillParseTrees["ts-missing"] || []),
|
||||||
|
parseAsInline: parseAsInline,
|
||||||
|
text: null,
|
||||||
|
type: null
|
||||||
|
};
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ Widget base class
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
/* Maximum permitted depth of the widget tree for recursion detection */
|
/* Maximum permitted depth of the widget tree for recursion detection */
|
||||||
var MAX_WIDGET_TREE_DEPTH = 1000;
|
var MAX_WIDGET_TREE_DEPTH = 500;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Create a widget object for a parse tree node
|
Create a widget object for a parse tree node
|
||||||
@@ -719,23 +719,46 @@ Widget.prototype.findFirstDomNode = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Remove any DOM nodes created by this widget or its children
|
Entry into destroy procedure
|
||||||
|
*/
|
||||||
|
Widget.prototype.destroyChildren = function() {
|
||||||
|
$tw.utils.each(this.children,function(childWidget) {
|
||||||
|
childWidget.destroy();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
/*
|
||||||
|
Legacy entry into destroy procedure
|
||||||
*/
|
*/
|
||||||
Widget.prototype.removeChildDomNodes = function() {
|
Widget.prototype.removeChildDomNodes = function() {
|
||||||
// If this widget has directly created DOM nodes, delete them and exit. This assumes that any child widgets are contained within the created DOM nodes, which would normally be the case
|
this.destroy();
|
||||||
|
};
|
||||||
|
/*
|
||||||
|
Default destroy
|
||||||
|
*/
|
||||||
|
Widget.prototype.destroy = function() {
|
||||||
|
// call children to remove their resources
|
||||||
|
this.destroyChildren();
|
||||||
|
// remove our resources
|
||||||
|
this.children = [];
|
||||||
|
this.removeLocalDomNodes();
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
Remove any DOM nodes created by this widget
|
||||||
|
*/
|
||||||
|
Widget.prototype.removeLocalDomNodes = function() {
|
||||||
|
// If this widget has directly created DOM nodes, delete them and exit.
|
||||||
if(this.domNodes.length > 0) {
|
if(this.domNodes.length > 0) {
|
||||||
$tw.utils.each(this.domNodes,function(domNode) {
|
$tw.utils.each(this.domNodes,function(domNode) {
|
||||||
domNode.parentNode.removeChild(domNode);
|
if(domNode.parentNode) {
|
||||||
|
domNode.parentNode.removeChild(domNode);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
this.domNodes = [];
|
this.domNodes = [];
|
||||||
} else {
|
|
||||||
// Otherwise, ask the child widgets to delete their DOM nodes
|
|
||||||
$tw.utils.each(this.children,function(childWidget) {
|
|
||||||
childWidget.removeChildDomNodes();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Invoke the action widgets that are descendents of the current widget.
|
Invoke the action widgets that are descendents of the current widget.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ tags: $:/tags/Macro
|
|||||||
|
|
||||||
\define toc-caption()
|
\define toc-caption()
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
<span class="tc-toc-caption tc-tiny-gap-left">
|
<span class="tc-toc-caption">
|
||||||
<$set name="tv-wikilinks" value="no">
|
<$set name="tv-wikilinks" value="no">
|
||||||
<$transclude field="caption">
|
<$transclude field="caption">
|
||||||
<$view field="title"/>
|
<$view field="title"/>
|
||||||
@@ -145,7 +145,7 @@ tags: $:/tags/Macro
|
|||||||
<$qualify name="toc-state" title={{{ [[$:/state/toc]addsuffix<__path__>addsuffix[-]addsuffix<currentTiddler>] }}}>
|
<$qualify name="toc-state" title={{{ [[$:/state/toc]addsuffix<__path__>addsuffix[-]addsuffix<currentTiddler>] }}}>
|
||||||
<$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item-selected" value="toc-item">
|
<$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item-selected" value="toc-item">
|
||||||
<li class=<<toc-item-class>>>
|
<li class=<<toc-item-class>>>
|
||||||
<$list filter="[all[current]tagging[]$sort$limit[1]]" variable="ignore" emptyMessage="""<$button class="tc-btn-invisible">{{$:/core/images/blank}}</$button><span class="toc-item-muted"><<toc-caption>></span>""">
|
<$list filter="[all[current]tagging[]$sort$limit[1]]" variable="ignore" emptyMessage="<$button class='tc-btn-invisible'>{{$:/core/images/blank}}</$button> <$view field='caption'><$view field='title'/></$view>">
|
||||||
<$reveal type="nomatch" stateTitle=<<toc-state>> text="open">
|
<$reveal type="nomatch" stateTitle=<<toc-state>> text="open">
|
||||||
<$button setTitle=<<toc-state>> setTo="open" class="tc-btn-invisible tc-popup-keep">
|
<$button setTitle=<<toc-state>> setTo="open" class="tc-btn-invisible tc-popup-keep">
|
||||||
<$transclude tiddler=<<toc-closed-icon>> />
|
<$transclude tiddler=<<toc-closed-icon>> />
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
caption: 5.3.1
|
caption: 5.3.1
|
||||||
created: 20230720215100983
|
created: 20230701133439630
|
||||||
modified: 20230720215100983
|
modified: 20230701133439630
|
||||||
tags: ReleaseNotes
|
tags: ReleaseNotes
|
||||||
title: Release 5.3.1
|
title: Release 5.3.1
|
||||||
type: text/vnd.tiddlywiki
|
type: text/vnd.tiddlywiki
|
||||||
@@ -9,10 +9,6 @@ type: text/vnd.tiddlywiki
|
|||||||
|
|
||||||
! Overview of v5.3.1
|
! Overview of v5.3.1
|
||||||
|
|
||||||
! Bug Fixes and Reversions of v5.3.0 Changes
|
|
||||||
|
|
||||||
* Reverted adding the `widget.destroy()` method because of performance concerns (see https://github.com/Jermolene/TiddlyWiki5/pull/7468)
|
|
||||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7647">> inefficiency when transcluding with the ''$output'' attribute set to `text/plain`
|
|
||||||
|
|
||||||
! Plugin Improvements
|
! Plugin Improvements
|
||||||
|
|
||||||
@@ -31,7 +27,7 @@ Improvements to the following translations:
|
|||||||
|
|
||||||
! Widget Improvements
|
! Widget Improvements
|
||||||
|
|
||||||
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/7594">> ''tabindex'' attribute to SelectWidget
|
*
|
||||||
|
|
||||||
! Filter improvements
|
! Filter improvements
|
||||||
|
|
||||||
@@ -39,41 +35,23 @@ Improvements to the following translations:
|
|||||||
|
|
||||||
! Hackability Improvements
|
! Hackability Improvements
|
||||||
|
|
||||||
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/7611">> ImportVariablesWidget and [[Pragma: \import]] to trim whitespace when parsing tiddlers
|
*
|
||||||
* <<.link-badge-extended "https://github.com/Jermolene/TiddlyWiki5/commit/9b2af1359614f4ad5afd05be7cf9853909334592"> [[WidgetMessage: tm-http-request]] to handle binary responses ([[demo|WidgetMessage: tm-http-request Example - Random Dog]])
|
|
||||||
|
|
||||||
! Bug Fixes
|
! Bug Fixes
|
||||||
|
|
||||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7627">> table of contents indentation
|
*
|
||||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7595">> bindStatus and bindProgress parameters of [[WidgetMessage: tm-http-request]]
|
|
||||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7606">> attribute substitution to handle variables containing non-word characters
|
|
||||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7624">> the pragmas introduced in v5.3.0 so that they can be indented with whitespace
|
|
||||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7619">> size of tiddler icons
|
|
||||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7622">> drag and drop from Chrome-like browsers to Firefox
|
|
||||||
|
|
||||||
! Node.js Improvements
|
! Node.js Improvements
|
||||||
|
|
||||||
*
|
*
|
||||||
|
|
||||||
! Developer Improvements
|
! Performance Improvements
|
||||||
|
|
||||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/commit/6c7c21a87bdb0d8a00df1c14eea18912164e0b57">> overeager onload handler in Jasmine plugin
|
*
|
||||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/commit/08bad90e51c45233a196333e101bbbf6ecf702ce">> ordering of shadow tiddler listings to not reflect order of insertion
|
|
||||||
|
|
||||||
Currently shadow tiddler ordering depends upon the order in which the shadows appear in the plugin JSON
|
|
||||||
|
|
||||||
! Acknowledgements
|
! Acknowledgements
|
||||||
|
|
||||||
[[@Jermolene|https://github.com/Jermolene]] would like to thank the contributors to this release who have generously given their time to help improve TiddlyWiki:
|
[[@Jermolene|https://github.com/Jermolene]] would like to thank the contributors to this release who have generously given their time to help improve TiddlyWiki:
|
||||||
|
|
||||||
<<.contributors """
|
<<.contributors """
|
||||||
AnthonyMuscio
|
|
||||||
btheado
|
|
||||||
CrossEye
|
|
||||||
flibbles
|
|
||||||
hffqyd
|
|
||||||
pmario
|
|
||||||
saqimtiaz
|
|
||||||
stevesunypoly
|
|
||||||
twMat
|
|
||||||
""">>
|
""">>
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
title: $:/my-scroll-position
|
|
||||||
scroll-left: 0
|
|
||||||
scroll-top: 100
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
title: Functions/Function/Indented
|
|
||||||
description: Indented function definition
|
|
||||||
type: text/vnd.tiddlywiki-multiple
|
|
||||||
tags: [[$:/tags/wiki-test-spec]]
|
|
||||||
|
|
||||||
title: Output
|
|
||||||
|
|
||||||
\whitespace trim
|
|
||||||
\function .dividebysomething(factor:0.5)
|
|
||||||
[divide<factor>]
|
|
||||||
\end
|
|
||||||
|
|
||||||
\function multiplebysomething(first:ignored,factor:2)
|
|
||||||
[multiply<factor>multiply[2].dividebysomething[0.25]]
|
|
||||||
\end
|
|
||||||
|
|
||||||
<$text text={{{ [[4]function[multiplebysomething]] }}}/>
|
|
||||||
|
|
|
||||||
<$text text={{{ [[6]function[multiplebysomething],[ignored],[4]] }}}/>
|
|
||||||
|
|
||||||
+
|
|
||||||
title: ExpectedResult
|
|
||||||
|
|
||||||
<p>64|192</p>
|
|
||||||
@@ -33,4 +33,4 @@ $param$ with a ''buffalo''
|
|||||||
+
|
+
|
||||||
title: ExpectedResult
|
title: ExpectedResult
|
||||||
|
|
||||||
<p>Going to lunch with a ''buffalo''</p><p>Going to breakfastwith a<strong>buffalo</strong></p><p>Going to dinner with a <strong>buffalo</strong></p>Going to lunch with a ''buffalo''Going to breakfastwith abuffaloGoing to dinner with a buffalo
|
<p>Going to lunch with a ''buffalo''</p><p>Going to breakfastwith a<strong>buffalo</strong></p><p>Going to dinner with a <strong>buffalo</strong></p>Going to lunch with a buffalo with a buffaloGoing to dinner with a buffalo
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
title: Procedures/Nested/Indented
|
|
||||||
description: Nested Procedures that are indented
|
|
||||||
type: text/vnd.tiddlywiki-multiple
|
|
||||||
tags: [[$:/tags/wiki-test-spec]]
|
|
||||||
|
|
||||||
title: Output
|
|
||||||
|
|
||||||
\whitespace trim
|
|
||||||
\procedure alpha(x)
|
|
||||||
\procedure beta(y)
|
|
||||||
<$text text=<<y>>/>
|
|
||||||
\end beta
|
|
||||||
<$transclude $variable="beta" y={{{ [<x>addprefix<x>] }}}/>
|
|
||||||
\end alpha
|
|
||||||
|
|
||||||
<<alpha "Elephant">>
|
|
||||||
+
|
|
||||||
title: ExpectedResult
|
|
||||||
|
|
||||||
<p>ElephantElephant</p>
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
title: Procedures/TrailingNewlines
|
|
||||||
description: Trailing newlines in procedures must not be dropped
|
|
||||||
type: text/vnd.tiddlywiki-multiple
|
|
||||||
tags: [[$:/tags/wiki-test-spec]]
|
|
||||||
|
|
||||||
title: Output
|
|
||||||
|
|
||||||
\procedure inner()
|
|
||||||
Paragraph 1
|
|
||||||
|
|
||||||
Paragraph 2
|
|
||||||
\end
|
|
||||||
\procedure outer()
|
|
||||||
<$macrocall $name=inner />
|
|
||||||
|
|
||||||
\end
|
|
||||||
<<outer>>
|
|
||||||
|
|
||||||
+
|
|
||||||
title: ExpectedResult
|
|
||||||
|
|
||||||
<p>Paragraph 1</p><p>Paragraph 2</p>
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
title: Transclude/CustomWidget/Simple/Indented
|
|
||||||
description: Custom widget definition indented
|
|
||||||
type: text/vnd.tiddlywiki-multiple
|
|
||||||
tags: [[$:/tags/wiki-test-spec]]
|
|
||||||
|
|
||||||
title: Output
|
|
||||||
|
|
||||||
\whitespace trim
|
|
||||||
<$transclude $tiddler='TiddlerOne' one='Ferret'>
|
|
||||||
</$transclude>
|
|
||||||
+
|
|
||||||
title: TiddlerOne
|
|
||||||
|
|
||||||
\whitespace trim
|
|
||||||
<!-- Define the <$my.widget> widget by defining a transcludable variable with that name -->
|
|
||||||
\widget $my.widget(one:'Jaguar')
|
|
||||||
\whitespace trim
|
|
||||||
<$text text=<<one>>/>
|
|
||||||
<$slot $name="ts-raw">
|
|
||||||
Whale
|
|
||||||
</$slot>
|
|
||||||
\end
|
|
||||||
<$my.widget one="Dingo">
|
|
||||||
Crocodile
|
|
||||||
</$my.widget>
|
|
||||||
<$my.widget one="BumbleBee">
|
|
||||||
Squirrel
|
|
||||||
</$my.widget>
|
|
||||||
<$my.widget/>
|
|
||||||
+
|
|
||||||
title: ExpectedResult
|
|
||||||
|
|
||||||
<p>DingoCrocodileBumbleBeeSquirrelJaguarWhale</p>
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
title: Transclude/Parameterised/Shortcut/ParametersIndented
|
|
||||||
description: Simple parameterised transclusion using the parameters pragma (indented)
|
|
||||||
type: text/vnd.tiddlywiki-multiple
|
|
||||||
tags: [[$:/tags/wiki-test-spec]]
|
|
||||||
|
|
||||||
title: Output
|
|
||||||
|
|
||||||
\whitespace trim
|
|
||||||
<$transclude $tiddler='TiddlerOne' one='Ferret'/>
|
|
||||||
<$transclude $tiddler='TiddlerOne'/>
|
|
||||||
+
|
|
||||||
title: TiddlerOne
|
|
||||||
|
|
||||||
\whitespace trim
|
|
||||||
\parameters(one:'Jaguar')
|
|
||||||
<$text text=<<one>>/>
|
|
||||||
+
|
|
||||||
title: ExpectedResult
|
|
||||||
|
|
||||||
<p>FerretJaguar</p>
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
title: Procedures/Double/Underscore
|
|
||||||
description: Checking that procedures don't expose parameters as variables wrapped in double underscores
|
|
||||||
type: text/vnd.tiddlywiki-multiple
|
|
||||||
tags: [[$:/tags/wiki-test-spec]]
|
|
||||||
|
|
||||||
title: Output
|
|
||||||
|
|
||||||
\whitespace trim
|
|
||||||
\procedure mamacro(one:"red",two:"green")
|
|
||||||
It is $one$ and $two$<<__one__>><<__two__>>.
|
|
||||||
\end
|
|
||||||
|
|
||||||
<$macrocall $name="mamacro"/>
|
|
||||||
|
|
||||||
<$transclude $variable="mamacro"/>
|
|
||||||
|
|
||||||
<$transclude $variable="mamacro" one="orange"/>
|
|
||||||
|
|
||||||
<$transclude $variable="mamacro" 0="pink"/>
|
|
||||||
|
|
||||||
<$transclude $variable="mamacro" one="purple" 1="pink"/>
|
|
||||||
|
|
||||||
+
|
|
||||||
title: ExpectedResult
|
|
||||||
|
|
||||||
<p>It is $one$ and $two$.</p><p>It is $one$ and $two$.</p><p>It is $one$ and $two$.</p><p>It is $one$ and $two$.</p><p>It is $one$ and $two$.</p>
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
caption: ~TiddlyStow (experimental)
|
caption: TiddlyStow (experimental)
|
||||||
color: #FF8A65
|
color: #FF8A65
|
||||||
created: 20230403170650008
|
created: 20230403170650008
|
||||||
delivery: Saver
|
delivery: Saver
|
||||||
@@ -13,4 +13,4 @@ url: https://github.com/btheado/tiddlystow
|
|||||||
''Link:'' {{!!url}}
|
''Link:'' {{!!url}}
|
||||||
|
|
||||||
Tiddlystow saves TiddlyWiki files locally using the browser file system API (Chrome-based browsers currently).
|
Tiddlystow saves TiddlyWiki files locally using the browser file system API (Chrome-based browsers currently).
|
||||||
This is a simple web page for loading a local TiddlyWiki file and storing it back to the same local file requiring no plugins or extensions.
|
This is a simple web page for loading a local TiddlyWiki file and storing it back to the same local file requiring no plugins or extensions.
|
||||||
@@ -1,8 +1,6 @@
|
|||||||
caption: Fourth-Caption
|
|
||||||
created: 20150221194405000
|
created: 20150221194405000
|
||||||
modified: 20211114013601188
|
modified: 20211114013601188
|
||||||
tags: Contents [[Table-of-Contents Demonstrations]]
|
tags: Contents [[Table-of-Contents Demonstrations]]
|
||||||
title: Fourth
|
title: Fourth
|
||||||
type: text/vnd.tiddlywiki
|
|
||||||
|
|
||||||
<<.toc-lorem>>
|
<<.toc-lorem>>
|
||||||
|
|||||||
@@ -2,15 +2,5 @@ created: 20150221194423000
|
|||||||
modified: 20211114013601189
|
modified: 20211114013601189
|
||||||
tags: SecondThree [[Table-of-Contents Demonstrations]]
|
tags: SecondThree [[Table-of-Contents Demonstrations]]
|
||||||
title: SecondThreeThree
|
title: SecondThreeThree
|
||||||
toc-link: no
|
|
||||||
type: text/vnd.tiddlywiki
|
|
||||||
|
|
||||||
''Important''
|
|
||||||
|
|
||||||
It's important that this tiddler has no "child" to be able to visually test every possible toc code-path.
|
|
||||||
|
|
||||||
* This tiddler has a field ''toc-link: no''
|
|
||||||
* Do not tag any other tiddler with the title of this one
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<<.toc-lorem>>
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
caption: Third-Caption
|
|
||||||
created: 20150221194436000
|
created: 20150221194436000
|
||||||
list: ThirdOne ThirdTwo ThirdThree
|
list: ThirdOne ThirdTwo ThirdThree
|
||||||
modified: 20211114013601191
|
modified: 20211114013601191
|
||||||
tags: Contents [[Table-of-Contents Demonstrations]]
|
tags: Contents [[Table-of-Contents Demonstrations]]
|
||||||
title: Third
|
title: Third
|
||||||
type: text/vnd.tiddlywiki
|
|
||||||
|
|
||||||
<<.toc-lorem>>
|
<<.toc-lorem>>
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ The <<.op substitute>> operator replaces any placeholders in the input titles in
|
|||||||
# variables
|
# variables
|
||||||
|
|
||||||
|placeholder syntax|description|h
|
|placeholder syntax|description|h
|
||||||
|`$n$`|Text substitution of a parameter provided to the operator, where n is the position of the parameter starting with 1 for the first parameter. Unmatched placeholders pass through unchanged. |
|
|`$n$`|Text substitution of a parameter provided to the operator, where n is the position of the parameter starting with 1 for the first parameter. Unmatched placeholders pass through unchanged.|
|
||||||
|`$(varname)$`|Text substitution of a variable. Undefined variables are replaced with an empty string. |
|
|`$(varname)$`|Text substitution of a variable. Undefined variables are replaced with an empty string.|
|
||||||
|`${ filter expression }$`|Text substitution of the first result of evaluating a filter expression. In other words, if the filter returns multiple titles only the first one will be used. |
|
|`${ filter expression }$`|Text substitution with the first result of evaluating the filter expression. |
|
||||||
|
|
||||||
<<.tip """Placeholders that contain square bracket characters are not valid filter syntax when used directly in a filter expression. However they can be provided as input to the <$macrocall $name=".op" _="substitute"/> operator as text references or variables""">>
|
<<.tip """Placeholders that contain square bracket characters are not valid filter syntax when used directly in a filter expression. However they can be provided as input to the <$macrocall $name=".op" _="substitute"/> operator as text references or variables""">>
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 306 KiB |
@@ -1,5 +1,5 @@
|
|||||||
created: 20220917112416666
|
created: 20220917112416666
|
||||||
modified: 20230721064409436
|
modified: 20230419103154329
|
||||||
tags: Concepts [[WikiText Parser Modes]]
|
tags: Concepts [[WikiText Parser Modes]]
|
||||||
title: Pragmas
|
title: Pragmas
|
||||||
type: text/vnd.tiddlywiki
|
type: text/vnd.tiddlywiki
|
||||||
@@ -8,8 +8,6 @@ A <<.def pragma>> is a special component of WikiText that provides control over
|
|||||||
|
|
||||||
Pragmas occupy lines that start with `\`. They can only appear at the start of the text of a tiddler, but blank lines and comments are allowed between them. If a pragma appears in the main body of the text, it is treated as if it was ordinary text.
|
Pragmas occupy lines that start with `\`. They can only appear at the start of the text of a tiddler, but blank lines and comments are allowed between them. If a pragma appears in the main body of the text, it is treated as if it was ordinary text.
|
||||||
|
|
||||||
<<.from-version "5.2.6">> Pragmas can have preceding optional whitespace characters.
|
|
||||||
|
|
||||||
The following pragmas are available:
|
The following pragmas are available:
|
||||||
|
|
||||||
<<list-links "[tag[Pragmas]]">>
|
<<list-links "[tag[Pragmas]]">>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
caption: tw5server
|
caption: tw5-server
|
||||||
color: #70c9a0
|
color: #70c9a0
|
||||||
community-author: hffqyd
|
community-author: hffqyd
|
||||||
created: 20230302011710789
|
created: 20230302011710789
|
||||||
@@ -10,23 +10,27 @@ tags: Android Chrome Firefox [[Internet Explorer]] Linux Mac Opera Safari Saving
|
|||||||
title: Saving via a Minimal Web Server
|
title: Saving via a Minimal Web Server
|
||||||
type: text/vnd.tiddlywiki
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
A local mini binary server for TiddlyWiki5 that saves and backups wikis and uploads files for TiddlyWiki, inspired by
|
A local server for TiddlyWiki5 that saves and backups wikis, inspired by
|
||||||
[[tw5-server.rb | https://gist.github.com/jimfoltz/ee791c1bdd30ce137bc23cce826096da]].
|
[[tw5-server.rb | https://gist.github.com/jimfoltz/ee791c1bdd30ce137bc23cce826096da]].
|
||||||
|
|
||||||
tw5server provides features of:
|
tw5-server provides features of:
|
||||||
|
|
||||||
* Server for TiddlyWiki5, as well as other files (e.g. images used in TW5 `[img[images/*.png]]`);
|
* Server for TiddlyWiki5, as well as other files (e.g. images used in TW5 `[img[images/*.png]]`);
|
||||||
* Easy to save wiki via browsers;
|
* Easy to save wiki via browsers;
|
||||||
* Backup wiki in compress format (.gz), to save disk space;
|
* Backup wiki in compress format (.gz), to save disk space;
|
||||||
* Auto clean backups: keep one newest per previous month, keep all backups in current month.
|
* Auto clean backups: keep one newest per previous month, keep all backups in current month.
|
||||||
* Upload files/images to server via pressing button or drag-and-drop, for use in tiddlywiki as external links.
|
* Upload files/images to server, for use in tiddlywiki as external links.
|
||||||
* Offer binary executable for Linux, macos, Android and windows.
|
* Offer binary executable for Linux, macos and windows.
|
||||||
|
|
||||||
Download executable binary at the github.com [[tw5-server|https://github.com/hffqyd/tw5-server]].
|
Download executable script and binary at the github.com [[tw5-server|https://github.com/hffqyd/tw5-server]].
|
||||||
|
|
||||||
! Usage
|
! Usage
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
# python script:
|
||||||
|
python tw5-server.py -p 8000 -d ./ -b backup_dir
|
||||||
|
|
||||||
|
# binary file:
|
||||||
tw5server -a:192.168.0.10 -p:8000 -d:./ -b:backup
|
tw5server -a:192.168.0.10 -p:8000 -d:./ -b:backup
|
||||||
|
|
||||||
-h usage help
|
-h usage help
|
||||||
@@ -40,7 +44,6 @@ Backups auto-clean strategy:
|
|||||||
Keep all backups in current month, keep only the newest one for previous months.
|
Keep all backups in current month, keep only the newest one for previous months.
|
||||||
```
|
```
|
||||||
|
|
||||||
In Unix/Linux, maybe first `chmod +x tw5server`), then run it.
|
In Unix/Linux, just excute `./tw5-server.py` (with `chmod +x tw5-server.py`).
|
||||||
For Android version, run it in Termux, or some other terminals.
|
|
||||||
|
|
||||||
Then go to http://localhost:8000 (or other address:port specified in command) in your web browser, and click on your wiki html file.
|
Then go to http://localhost:8000 (or other address:port specified in command) in your web browser, and click on your wiki html file.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
caption: scrollable
|
caption: scrollable
|
||||||
created: 20140324223413403
|
created: 20140324223413403
|
||||||
modified: 20230731100903977
|
modified: 20220620115347910
|
||||||
tags: Widgets
|
tags: Widgets
|
||||||
title: ScrollableWidget
|
title: ScrollableWidget
|
||||||
type: text/vnd.tiddlywiki
|
type: text/vnd.tiddlywiki
|
||||||
@@ -16,15 +16,12 @@ The content of the `<$scrollable>` widget is displayed within a pair of wrapper
|
|||||||
|!Attribute |!Description |
|
|!Attribute |!Description |
|
||||||
|class |The CSS class(es) to be applied to the outer DIV |
|
|class |The CSS class(es) to be applied to the outer DIV |
|
||||||
|fallthrough |See below |
|
|fallthrough |See below |
|
||||||
|bind |<<.from-version "5.3.2">> Optional title of tiddler to which the scroll position should be bound |
|
|
||||||
|
|
||||||
Binding the scroll position to a tiddler automatically copies the scroll coordinates into the `scroll-left` and `scroll-top` fields as scrolling occurs. Conversely, setting those field values will automatically cause the scrollable to scroll if it can.
|
|
||||||
|
|
||||||
<$macrocall $name=".note" _="""If a scrollable widget can't handle the `tm-scroll` message because the inner DIV fits within the outer DIV, then by default the message falls through to the parent widget. Setting the ''fallthrough'' attribute to `no` prevents this behaviour."""/>
|
<$macrocall $name=".note" _="""If a scrollable widget can't handle the `tm-scroll` message because the inner DIV fits within the outer DIV, then by default the message falls through to the parent widget. Setting the ''fallthrough'' attribute to `no` prevents this behaviour."""/>
|
||||||
|
|
||||||
! Examples
|
! Examples
|
||||||
|
|
||||||
These examples require the following CSS definitions from [[$:/_tw5.com-styles]]:
|
This example requires the following CSS definitions from [[$:/_tw5.com-styles]]:
|
||||||
|
|
||||||
```
|
```
|
||||||
.tc-scrollable-demo {
|
.tc-scrollable-demo {
|
||||||
@@ -36,8 +33,6 @@ These examples require the following CSS definitions from [[$:/_tw5.com-styles]]
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
!! Simple Usage
|
|
||||||
|
|
||||||
This wiki text shows how to display a list within the scrollable widget:
|
This wiki text shows how to display a list within the scrollable widget:
|
||||||
|
|
||||||
<<wikitext-example-without-html "<$scrollable class='tc-scrollable-demo'>
|
<<wikitext-example-without-html "<$scrollable class='tc-scrollable-demo'>
|
||||||
@@ -51,23 +46,3 @@ This wiki text shows how to display a list within the scrollable widget:
|
|||||||
</$scrollable>
|
</$scrollable>
|
||||||
">>
|
">>
|
||||||
|
|
||||||
!! Binding scroll position to a tiddler
|
|
||||||
|
|
||||||
[[Current scroll position|$:/my-scroll-position]]: {{$:/my-scroll-position!!scroll-left}}, {{$:/my-scroll-position!!scroll-top}}
|
|
||||||
|
|
||||||
<$button>
|
|
||||||
<$action-setfield $tiddler="$:/my-scroll-position" scroll-left="100" scroll-top="100"/>
|
|
||||||
Set current scroll position to 100,100
|
|
||||||
</$button>
|
|
||||||
|
|
||||||
<<wikitext-example-without-html "<$scrollable class='tc-scrollable-demo' bind='$:/my-scroll-position'>
|
|
||||||
<$list filter='[tag[Reference]]'>
|
|
||||||
|
|
||||||
<$view field='title'/>: <$list filter='[all[current]links[]sort[title]]' storyview='pop'>
|
|
||||||
<$link><$view field='title'/></$link>
|
|
||||||
</$list>
|
|
||||||
|
|
||||||
</$list>
|
|
||||||
</$scrollable>
|
|
||||||
">>
|
|
||||||
|
|
||||||
|
|||||||
@@ -537,5 +537,3 @@ Tavin Cole, @tavin, 2023/05/25
|
|||||||
WhiteFall, @Zacharia2, 2023/06/04
|
WhiteFall, @Zacharia2, 2023/06/04
|
||||||
|
|
||||||
@oeyoews, 2023/06/30
|
@oeyoews, 2023/06/30
|
||||||
|
|
||||||
@catter-fly, 2023/07/27
|
|
||||||
|
|||||||
@@ -580,7 +580,7 @@ button svg, button img, label svg, label img {
|
|||||||
}
|
}
|
||||||
|
|
||||||
button:disabled.tc-btn-invisible {
|
button:disabled.tc-btn-invisible {
|
||||||
cursor: default;
|
cursor: default;
|
||||||
color: <<colour muted-foreground>>;
|
color: <<colour muted-foreground>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2779,11 +2779,15 @@ input.tc-palette-manager-colour-input {
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tc-table-of-contents button,
|
.tc-table-of-contents button {
|
||||||
.tc-table-of-contents .toc-item-muted {
|
|
||||||
color: <<colour sidebar-foreground>>;
|
color: <<colour sidebar-foreground>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
button + .tc-toc-caption,
|
||||||
|
button > .tc-toc-caption{
|
||||||
|
margin-left: .25em;
|
||||||
|
}
|
||||||
|
|
||||||
.tc-table-of-contents svg {
|
.tc-table-of-contents svg {
|
||||||
width: 0.7em;
|
width: 0.7em;
|
||||||
height: 0.7em;
|
height: 0.7em;
|
||||||
|
|||||||
Reference in New Issue
Block a user