mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
footnotes: render at end of page for all shortcodes #547
This commit is contained in:
parent
bbdaafd0d7
commit
61a3995389
14 changed files with 20 additions and 15 deletions
|
@ -4,7 +4,9 @@ You can add standard markdown syntax:
|
|||
- bullet point lists
|
||||
- _emphasized_, **bold** and even **_bold emphasized_** text
|
||||
- [links](https://example.com)
|
||||
- etc.
|
||||
- etc.[^etc]
|
||||
|
||||
[^etc]: Et Cetera (English: /ɛtˈsɛtərə/), abbreviated to etc., etc, et cet., is a Latin expression that is used in English to mean "and other similar things", or "and so forth"
|
||||
|
||||
```plaintext
|
||||
...and even source code
|
||||
|
|
|
@ -7,6 +7,7 @@ title = "Children"
|
|||
The `children` shortcode lists the child pages of the current page and its descendants.
|
||||
|
||||
{{% children sort="weight" %}}
|
||||
|
||||
## Usage
|
||||
|
||||
While the examples are using shortcodes with named parameter you are free to also call this shortcode from your own partials.
|
||||
|
|
|
@ -5,7 +5,19 @@ title = "Expand"
|
|||
|
||||
The `expand` shortcode displays an expandable/collapsible section of text.
|
||||
|
||||
{{% expand title="Expand me..." %}}Thank you!{{% /expand %}}
|
||||
{{% expand title="Expand me..." %}}Thank you!
|
||||
|
||||
That's some text with a footnote[^1]
|
||||
|
||||
[^1]: And that's the footnote.
|
||||
|
||||
That's some more text with a footnote.[^someid]
|
||||
|
||||
[^someid]:
|
||||
Anything of interest goes here.
|
||||
|
||||
Blue light glows blue.
|
||||
{{% /expand %}}
|
||||
|
||||
{{% notice note %}}
|
||||
This only works in modern browsers flawlessly. While Internet Explorer 11 has issues in displaying it, the functionality still works.
|
||||
|
|
|
@ -16,5 +16,5 @@
|
|||
{{- $icon = printf "fa-fw fas fa-%s" $icon }}
|
||||
{{- end }}
|
||||
{{- with $context -}}
|
||||
<span class="badge cstyle {{ $style }}{{ if or $icon $title }} badge-with-title{{ end }}">{{ if or $icon $title }}<span class="badge-title">{{ if $icon }}<i class="{{ $icon }}"></i>{{ end }}{{ if and $icon $title }} {{ end }}{{ if $title }}{{ $title | markdownify }}{{ end }}</span>{{ end }}<span class="badge-content"{{ if $color }} style="background-color: {{ $color }};"{{ end }}>{{ $content }}</span></span>
|
||||
<span class="badge cstyle {{ $style }}{{ if or $icon $title }} badge-with-title{{ end }}">{{ if or $icon $title }}<span class="badge-title">{{ if $icon }}<i class="{{ $icon }}"></i>{{ end }}{{ if and $icon $title }} {{ end }}{{ if $title }}{{ $title | markdownify }}{{ end }}</span>{{ end }}<span class="badge-content"{{ if $color }} style="background-color: {{ $color }};"{{ end }}>{{ $content | markdownify }}</span></span>
|
||||
{{- end }}
|
|
@ -45,7 +45,7 @@
|
|||
{{- if and $icon (eq $iconposition "left") }}
|
||||
<i class="{{ $icon }}"></i>
|
||||
{{- end }}
|
||||
{{ $title | safeHTML }}
|
||||
{{ $title | markdownify }}
|
||||
{{- if and $icon (eq $iconposition "right") }}
|
||||
<i class="{{ $icon }}"></i>
|
||||
{{- end }}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
{{- $_hugo_config := `{ "version": 1 }` }}
|
||||
{{- partial "shortcodes/attachments.html" (dict
|
||||
"context" .Page
|
||||
"color" (.Get "color")
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
{{- $_hugo_config := `{ "version": 1 }` }}
|
||||
{{- partial "shortcodes/badge.html" (dict
|
||||
"context" .Page
|
||||
"color" (.Get "color")
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
{{- $_hugo_config := `{ "version": 1 }` }}
|
||||
{{- partial "shortcodes/button.html" (dict
|
||||
"context" .Page
|
||||
"color" (.Get "color")
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
{{- $_hugo_config := `{ "version": 1 }` }}
|
||||
{{- partial "shortcodes/children.html" (dict
|
||||
"context" .Page
|
||||
"containerstyle" (.Get "containerstyle")
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
{{- $_hugo_config := `{ "version": 1 }` }}
|
||||
{{- $version := split hugo.Version "." }}
|
||||
{{- $major := int (index $version 0) }}
|
||||
{{- $minor := int (index $version 1) }}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
{{- $_hugo_config := `{ "version": 1 }` }}
|
||||
{{- partial "shortcodes/icon.html" (dict
|
||||
"context" .Page
|
||||
"icon" (.Get "icon" | default (.Get 0))
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
{{- $_hugo_config := `{ "version": 1 }` }}
|
||||
{{- partial "shortcodes/math.html" (dict
|
||||
"context" .Page
|
||||
"content" .Inner
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
{{- $_hugo_config := `{ "version": 1 }` }}
|
||||
{{- partial "shortcodes/mermaid.html" (dict
|
||||
"context" .Page
|
||||
"content" .Inner
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
<!-- {{- .Inner }} -->
|
||||
{{- $_hugo_config := `{ "version": 1 }` }}
|
||||
{{- partial "shortcodes/notice.html" (dict
|
||||
"context" .Page
|
||||
"color" (.Get "color")
|
||||
|
|
Loading…
Reference in a new issue