mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-17 23:34:50 +00:00
d3e178becc
A new widget to handle scrollable areas. We’ll use it both for the story river and the sidebar.
63 lines
1.1 KiB
Plaintext
63 lines
1.1 KiB
Plaintext
title: $:/core/ui/PageMacros
|
|
|
|
\define colour(name)
|
|
<$transclude tiddler={{$:/palette}} index="$name$"/>
|
|
\end
|
|
\define color(name)
|
|
<<colour $name$>>
|
|
\end
|
|
\define tabs(tabsList,default,state:"$:/state/tab")
|
|
<div class="tw-tab-buttons">
|
|
<$list filter="$tabsList$" variable="currentTab">
|
|
<$button set=<<qualify "$state$">> setTo=<<currentTab>> default="$default$" selectedClass="tw-tab-selected">
|
|
<$transclude tiddler=<<currentTab>> field="caption">
|
|
<$macrocall $name="currentTab" $type="text/plain" $output="text/plain"/>
|
|
</$transclude> </$button>
|
|
</$list>
|
|
</div>
|
|
<div class="tw-tab-divider"/>
|
|
<div class="tw-tab-content">
|
|
|
|
<$list filter="$tabsList$" variable="currentTab">
|
|
<$reveal type="match" state=<<qualify "$state$">> text=<<currentTab>> default="$default$">
|
|
|
|
<$transclude tiddler=<<currentTab>>/>
|
|
|
|
</$reveal>
|
|
</$list>
|
|
</div>
|
|
\end
|
|
\define wikitext-example(src)
|
|
```
|
|
$src$
|
|
```
|
|
|
|
Renders as:
|
|
|
|
$src$
|
|
|
|
In HTML:
|
|
|
|
$$$text/vnd.tiddlywiki>text/html
|
|
$src$
|
|
$$$
|
|
|
|
\end
|
|
\define wikitext-example-without-html(src)
|
|
```
|
|
$src$
|
|
```
|
|
|
|
Renders as:
|
|
|
|
$src$
|
|
|
|
\end
|
|
\define lingo-base()
|
|
$:/lingo/
|
|
\end
|
|
\define lingo(title)
|
|
{{$(lingo-base)$$title$}}
|
|
\end
|
|
{{$:/core/ui/PageTemplate}}
|