diff --git a/assets/images/icons/alerts/alert.svg b/assets/images/icons/alerts/alert.svg new file mode 100644 index 00000000..320217da --- /dev/null +++ b/assets/images/icons/alerts/alert.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/images/icons/alerts/info.svg b/assets/images/icons/alerts/info.svg new file mode 100644 index 00000000..ba409a68 --- /dev/null +++ b/assets/images/icons/alerts/info.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/images/icons/alerts/light-bulb.svg b/assets/images/icons/alerts/light-bulb.svg new file mode 100644 index 00000000..61ce7906 --- /dev/null +++ b/assets/images/icons/alerts/light-bulb.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/images/icons/alerts/report.svg b/assets/images/icons/alerts/report.svg new file mode 100644 index 00000000..66a48dd5 --- /dev/null +++ b/assets/images/icons/alerts/report.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/images/icons/alerts/stop.svg b/assets/images/icons/alerts/stop.svg new file mode 100644 index 00000000..670147ea --- /dev/null +++ b/assets/images/icons/alerts/stop.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/layouts/_default/_markup/render-blockquote.html b/layouts/_default/_markup/render-blockquote.html new file mode 100644 index 00000000..c8bfdd73 --- /dev/null +++ b/layouts/_default/_markup/render-blockquote.html @@ -0,0 +1,33 @@ +{{- $icons := dict + "caution" "images/icons/alerts/stop.svg" + "important" "images/icons/alerts/report.svg" + "note" "images/icons/alerts/info.svg" + "tip" "images/icons/alerts/light-bulb.svg" + "warning" "images/icons/alerts/alert.svg" +-}} + +{{- $Attrs := "" }} +{{- range $key, $value := .Attributes }} + {{- if $value }} + {{- $Attrs = printf "%s %s=%q" $Attrs $key $value }} + {{- end }} +{{- end }} +{{- $Attrs = trim $Attrs " " }} + +{{- if eq .Type "alert" -}} + {{- with .Attributes.class }} + {{- $Attrs = trim (replace $Attrs . (printf "alert alert-%s %s" $.AlertType .)) " " }} + {{- else }} + {{- $Attrs = trim (printf "class=%q %s" (printf "alert alert-%s" $.AlertType) $Attrs) " " }} + {{- end -}} +
+ {{- dict "Src" $icon | partial "plugin/icon.html" }} + {{- or (T .AlertType) (title .AlertType) -}} +
+ {{- .Text | safeHTML -}} +{{ .Text | safeHTML }}+{{- end -}}