Added "notice" shortcodes

These notices have three types: note, tip, and warning.
This commit is contained in:
Steven Engler
2019-09-13 16:12:16 -04:00
parent 492f067084
commit b0101a0a1a
5 changed files with 207 additions and 0 deletions

View File

@ -0,0 +1,13 @@
{{- .Scratch.Set "type" "note" -}}
{{- with .Get 0 }}{{ $.Scratch.Set "type" . }}{{ end -}}
<aside class="notice {{ .Scratch.Get "type" }}">
<hr>
<div class="notice-title">
<img class="notice-title-icon" src="{{ "images/exclamation.svg" | relURL }}" height="15">
<span>{{ with .Get 1 }}{{ . }}{{ else }}{{ .Scratch.Get "type" | humanize }}{{ end }}</span>
</div>
<div class="notice-body">
{{ .Inner | markdownify }}
</div>
<hr>
</aside>