1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-25 06:43:15 +00:00

Merge branch 'tiddlywiki-com'

This commit is contained in:
jeremy@jermolene.com 2021-10-30 09:54:55 +01:00
commit ab0dda1177
9 changed files with 46 additions and 32 deletions

View File

@ -0,0 +1,14 @@
created: 20211013132515594
modified: 20211018102307833
tags: Learning
title: Icon Gallery
type: text/vnd.tiddlywiki
\define copyActions() <$action-sendmessage $message="tm-copy-to-clipboard" $param=<<imageTitle>>/>
<<.tip "Click an icon to copy the title to the clipboard">>
<div class="tc-image-chooser">
<$macrocall $name="image-picker-list" filter="[all[shadows+tiddlers]tag[$:/tags/Image]]" actions=<<copyActions>> />
</div>

View File

@ -1,22 +1,11 @@
created: 20140809113603449 created: 20140809113603449
modified: 20150520161451179 modified: 20211022195248529
tags: Learning tags: Learning
title: ImageGallery Example title: ImageGallery Example
type: text/vnd.tiddlywiki type: text/vnd.tiddlywiki
Here is an example of using the ListWidget and the TranscludeWidget to show a grid of all system images (ie, tiddlers tagged [[$:/tags/Image]]). <<.warning "The [[ImageGallery Example]] has been replaced with the new [[Icon Gallery]] which is transcluded below">>
<style> ---
.my-gallery svg {
width: 6em; {{Icon Gallery}}
height: 6em;
margin: 1em;
}
</style>
<div class="my-gallery">
<$list filter="[all[tiddlers+shadows]tag[$:/tags/Image]]">
<span title=<<currentTiddler>>>
<$transclude/>
</span>
</$list>
</div>

View File

@ -1,5 +1,5 @@
created: 20140206214608586 created: 20140206214608586
modified: 20180701185417525 modified: 20211009145417525
tags: Features tags: Features
title: LazyLoading title: LazyLoading
type: text/vnd.tiddlywiki type: text/vnd.tiddlywiki
@ -11,7 +11,7 @@ Lazy loading can be used in two configurations:
* When running [[TiddlyWiki on Node.js]], just image tiddlers or all non-system tiddlers can be subject to lazy loading * When running [[TiddlyWiki on Node.js]], just image tiddlers or all non-system tiddlers can be subject to lazy loading
* When running [[TiddlyWiki in the Sky for TiddlyWeb]], all tiddlers are subject to lazy loading * When running [[TiddlyWiki in the Sky for TiddlyWeb]], all tiddlers are subject to lazy loading
See the LazyLoadingMechanism for details of how lazy loading is implemented. See the [[Lazy Loading Mechanism|https://tiddlywiki.com/dev/#LazyLoadingMechanism]] for details of how lazy loading is implemented.
! Lazy loading under Node.js ! Lazy loading under Node.js
@ -28,4 +28,3 @@ To apply lazy loading to all non-system tiddlers use this command:
``` ```
tiddlywiki --listen root-tiddler=$:/core/save/lazy-all tiddlywiki --listen root-tiddler=$:/core/save/lazy-all
``` ```

View File

@ -1,5 +1,5 @@
created: 20140904090300000 created: 20140904090300000
modified: 20160602051709631 modified: 20211018102355896
tags: HelloThere tags: HelloThere
title: Some of the things you can do with TiddlyWiki title: Some of the things you can do with TiddlyWiki
type: text/vnd.tiddlywiki type: text/vnd.tiddlywiki
@ -11,7 +11,7 @@ type: text/vnd.tiddlywiki
* Inventory just about anything: your recipes, personal library, contacts, music collection, and more * Inventory just about anything: your recipes, personal library, contacts, music collection, and more
* Create a blog or website * Create a blog or website
* Write a book * Write a book
* Organise your images into galleries (see our [[ImageGallery Example]]) * Organise your images into galleries (see [[Icon Gallery]])
* Share the information in your ~TiddlyWiki with others, as an online file, as a file attachment, as a tiddler file, or as a link to a specific online tiddler (try clicking and dragging a tiddler from one ~TiddlyWiki file to another to see what happens) * Share the information in your ~TiddlyWiki with others, as an online file, as a file attachment, as a tiddler file, or as a link to a specific online tiddler (try clicking and dragging a tiddler from one ~TiddlyWiki file to another to see what happens)
* Draw a sketch (Edit [[Motovun Jack.jpg]] and start drawing over the image to see what happens) * Draw a sketch (Edit [[Motovun Jack.jpg]] and start drawing over the image to see what happens)
* Use familiar web user interface elements such as lightboxes - see SampleWizard * Use familiar web user interface elements such as lightboxes - see SampleWizard

View File

@ -1,5 +1,5 @@
created: 20201216182347597 created: 20201216182347597
modified: 20201217193318816 modified: 20211018102328148
tags: tags:
title: How to create dynamic editor toolbar buttons title: How to create dynamic editor toolbar buttons
type: text/vnd.tiddlywiki type: text/vnd.tiddlywiki
@ -86,7 +86,7 @@ This tiddler contains all the necessary elements that are important for toolbar
: Is used as the button tooltip : Is used as the button tooltip
; icon ; icon
: Assigns the button icon. We use `$:/core/images/spiral` {{$:/core/images/spiral}} here. : Assigns the button icon. We use `$:/core/images/spiral` {{$:/core/images/spiral}} here. More button icons can be found in the [[Icon Gallery]]
; shortcuts ; shortcuts
: This is the [[Keyboard Shortcut Descriptor]] eg: `((temp-bold))` : This is the [[Keyboard Shortcut Descriptor]] eg: `((temp-bold))`

View File

@ -110,6 +110,9 @@ td svg {
padding-bottom: 0; padding-bottom: 0;
margin-top: 0.2em; margin-top: 0.2em;
} }
.doc-example input {
width: 60%;
}
.doc-example pre:first-child { .doc-example pre:first-child {
margin-top: 0; margin-top: 0;
} }

View File

@ -5,22 +5,29 @@ tags: $:/tags/Macro
\define .operator-examples(op,text:"Examples") <$link to="$op$ Operator (Examples)">$text$</$link> \define .operator-examples(op,text:"Examples") <$link to="$op$ Operator (Examples)">$text$</$link>
\define .operator-example-tryit-actions() <$action-setfield $tiddler=<<.state>> text="show" filter=<<__eg__>>/>
\define .operator-example(n,eg,ie) \define .operator-example(n,eg,ie)
<div class="doc-example"> <div class="doc-example">
`$eg$`
<$macrocall $name=".if" cond="""$ie$""" then="""<dd>&rarr; $ie$</dd>"""/>
<$list filter="[title<.state-prefix>addsuffix{!!title}addsuffix[/]addsuffix[$n$]]" variable=".state"> <$list filter="[title<.state-prefix>addsuffix{!!title}addsuffix[/]addsuffix[$n$]]" variable=".state">
<$reveal state=<<.state>> type="nomatch" text="show"> <$reveal state=<<.state>> type="nomatch" text="show">
`$eg$`
<$macrocall $name=".if" cond="""$ie$""" then="""<dd>&rarr; $ie$</dd>"""/>
<dl> <dl>
<dd><$button set=<<.state>> setTo="show">Try it</$button></dd> <dd><$button actions=<<.operator-example-tryit-actions>>>Try it</$button></dd>
</dl> </dl>
</$reveal> </$reveal>
<$reveal state=<<.state>> type="match" text="show"> <$reveal state=<<.state>> type="match" text="show">
<$edit-text tiddler=<<.state>> field="filter" tag="input" type=search focus="true"/>
<dl> <dl>
<dd><$button set=<<.state>> setTo="">Hide</$button></dd> <dd>
<$button set=<<.state>> setTo="">Hide</$button>
<$reveal stateTitle=<<.state>> stateField="filter" type="nomatch" text=<<__eg__>>>
<$button actions=<<.operator-example-tryit-actions>>>Reset</$button>
</$reveal>
</dd>
</dl> </dl>
<blockquote class="doc-example-result"> <blockquote class="doc-example-result">
<ul><$list filter="""$eg$""" emptyMessage="(empty)"> <ul><$list filter={{{[<.state>get[filter]]}}} emptyMessage="(empty)">
<li><$link><$view field="title"/></$link></li> <li><$link><$view field="title"/></$link></li>
</$list></ul> </$list></ul>
</blockquote> </blockquote>

View File

@ -1,9 +1,9 @@
caption: $:/tags/Image caption: $:/tags/Image
created: 20180926170345251 created: 20180926170345251
description: marks (core) images description: marks (core) images
modified: 20180926171456494 modified: 20211018102336342
tags: SystemTags tags: SystemTags
title: SystemTag: $:/tags/Image title: SystemTag: $:/tags/Image
type: text/vnd.tiddlywiki type: text/vnd.tiddlywiki
The [[system tag|SystemTags]] `$:/tags/Image` marks (core) images The [[system tag|SystemTags]] `$:/tags/Image` marks core images. An overview of system icons can be found in the [[Icon Gallery]]

View File

@ -1,4 +1,6 @@
title: ActionWidget Execution Modes title: ActionWidget Execution Modes
modified: 20211026094722447
created: 20211003094722447
<<.from-version "5.2.0">> The default behaviour of action widgets has some peculiarities that often cause confusion. There is now an improved mode that simplifies how things work, but due to BackwardsCompatibility constraints, it must be explicitly engaged in order to take advantage of it. <<.from-version "5.2.0">> The default behaviour of action widgets has some peculiarities that often cause confusion. There is now an improved mode that simplifies how things work, but due to BackwardsCompatibility constraints, it must be explicitly engaged in order to take advantage of it.
@ -21,9 +23,9 @@ Current value of ActionTestTiddler: {{ActionTestTiddler}}
Click me Click me
</$button>'/> </$button>'/>
The new behaviour avoids these problems by refreshing all widgets before execution, not just action widgets. It is engaged by running the actions in a scopr that includes the variable `tv-action-refresh-policy` set to the value `always`. The new behaviour avoids these problems by refreshing all widgets before execution, not just action widgets. It is engaged by running the actions in a scope that includes the variable `tv-action-refresh-policy` set to the value `always`. (The default value for `tv-action-refresh-policy` is `once`).
This can be done within an action string, or via a local variable declaration containing the widget triggering the action. The assignment can be done within an action string, or via a local variable declaration containing the widget triggering the action.
<<.warning "Do not attempt to set `tv-action-refresh-policy` globally; the core will only work correctly with the default setting">> <<.warning "Do not attempt to set `tv-action-refresh-policy` globally; the core will only work correctly with the default setting">>