Steven Engler b0101a0a1a Added "notice" shortcodes
These notices have three types: note, tip, and warning.
2019-09-13 16:12:16 -04:00

14 lines
447 B
HTML

{{- .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>