The tabs shortcode displays arbitrary content in an unlimited number of tabs.
The AI native programming language.
echo"For guys who like to tinker."
For the connoisseur of programming.
Usage
{{<tabs>}}{{%tabtitle="Python Saying"%}}TheAInativeprogramminglanguage.{{%/tab%}}{{%tabtitle="Terminal Sourcecode"%}}```bash
echo "For guys who like to tinker."
```{{%/tab%}}{{%tabcolor="fuchsia"title="C Ramblings"%}}Fortheconnoisseurofprogramming.{{%/tab%}}{{%tabcolor="red"title="C++ Ramblings++"%}}Fortheguysthatcancopewithsyntax.{{%/tab%}}{{%tabtitle="C# ~~GC is cool~~"%}}Forguysthatneedtwodestructors.{{%/tab%}}{{</tabs>}}
{{partial"shortcodes/tabs.html"(dict"page"."content"(slice(dict"content""The AI native programming language.""title""Python Saying")(dict"content""```bash\necho \"For guys who like to tinker.\"\n```""title""Terminal Sourcecode")(dict"color""fuchsia""content""For the connoisseur of programming.""title""C Ramblings")(dict"color""red""content""For the guys that can cope with syntax.""title""C++ Ramblings++")(dict"content""For guys that need two destructors.""title""C# ~~GC is cool~~")))}}
Parameters
Name
Default
Notes
groupid
<random>
Arbitrary name of the group the tab view belongs to.
Tab views with the same groupid synchronize their selected tab. The tab selection is restored automatically based on the groupid for tab view. If the selected tab cannot be found in a tab group the first tab is selected instead.
This synchronization applies to the whole site!
style
<empty>
Sets a default value for every contained tab. Can be overridden by each tab. See the tab parameters for possible values.
color
<empty>
Sets a default value for every contained tab. Can be overridden by each tab. See the tab parameters for possible values.
Each tab of the view is defined with the tab shortcode.
Name
Default
Notes
style
see notes
The style scheme used for the tab. If you don’t set a style and you display a single code block inside of the tab, its default styling will adapt to that of a code block. Otherwise default is used.
- by severity: caution, important, info, note, tip, warning - by brand color: primary, secondary, accent - by color: blue, cyan, green, grey, magenta, orange, red - by special color: default, transparent, code, link, action, inline
In case you want to nest tab views, the parent tab that contains nested tab views needs to be declared with {{< tab >}} instead of {{% tab %}}. Note, that in this case it is not possible to put markdown in the parent tab.
You can also set style and color parameter for all tabs and overwrite them on tab level. See the tab parameters for possible values.
{{partial"shortcodes/tabs.html"(dict"page"."content"(slice(dict"content""Simple text is possible here...""content"(partial"shortcodes/tabs.html"(dict"page"."content"(slice(dict"content""Python is **super** easy.\n\n- most of the time.\n- if you don't want to output unicode""title""python")(dict"content""Bash is for **hackers**.""title""bash"))"groupid""tabs-example-language"))"title""Text")(dict"color""darkorchid""content""...but no markdown""content"(partial"shortcodes/tabs.html"(dict"page"."content"(slice(dict"content""```python\nprint(\"Hello World!\")\n```""title""python")(dict"content""```bash\necho \"Hello World!\"\n```""title""bash"))"groupid""tabs-example-language"))"style""default""title""Code"))"groupid""main""icon""thumbtack""style""primary""title""Rationale")}}
{{partial"shortcodes/tab.html"(dict"page"."content""A tab cannot only contain code but arbitrary text. In this case text **and** code will get a margin.\n```python\nprintf(\"Hello World!\");\n```""title""_**Mixed**_")}}
A tab cannot only contain code but arbitrary text. In this case text and code will get a margin.
printf("Hello World!");
Understanding style and color Behavior
The style parameter affects how the color parameter is applied.
{{<tabs>}}{{%tabstyle="blue"title="just colored style"%}}The`style`parameterissettoacolorstyle.Thiswillsetthebackgroundtoalighterversionofthechosenstylecolorasconfiguredinyourthemevariant.{{%/tab%}}{{%tabcolor="blue"title="just color"%}}Onlythe`color`parameterisset.ThiswillsetthebackgroundtoalighterversionofthechosenCSScolorvalue.{{%/tab%}}{{%tabcolor="blue"style="default"title="default style and color"%}}The`style`parameteraffectshowthe`color`parameterisapplied.The`default`stylewillsetthebackgroundtoyour`--MAIN-BG-color`asconfiguredforyourthemevariantresemblingthedefaultstylebutwithdifferentcolor.{{%/tab%}}{{%tabstyle="info"title="just severity style"%}}The`style`parameterissettoaseveritystyle.Thiswillsetthebackgroundtoalighterversionofthechosenstylecolorasconfiguredinyourthemevariantandalsoaffectsthechosenicon.{{%/tab%}}{{%tabcolor="blue"style="info"title="severity style and color"%}}The`style`parameteraffectshowthe`color`parameterisapplied.ThiswillsetthebackgroundtoalighterversionofthechosenCSScolorvalueandalsoaffectsthechosenicon.{{%/tab%}}{{</tabs>}}
{{partial"shortcodes/tabs.html"(dict"page"."content"(slice(dict"content""The `style` parameter is set to a color style.\n\nThis will set the background to a lighter version of the chosen style color as configured in your theme variant.""style""blue""title""just colored style")(dict"color""blue""content""Only the `color` parameter is set.\n\nThis will set the background to a lighter version of the chosen CSS color value.""title""just color")(dict"color""blue""content""The `style` parameter affects how the `color` parameter is applied.\n\nThe `default` style will set the background to your `--MAIN-BG-color` as configured for your theme variant resembling the default style but with different color.""style""default""title""default style and color")(dict"content""The `style` parameter is set to a severity style.\n\nThis will set the background to a lighter version of the chosen style color as configured in your theme variant and also affects the chosen icon.""style""info""title""just severity style")(dict"color""blue""content""The `style` parameter affects how the `color` parameter is applied.\n\nThis will set the background to a lighter version of the chosen CSS color value and also affects the chosen icon.""style""info""title""severity style and color")))}}
The style parameter is set to a color style.
This will set the background to a lighter version of the chosen style color as configured in your theme variant.
Only the color parameter is set.
This will set the background to a lighter version of the chosen CSS color value.
The style parameter affects how the color parameter is applied.
The default style will set the background to your --MAIN-BG-color as configured for your theme variant resembling the default style but with different color.
The style parameter is set to a severity style.
This will set the background to a lighter version of the chosen style color as configured in your theme variant and also affects the chosen icon.
The style parameter affects how the color parameter is applied.
This will set the background to a lighter version of the chosen CSS color value and also affects the chosen icon.