diff options
author | Alex Shpak <alex-shpak@users.noreply.github.com> | 2019-06-11 13:40:50 +0200 |
---|---|---|
committer | Alex Shpak <alex-shpak@users.noreply.github.com> | 2019-06-11 13:41:08 +0200 |
commit | c9d979514c009e8b28d99cff2614b92019ccd5c8 (patch) | |
tree | 0d32b30207415e2182926724e9b37de4bebdee4a /layouts/shortcodes | |
parent | 2047968370a4bc61037e0d73f2ce76acb1d7774a (diff) |
Add custom class support for mermaid and button shortcodes
Diffstat (limited to 'layouts/shortcodes')
-rw-r--r-- | layouts/shortcodes/button.html | 4 | ||||
-rw-r--r-- | layouts/shortcodes/mermaid.html | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/layouts/shortcodes/button.html b/layouts/shortcodes/button.html index 88b0f20..98d2cdd 100644 --- a/layouts/shortcodes/button.html +++ b/layouts/shortcodes/button.html @@ -7,4 +7,6 @@ {{ with .Get "relref" }} {{ $ref = relref $ . }} {{ end }} -<a {{ with $ref }} href="{{.}}" {{ end }} {{ with $target }} target="{{.}}" {{ end }} class="book-btn">{{ $.Inner }}</a> +<a {{ with $ref }} href="{{.}}" {{ end }} {{ with $target }} target="{{.}}" {{ end }} class="book-btn{{ with .Get "class" }} {{ . }}{{ end }}"> + {{ $.Inner }} +</a> diff --git a/layouts/shortcodes/mermaid.html b/layouts/shortcodes/mermaid.html index 66eb4a6..f569bc4 100644 --- a/layouts/shortcodes/mermaid.html +++ b/layouts/shortcodes/mermaid.html @@ -4,6 +4,6 @@ {{ .Page.Scratch.Set "mermaid" true }} {{ end }} -<p class="mermaid"> +<p class="mermaid{{ with .Get "class" }} {{ . }}{{ end }}"> {{ .Inner }} </p> |