#39, Add multi-column shortcode
This commit is contained in:
parent
cf6720efad
commit
c80bd79dcd
7 changed files with 80 additions and 10 deletions
|
@ -2,6 +2,14 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.flex-auto {
|
||||||
|
flex: 1 1 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flex-even {
|
||||||
|
flex: 1 1;
|
||||||
|
}
|
||||||
|
|
||||||
.justify-start {
|
.justify-start {
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ disablePathToLower = true
|
||||||
enableGitInfo = true
|
enableGitInfo = true
|
||||||
|
|
||||||
# Code highlight
|
# Code highlight
|
||||||
pygmentsStyle = 'monokailight'
|
# pygmentsStyle = 'monokailight'
|
||||||
pygmentsCodeFences = true
|
pygmentsCodeFences = true
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
|
@ -11,7 +11,7 @@ disablePathToLower: true
|
||||||
enableGitInfo: true
|
enableGitInfo: true
|
||||||
|
|
||||||
# Code highlight
|
# Code highlight
|
||||||
pygmentsStyle: monokailight
|
# pygmentsStyle: monokailight
|
||||||
pygmentsCodeFences: true
|
pygmentsCodeFences: true
|
||||||
|
|
||||||
params:
|
params:
|
||||||
|
|
|
@ -2,25 +2,47 @@
|
||||||
|
|
||||||
## Default
|
## Default
|
||||||
|
|
||||||
|
```tpl
|
||||||
|
{{</* expand */>}}
|
||||||
|
## Markdown content
|
||||||
|
Lorem markdownum insigne...
|
||||||
|
{{</* /expand */>}}
|
||||||
|
```
|
||||||
|
|
||||||
{{< expand >}}
|
{{< expand >}}
|
||||||
## Markdown content
|
## Markdown content
|
||||||
|
Lorem markdownum insigne...
|
||||||
Some text
|
|
||||||
{{< /expand >}}
|
{{< /expand >}}
|
||||||
|
|
||||||
## Custom label
|
## Custom label
|
||||||
|
|
||||||
|
```tpl
|
||||||
|
{{</* expand "Custom Label" "..." */>}}
|
||||||
|
## Markdown content
|
||||||
|
Lorem markdownum insigne...
|
||||||
|
{{</* /expand */>}}
|
||||||
|
```
|
||||||
|
|
||||||
{{< expand "Custom Label" "..." >}}
|
{{< expand "Custom Label" "..." >}}
|
||||||
## Markdown content
|
## Markdown content
|
||||||
|
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
|
||||||
Some text
|
stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
|
||||||
|
protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes.
|
||||||
|
Miseratus fonte Ditis conubia.
|
||||||
{{< /expand >}}
|
{{< /expand >}}
|
||||||
|
|
||||||
# Tabs
|
# Tabs
|
||||||
|
|
||||||
|
```tpl
|
||||||
|
{{</* tabs "uniqueid" */>}}
|
||||||
|
{{</* tab "MacOS" */>}} # MacOS Content {{</* /tab */>}}
|
||||||
|
{{</* tab "Linux" */>}} # Linux Content {{</* /tab */>}}
|
||||||
|
{{</* tab "Windows" */>}} # Windows Content {{</* /tab */>}}
|
||||||
|
{{</* /tabs */>}}
|
||||||
|
```
|
||||||
|
|
||||||
{{< tabs "uniqueid" >}}
|
{{< tabs "uniqueid" >}}
|
||||||
{{< tab "MacOS" >}}
|
{{< tab "MacOS" >}}
|
||||||
|
|
||||||
# MacOS
|
# MacOS
|
||||||
|
|
||||||
This is tab **MacOS** content.
|
This is tab **MacOS** content.
|
||||||
|
@ -55,3 +77,33 @@ protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes.
|
||||||
Miseratus fonte Ditis conubia.
|
Miseratus fonte Ditis conubia.
|
||||||
{{< /tab >}}
|
{{< /tab >}}
|
||||||
{{< /tabs >}}
|
{{< /tabs >}}
|
||||||
|
|
||||||
|
# Multi-Column shortcode
|
||||||
|
|
||||||
|
```tpl
|
||||||
|
{{</* column */>}} <!-- begin columns block -->
|
||||||
|
# Left Content
|
||||||
|
...
|
||||||
|
{{</* column /*/>}} <!-- columns separator -->
|
||||||
|
# Right Content
|
||||||
|
...
|
||||||
|
{{</* /column */>}} <!-- end columns block -->
|
||||||
|
```
|
||||||
|
|
||||||
|
{{< column >}}
|
||||||
|
# Left Content
|
||||||
|
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
|
||||||
|
stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
|
||||||
|
protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes.
|
||||||
|
Miseratus fonte Ditis conubia.
|
||||||
|
{{< column />}}
|
||||||
|
# Mid Content
|
||||||
|
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
|
||||||
|
stringit, frustra Saturnius uteroque inter!
|
||||||
|
{{< column />}}
|
||||||
|
# Right Content
|
||||||
|
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
|
||||||
|
stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
|
||||||
|
protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes.
|
||||||
|
Miseratus fonte Ditis conubia.
|
||||||
|
{{< /column >}}
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
||||||
{"Target":"book.min.bb64fbdb003b80d0a1548f9da7bfa22acc94fbb994c7df89c380263c0f5fbf14.css","MediaType":"text/css","Data":{"Integrity":"sha256-u2T72wA7gNChVI+dp7+iKsyU+7mUx9+Jw4AmPA9fvxQ="}}
|
{"Target":"book.min.c104bb061e603114d8caae951ee4fd5f4c3c731846b3f5b64e26b55524416940.css","MediaType":"text/css","Data":{"Integrity":"sha256-wQS7Bh5gMRTYyq6VHuT9X0w8cxhGs/W2Tia1VSRBaUA="}}
|
10
layouts/shortcodes/column.html
Normal file
10
layouts/shortcodes/column.html
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{{ if .Inner }}
|
||||||
|
<div class="flex">
|
||||||
|
<div class="flex-even">
|
||||||
|
{{ .Inner | markdownify }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{ else }}
|
||||||
|
</div> <!-- close current column -->
|
||||||
|
<div class="flex-even"> <!-- open new column -->
|
||||||
|
{{ end }}
|
Loading…
Reference in a new issue