mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-09-11 14:59:43 +00:00
![Jermolene](/assets/img/avatar_default.png)
In practice, if you look at TabsMacro you’ll see that the width of the tab content is wrong, and will usually overflow the container. Next step is to fix that by using flexbox…
67 lines
1.2 KiB
Plaintext
67 lines
1.2 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",class)
|
|
<div class="tw-tab-set $class$">
|
|
<div class="tw-tab-buttons $class$">
|
|
<$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 $class$"/><div class="tw-tab-content $class$">
|
|
<$list filter="$tabsList$" variable="currentTab">
|
|
<$reveal type="match" state=<<qualify "$state$">> text=<<currentTab>> default="$default$">
|
|
<$transclude tiddler=<<currentTab>> mode="block"/>
|
|
</$reveal>
|
|
</$list>
|
|
</div>
|
|
</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}}
|