diff options
author | Marc <56593749+MarcMocker@users.noreply.github.com> | 2022-01-25 15:16:30 +0300 |
---|---|---|
committer | zhaohuabing <zhaohuabing@gmail.com> | 2022-01-28 10:17:56 +0300 |
commit | af443f5874ce61ce33f7ad6428730cb5dbb6d5d0 (patch) | |
tree | 3d526a8b79343710a29f0367527dd4477ee3269d | |
parent | a431e5009ebd8114c6d12a37985f646470537e58 (diff) |
Added nice little boxes for hints, warnings and tips
-rw-r--r-- | layouts/shortcodes/notice.html | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/layouts/shortcodes/notice.html b/layouts/shortcodes/notice.html new file mode 100644 index 0000000..59724fe --- /dev/null +++ b/layouts/shortcodes/notice.html @@ -0,0 +1,60 @@ +{{ $_hugo_config := `{ "version": 1 }` }} +<style media="screen"> + /* notice block */ + div.notices { + margin: 2rem 0; + position: relative; + } + div.notices p { + padding: 15px; + display: block; + /*font-size: 1rem;*/ + margin-top: 0rem; + margin-bottom: 0rem; + color: #666; + } + div.notices p:first-child:before { + position: absolute; + top: 2px; + color: #fff; + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: "\f06a"; + left: 10px; + } + div.notices p:first-child:after { + position: absolute; + top: 2px; + color: #fff; + left: 3rem; + } + div.notices.info p { + border-top: 30px solid #F0B37E; + background: #FFF2DB; + } + div.notices.info p:first-child:after { + content: 'Info'; + } + div.notices.warning p { + border-top: 30px solid rgba(217, 83, 79, 0.8); + background: #FAE2E2; + } + div.notices.warning p:first-child:after { + content: 'Warning'; + } + div.notices.note p { + border-top: 30px solid #6AB0DE; + background: #E7F2FA; + } + div.notices.note p:first-child:after { + content: 'Note'; + } + div.notices.tip p { + border-top: 30px solid rgba(92, 184, 92, 0.8); + background: #E6F9E6; + } + div.notices.tip p:first-child:after { + content: 'Tip'; + } +</style> +<div class="notices {{ .Get 0 }}" {{ if len .Params | eq 2 }} id="{{ .Get 1 }}" {{ end }}>{{ .Inner }}</div> |