#39, Add multi-column shortcode

This commit is contained in:
Alex Shpak 2019-05-22 16:17:55 +02:00
parent cf6720efad
commit c80bd79dcd
7 changed files with 80 additions and 10 deletions

View File

@ -2,6 +2,14 @@
display: flex;
}
.flex-auto {
flex: 1 1 auto;
}
.flex-even {
flex: 1 1;
}
.justify-start {
justify-content: flex-start;
}
@ -50,4 +58,4 @@
a.active {
color: $color-link;
}
}
}

View File

@ -11,7 +11,7 @@ disablePathToLower = true
enableGitInfo = true
# Code highlight
pygmentsStyle = 'monokailight'
# pygmentsStyle = 'monokailight'
pygmentsCodeFences = true
[params]

View File

@ -11,7 +11,7 @@ disablePathToLower: true
enableGitInfo: true
# Code highlight
pygmentsStyle: monokailight
# pygmentsStyle: monokailight
pygmentsCodeFences: true
params:

View File

@ -2,25 +2,47 @@
## Default
```tpl
{{</* expand */>}}
## Markdown content
Lorem markdownum insigne...
{{</* /expand */>}}
```
{{< expand >}}
## Markdown content
Some text
Lorem markdownum insigne...
{{< /expand >}}
## Custom label
```tpl
{{</* expand "Custom Label" "..." */>}}
## Markdown content
Lorem markdownum insigne...
{{</* /expand */>}}
```
{{< expand "Custom Label" "..." >}}
## Markdown content
Some text
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.
{{< /expand >}}
# Tabs
```tpl
{{</* tabs "uniqueid" */>}}
{{</* tab "MacOS" */>}} # MacOS Content {{</* /tab */>}}
{{</* tab "Linux" */>}} # Linux Content {{</* /tab */>}}
{{</* tab "Windows" */>}} # Windows Content {{</* /tab */>}}
{{</* /tabs */>}}
```
{{< tabs "uniqueid" >}}
{{< tab "MacOS" >}}
# MacOS
This is tab **MacOS** content.
@ -55,3 +77,33 @@ protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes.
Miseratus fonte Ditis conubia.
{{< /tab >}}
{{< /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 >}}

View File

@ -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="}}

View 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 }}