mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-27 01:33:04 +00:00
tags: allow markdown in tab name #538
This commit is contained in:
parent
547da8e919
commit
2b789843bb
3 changed files with 11 additions and 11 deletions
|
@ -67,7 +67,7 @@ printf("Hello World!");
|
|||
|
||||
### Mixed content
|
||||
|
||||
{{% tab name="Mixed" %}}
|
||||
{{% tab name="_**Mixed**_" %}}
|
||||
|
||||
A tab can not only contain code but arbitrary text. In this case text and code will get a margin.
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ While pressing a tab of group A switches all tab views of group A in sync (if th
|
|||
{ "Hello": "World" }
|
||||
```
|
||||
{{%/* /tab */%}}
|
||||
{{%/* tab name="XML" */%}}
|
||||
{{%/* tab name="_**XML**_ stuff" */%}}
|
||||
```xml
|
||||
<Hello>World</Hello>
|
||||
```
|
||||
|
@ -117,7 +117,7 @@ Hello = World
|
|||
{ "Hello": "World" }
|
||||
```
|
||||
{{%/* /tab */%}}
|
||||
{{%/* tab name="XML" */%}}
|
||||
{{%/* tab name="XML stuff" */%}}
|
||||
```xml
|
||||
<Hello>World</Hello>
|
||||
```
|
||||
|
@ -133,7 +133,7 @@ Hello = World
|
|||
{ "Hello": "World" }
|
||||
```
|
||||
{{%/* /tab */%}}
|
||||
{{%/* tab name="XML" */%}}
|
||||
{{%/* tab name="XML stuff" */%}}
|
||||
```xml
|
||||
<Hello>World</Hello>
|
||||
```
|
||||
|
@ -152,7 +152,7 @@ Hello = World
|
|||
{ "Hello": "World" }
|
||||
```
|
||||
{{% /tab %}}
|
||||
{{% tab name="XML" %}}
|
||||
{{% tab name="_**XML**_ stuff" %}}
|
||||
```xml
|
||||
<Hello>World</Hello>
|
||||
```
|
||||
|
@ -172,7 +172,7 @@ Hello = World
|
|||
{ "Hello": "World" }
|
||||
```
|
||||
{{% /tab %}}
|
||||
{{% tab name="XML" %}}
|
||||
{{% tab name="XML stuff" %}}
|
||||
```xml
|
||||
<Hello>World</Hello>
|
||||
```
|
||||
|
@ -187,7 +187,7 @@ Hello = World
|
|||
{ "Hello": "World" }
|
||||
```
|
||||
{{% /tab %}}
|
||||
{{% tab name="XML" %}}
|
||||
{{% tab name="XML stuff" %}}
|
||||
```xml
|
||||
<Hello>World</Hello>
|
||||
```
|
||||
|
|
|
@ -6,17 +6,17 @@
|
|||
<div class="tab-nav">
|
||||
{{- range $idx, $tab := $tabs }}
|
||||
<button
|
||||
data-tab-item="{{ .name }}"
|
||||
data-tab-item="{{ .name | markdownify | plainify }}"
|
||||
class="tab-nav-button{{ cond (eq $idx 0) " active" ""}}"
|
||||
onclick="switchTab('{{ $groupid }}','{{ .name }}')"
|
||||
onclick="switchTab('{{ $groupid }}','{{ .name | markdownify | plainify}}')"
|
||||
>
|
||||
<span>{{ .name }}</span></button>
|
||||
<span>{{ .name | markdownify }}</span></button>
|
||||
{{- end }}
|
||||
</div>
|
||||
<div class="tab-content">
|
||||
{{- range $idx, $tab := $tabs }}
|
||||
<div
|
||||
data-tab-item="{{ .name }}"
|
||||
data-tab-item="{{ .name | markdownify | plainify }}"
|
||||
class="tab-content-text{{ cond (eq $idx 0) " active" ""}}"
|
||||
>
|
||||
{{ .content | safeHTML }}</div><!-- no line break allowed here because of awkward behavior of Hugo 110 or this theme when tag shortcode is called standalone outside of tags shortcode ? -->
|
||||
|
|
Loading…
Reference in a new issue