You've already forked no-js-hugo-theme
Added "notice" shortcodes
These notices have three types: note, tip, and warning.
This commit is contained in:
13
layouts/shortcodes/notice.html
Normal file
13
layouts/shortcodes/notice.html
Normal 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>
|
Reference in New Issue
Block a user