Docs updates

This commit is contained in:
Jeremy Ruston 2013-10-23 23:12:19 +01:00
parent c95ce5ff4c
commit d3df2c5860
3 changed files with 15 additions and 40 deletions

View File

@ -1,11 +1,12 @@
title: GridWidget
tags: widget
The grid widget assembles tiddlers into a tabular grid based on their titles. For example:
The video widget is not yet (re)implemented.
```
The grid widget assembles tiddlers into a tabular grid based on their titles. For example:
<$grid prefix="GridDemo" rows=3 cols=3/>
```
In this case, the following tiddlers will be rendered:
@ -16,3 +17,4 @@ In this case, the following tiddlers will be rendered:
The result is:
<$grid prefix="GridDemo" rows=3 cols=3/>
```

View File

@ -1,47 +1,14 @@
title: LinkWidget
tags: widget
The `link` widget generates links to tiddlers and external URIs. Optionally, hovering over a link can trigger the display of another tiddler as a popup.
The `link` widget generates links to tiddlers.
! Attributes
! Content and Attributes
* `to` - link target can be a URL
* `hover` - the title of a tiddler containing the popup state to set when hovering over the link
* `qualifyHoverTitles` - if this attribute is present then the title of the hover state tiddler is qualified as described in the PopupMechanism
|!Attribute |!Description |
|to |The title of the target tiddler for the link |
The `to` attribute is interpreted as an external link if it matches this regular expression:
```
/(?:file|http|https|mailto|ftp|irc|news|data):[^\s'"]+(?:\/|\b)/i
```
! Examples
The `hover` attribute is part of the PopupMechanism.
For example:
```
`$:/MyHover` is {{$:/MyHover}}
<$link to="HelloThere" hover="$:/MyHover">Hover me to see ~HelloThere!</$link>
<$reveal state="$:/MyHover" type="popup">
<div class="tw-drop-down">
{{HelloThere}}
</div>
</$reveal>
```
Renders as:
`$:/MyHover` is {{$:/MyHover}}
<$link to="HelloThere" hover="$:/MyHover">Hover me to see ~HelloThere!</$link>
<$reveal state="$:/MyHover" type="popup">
<div class="tw-drop-down">
{{HelloThere}}
</div>
</$reveal>
The content of the link widget is rendered within the `<a>` tag.
! CSS Classes
@ -70,3 +37,5 @@ Link targets default to the URL encoded title of the tiddler. The `href` can be
```
\define tw-wikilink-template() http://tiddlywiki.com/#$uri_encoded$
```
Note that in the browser the `<a>` element generated by the link widget has a JavaScript event handler that navigates directly to the target tiddler, ignoring the `href` attribute.

View File

@ -1,6 +1,9 @@
title: VideoWidget
tags: widget
The video widget is not yet (re)implemented.
```
Here is a collection of embedded videos. Try opening and closing tiddlers while the videos are playing; they should not be affected.
<$video src="32001208" type="vimeo" />
@ -8,3 +11,4 @@ Here is a collection of embedded videos. Try opening and closing tiddlers while
<$video src="wvWHnK2FiCk" type="youtube" />
<$video src="santa_claus_conquers_the_martians_ipod" type="archiveorg" />
```