Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zhaohuabing/hugo-theme-cleanwhite.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzhaohuabing <zhaohuabing@gmail.com>2022-02-09 11:18:09 +0300
committerzhaohuabing <zhaohuabing@gmail.com>2022-02-09 11:18:09 +0300
commit956baaf0c7a2020db0f79fec94540134eb2002a6 (patch)
treedb818bb88399be6463df2700cb02e5a7da9ed3d5
parent6a502b277bf95e1b3b00d303470c75a0aaec41ee (diff)
parentd75909d6b8d9c71e4bb93ca2eb751e7bd80b20a2 (diff)
Merge branch 'master' of https://github.com/zhaohuabing/hugo-theme-cleanwhite
-rw-r--r--layouts/shortcodes/notice.html61
1 files changed, 61 insertions, 0 deletions
diff --git a/layouts/shortcodes/notice.html b/layouts/shortcodes/notice.html
new file mode 100644
index 0000000..86298ab
--- /dev/null
+++ b/layouts/shortcodes/notice.html
@@ -0,0 +1,61 @@
+{{ $_hugo_config := `{ "version": 1 }` }}
+<style media="screen">
+ /* notice block */
+ div.notices {
+ margin: 2rem 0;
+ position: relative;
+ }
+ div.notices p {
+ padding: 15px;
+ white-space: pre-wrap;
+ 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>