From 1b7157d341020302ea14cedfe0472bebfc9d9fb6 Mon Sep 17 00:00:00 2001 From: Daniel Tomlinson Date: Tue, 9 Jun 2020 01:41:36 +0100 Subject: [PATCH] Adding icons to admonitions --- layouts/shortcodes/notice.html | 96 ++++++++++++++++++++++++++++++++-- 1 file changed, 92 insertions(+), 4 deletions(-) diff --git a/layouts/shortcodes/notice.html b/layouts/shortcodes/notice.html index 6ea6a03..fc6869d 100644 --- a/layouts/shortcodes/notice.html +++ b/layouts/shortcodes/notice.html @@ -5,11 +5,99 @@ {{- $block := findRE "(?is)^<(?:address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h(?:1|2|3|4|5|6)|header|hgroup|hr|li|main|nav|noscript|ol|output|p|pre|section|table|tfoot|ul|video)\\b" $raw 1 -}} {{/* Count how many times we've called this shortcode and load the css if it's the first time */}} {{- if not ($.Page.Scratch.Get "noticecount") -}} - - + + + + + + + + + + + + + + + {{- end -}} {{- $.Page.Scratch.Add "noticecount" 1 -}}
-

{{- i18n $noticeType -}}

-{{- if or $block (not $raw) }}{{ $raw }}{{ else }}

{{ $raw }}

{{ end -}} +

+ + {{- i18n $noticeType -}}

+ {{- if or $block (not $raw) }}{{ $raw }}{{ else }}

{{ $raw }}

{{ end -}}