mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-27 01:33:04 +00:00
docs: document how to use tabs inside tabs #388
This commit is contained in:
parent
8b8814d696
commit
cd0df6349c
1 changed files with 72 additions and 0 deletions
|
@ -160,3 +160,75 @@ See what happens to this tab view if you select **properties** tab from the prev
|
||||||
```
|
```
|
||||||
{{% /tab %}}
|
{{% /tab %}}
|
||||||
{{< /tabs >}}
|
{{< /tabs >}}
|
||||||
|
|
||||||
|
### Nested Tabs
|
||||||
|
|
||||||
|
In case you want to nest tabs, the parent tab that contains the subtabs 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.
|
||||||
|
|
||||||
|
````go
|
||||||
|
{{</* tabs groupid="main" */>}}
|
||||||
|
{{</* tab name="Text" */>}}
|
||||||
|
Simple text is possible here...
|
||||||
|
{{</* tabs groupid="tabs-example-language" */>}}
|
||||||
|
{{%/* tab name="python" */%}}
|
||||||
|
Python is **super** easy.
|
||||||
|
|
||||||
|
- most of the time.
|
||||||
|
- if you don't want to output unicode
|
||||||
|
{{%/* /tab */%}}
|
||||||
|
{{%/* tab name="bash" */%}}
|
||||||
|
Bash is for **hackers**.
|
||||||
|
{{%/* /tab */%}}
|
||||||
|
{{</* /tabs */>}}
|
||||||
|
{{</* /tab */>}}
|
||||||
|
|
||||||
|
{{</* tab name="Code" */>}}
|
||||||
|
...but no markdown
|
||||||
|
{{</* tabs groupid="tabs-example-language" */>}}
|
||||||
|
{{%/* tab name="python" */%}}
|
||||||
|
```python
|
||||||
|
print("Hello World!")
|
||||||
|
```
|
||||||
|
{{%/* /tab */%}}
|
||||||
|
{{%/* tab name="bash" */%}}
|
||||||
|
```bash
|
||||||
|
echo "Hello World!"
|
||||||
|
```
|
||||||
|
{{%/* /tab */%}}
|
||||||
|
{{</* /tabs */>}}
|
||||||
|
{{</* /tab */>}}
|
||||||
|
{{</* /tabs */>}}
|
||||||
|
````
|
||||||
|
|
||||||
|
{{< tabs groupid="main" >}}
|
||||||
|
{{< tab name="Text" >}}
|
||||||
|
Simple text is possible here...
|
||||||
|
{{< tabs groupid="tabs-example-language" >}}
|
||||||
|
{{% tab name="python" %}}
|
||||||
|
Python is **super** easy.
|
||||||
|
|
||||||
|
- most of the time.
|
||||||
|
- if you don't want to output unicode
|
||||||
|
{{% /tab %}}
|
||||||
|
{{% tab name="bash" %}}
|
||||||
|
Bash is for **hackers**.
|
||||||
|
{{% /tab %}}
|
||||||
|
{{< /tabs >}}
|
||||||
|
{{< /tab >}}
|
||||||
|
|
||||||
|
{{< tab name="Code" >}}
|
||||||
|
...but no markdown
|
||||||
|
{{< tabs groupid="tabs-example-language" >}}
|
||||||
|
{{% tab name="python" %}}
|
||||||
|
```python
|
||||||
|
print("Hello World!")
|
||||||
|
```
|
||||||
|
{{% /tab %}}
|
||||||
|
{{% tab name="bash" %}}
|
||||||
|
```bash
|
||||||
|
echo "Hello World!"
|
||||||
|
```
|
||||||
|
{{% /tab %}}
|
||||||
|
{{< /tabs >}}
|
||||||
|
{{< /tab >}}
|
||||||
|
{{< /tabs >}}
|
||||||
|
|
Loading…
Reference in a new issue