1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2026-01-26 12:53:42 +00:00

Compare commits

...

13 Commits

Author SHA1 Message Date
Jermolene
083cb848f2 Version update 2013-11-10 23:15:19 +00:00
Jermolene
254da0b170 Clean up the tools tab 2013-11-10 23:14:23 +00:00
Jermolene
8b0b9eafb8 Simplify the page controls by dropping the drop shadow
Makes the icons less blurry in Retina™ displays
2013-11-10 23:04:41 +00:00
Jermolene
04e2f18ff1 Remove tooltip, classes and styles from transclusion syntax
Now that transclusion doesn't generate any intrinsic elements we don't
have an element to attach the tooltip, classes and styles to.
2013-11-10 22:46:37 +00:00
Jermolene
a4783a2c19 Add a demo control panel page for the Starlight theme
If you open the control panel and then use the tools sidebar to switch
themes to and from Starlight, you'll see this tab dynamically appear
and disappear
2013-11-10 22:45:53 +00:00
Jermolene
8fb6f26729 Make sure we don't try to wikify the names of modules in the module listing 2013-11-10 22:45:11 +00:00
Jermolene
0e7ffa677a Narrow the gap between tabs 2013-11-10 21:53:56 +00:00
Jermolene
a668f09522 More refinements to the control panel
Including adding a TiddlyWeb-specific control panel tab
2013-11-10 21:53:39 +00:00
Jermolene
2598e22422 Spruce up the control panel
Structure things with extensible tabs.
2013-11-10 21:40:03 +00:00
Jermolene
dc6a9c6348 Release note for alpha.14 2013-11-10 19:24:34 +00:00
Jermolene
b1667259f0 Fix default password
The password widget was defaulting to the password "null".
2013-11-10 19:22:10 +00:00
Jermolene
c77b451863 Fixed bug when using checkbox widget to apply a tag to a tiddler that is untagged 2013-11-10 19:21:37 +00:00
Jermolene
9e48460940 Docs update 2013-11-09 19:29:57 +00:00
27 changed files with 116 additions and 119 deletions

View File

@@ -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];
};

View File

@@ -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];
};

View File

@@ -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);

View File

@@ -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
View 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>

View File

@@ -0,0 +1,11 @@
title: $:/core/ui/ControlPanel/Appearance
tags: $:/tags/ControlPanel
caption: Appearance
! Theme
{{$:/snippets/themeswitcher}}
! Story View
{{$:/snippets/viewswitcher}}

View 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]]"/>

View File

@@ -0,0 +1,5 @@
title: $:/core/ui/ControlPanel/Encryption
tags: $:/tags/ControlPanel
caption: Encryption
{{$:/snippets/encryptionstatus}}

View File

@@ -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

View 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>

View 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.

View File

@@ -2,10 +2,6 @@ title: $:/core/ui/SideBar/Tools
tags: $:/tags/SideBar
caption: Tools
[[Wiki Info|$:/WikiInfo]]
---
{{$:/snippets/viewswitcher}}
---

View File

@@ -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]]

View File

@@ -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]]"/>

View File

@@ -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>

View 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

View File

@@ -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}}>&bull;</$reveal><$reveal state="$:/theme" type="nomatch" text={{!!title}}>&nbsp;</$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}}>&bull;</$reveal><$reveal state="$:/theme" type="nomatch" text={{!!title}}>&nbsp;</$reveal> <$link to={{!!title}}><$view field="name" format="text"/></$link></div>
</$list>
</$linkcatcher>

View File

@@ -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}}>&bull;</$reveal><$reveal state="$:/view" type="nomatch" text={{!!title}}>&nbsp;</$reveal> <$link to={{!!title}}><$view field="title"/></$link>
<$linkcatcher to="$:/view"><$list filter="classic zoomin pop"><div><$reveal state="$:/view" type="match" text={{!!title}}>&bull;</$reveal><$reveal state="$:/view" type="nomatch" text={{!!title}}>&nbsp;</$reveal> <$link to={{!!title}}><$view field="title"/></$link>
</div>
</$list>
</$linkcatcher>

View File

@@ -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"/>

View 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"

View File

@@ -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:

View File

@@ -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": [

View File

@@ -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>

File diff suppressed because one or more lines are too long

View File

@@ -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.

View File

@@ -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%;
}

View 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.