From 6c5915c04659a992635742074b2ad92d3e97a9df Mon Sep 17 00:00:00 2001 From: Jieiku Date: Mon, 1 May 2023 15:08:23 -0700 Subject: Replace import with use --- templates/shortcodes/note.html | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 templates/shortcodes/note.html (limited to 'templates/shortcodes/note.html') diff --git a/templates/shortcodes/note.html b/templates/shortcodes/note.html new file mode 100644 index 0000000..b2420e9 --- /dev/null +++ b/templates/shortcodes/note.html @@ -0,0 +1,30 @@ +{# note shortcode with icon and border + + type: ok / info / warning / error / neutral / other + display: block / icon / both + size: small / medium / large + markdown: true / false + + example: + + {% note(type="ok", display="block", size="small" markdown=true) %} + *Sample* "ok" note. With display "block" + And **markdown** content. + {% end %} +#} + +{# define defaults #} +{% if not type %}{% set type="neutral" %}{% endif %} +{% if not display %}{% set display="block" %}{% endif %} +{% if not size %}{% set size="small" %}{% endif %} +{% if not markdown %}{% set markdown=true %}{% endif %} + +
+{% if markdown %}{{ body | markdown | safe }} +{% else %}{{ body | safe }} +{% endif %} +
-- cgit v1.3.1