mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-01-26 12:53:42 +00:00
Compare commits
13 Commits
v5.0.0-alp
...
v5.0.0-alp
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
083cb848f2 | ||
|
|
254da0b170 | ||
|
|
8b0b9eafb8 | ||
|
|
04e2f18ff1 | ||
|
|
a4783a2c19 | ||
|
|
8fb6f26729 | ||
|
|
0e7ffa677a | ||
|
|
a668f09522 | ||
|
|
2598e22422 | ||
|
|
dc6a9c6348 | ||
|
|
b1667259f0 | ||
|
|
c77b451863 | ||
|
|
9e48460940 |
@@ -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,10 +35,7 @@ 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",
|
||||
@@ -66,15 +60,6 @@ exports.parse = function() {
|
||||
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(" ")};
|
||||
}
|
||||
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,10 +35,7 @@ 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",
|
||||
@@ -64,15 +58,6 @@ exports.parse = function() {
|
||||
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(" ")};
|
||||
}
|
||||
return [tiddlerNode];
|
||||
};
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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");
|
||||
|
||||
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,10 +2,6 @@ title: $:/core/ui/SideBar/Tools
|
||||
tags: $:/tags/SideBar
|
||||
caption: Tools
|
||||
|
||||
[[Wiki Info|$:/WikiInfo]]
|
||||
|
||||
---
|
||||
|
||||
{{$:/snippets/viewswitcher}}
|
||||
|
||||
---
|
||||
|
||||
@@ -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,7 +4,7 @@ title: $:/snippets/modules
|
||||
{{$:/docs/moduletypes/$type$}}
|
||||
\end
|
||||
<$list filter="[moduletypes[]]">
|
||||
!! <<listItem>>
|
||||
!! <$macrocall $name="listItem" $type="text/plain" $output="text/plain"/>
|
||||
<$macrocall $name="describeModuleType" type=<<listItem>>/>
|
||||
<ul><$list filter="[is[current]modules[]]"><li><$link><<currentTiddler>></$link>
|
||||
</li>
|
||||
|
||||
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
|
||||
@@ -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>
|
||||
|
||||
@@ -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"
|
||||
@@ -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:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "tiddlywiki",
|
||||
"preferGlobal": "true",
|
||||
"version": "5.0.0-alpha.13",
|
||||
"version": "5.0.0-alpha.14",
|
||||
"author": "Jeremy Ruston <jeremy@jermolene.com>",
|
||||
"description": "a non-linear personal web notebook",
|
||||
"contributors": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
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>
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
title: $:/ControlPanel/ThemeTweaks
|
||||
title: $:/themes/tiddlywiki/snowwhite/themetweaks
|
||||
tags: $:/tags/ControlPanel
|
||||
caption: Theme Tweaks
|
||||
|
||||
You can tweak certain aspects of the ''Snow White'' theme.
|
||||
|
||||
|
||||
@@ -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 {
|
||||
@@ -840,8 +838,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 +954,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%;
|
||||
}
|
||||
|
||||
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