hugo-toha/layouts/shortcodes/mermaid.html
James Ray c89fe66332
Add optional mermaid shortcode (#551)
* add optional mermaid shotcode

* Use page level configuration for mermaid + use local file

Signed-off-by: hossainemruz <hossainemruz@gmail.com>

* Fix comment

Co-authored-by: Emruz Hossain <hossainemruz@gmail.com>
Co-authored-by: Emruz Hossain <emruz@appscode.com>
2022-03-13 15:53:27 +00:00

13 lines
346 B
HTML

{{ $alignment:= .Get "align"}}
{{ if not $alignment }}
{{ $alignment = "center"}}
{{ end }}
{{ $background:= .Get "background" }}
{{ if not $background }}
{{ $background = "none"}}
{{ end }}
<div class="mermaid" align="{{ $alignment }}" style="background-color: {{ $background }}; border-radius: 5px;">
{{ safeHTML .Inner }}
</div>