From 77e30f5346708bb4839dafe13bbad4511380f2b0 Mon Sep 17 00:00:00 2001 From: Kim Oliver Drechsel Date: Fri, 14 Jan 2022 15:45:13 +0100 Subject: [PATCH] add highlight box --- highlight/README.md | 31 ++++++++++++++ highlight/css/style.css | 40 +++++++++++++++++++ highlight/highlights.png | Bin 0 -> 9987 bytes highlight/shortcodes/highlight/critical.html | 3 ++ highlight/shortcodes/highlight/info.html | 3 ++ highlight/shortcodes/highlight/warning.html | 3 ++ highlight/static/highlight_critical.svg | 1 + highlight/static/highlight_info.svg | 1 + highlight/static/highlight_warning.svg | 1 + 9 files changed, 83 insertions(+) create mode 100644 highlight/README.md create mode 100644 highlight/css/style.css create mode 100644 highlight/highlights.png create mode 100644 highlight/shortcodes/highlight/critical.html create mode 100644 highlight/shortcodes/highlight/info.html create mode 100644 highlight/shortcodes/highlight/warning.html create mode 100644 highlight/static/highlight_critical.svg create mode 100644 highlight/static/highlight_info.svg create mode 100644 highlight/static/highlight_warning.svg diff --git a/highlight/README.md b/highlight/README.md new file mode 100644 index 0000000..80897e6 --- /dev/null +++ b/highlight/README.md @@ -0,0 +1,31 @@ +# Highlight boxes in Hugo + +## Install + +1. Add the shortcode files to `layouts/shortcodes` +2. Add the css code to your project +3. Add the icon vector files in your project to `/static` + +## Usage + +```hugo +{{< highlight/info >}} + This is a highlighted text +{{< /highlight/info >}} +``` + +```hugo +{{< highlight/warning >}} + Make sure the Public Key is known to the Git Server. +{{< /highlight/warning >}} +``` + +```hugo +{{< highlight/critical >}} + This is a highlighted text +{{< /highlight/critical >}} +``` + +## Preview + +![Highlight Boxes in Hugo](highlights.png) \ No newline at end of file diff --git a/highlight/css/style.css b/highlight/css/style.css new file mode 100644 index 0000000..1e3a6f5 --- /dev/null +++ b/highlight/css/style.css @@ -0,0 +1,40 @@ +.highlight-box { + margin-top: 10px; + margin-bottom: 10px; + padding: 10px; +} + +.highlight-box::before { + content: ""; + display: block; + width: 25px; + height: 25px; + float: left; + margin: 0 6px 0 0; +} + +.info { + background-color: #242930; +} + +.info::before { + background: url("/highlight_info.svg") no-repeat; +} + +.warning { + background-color: #d8b92e; + color: #202429; +} + +.warning::before { + background: url("/highlight_warning.svg") no-repeat; +} + +.critical { + background-color: #d82e2e; + color: #202429; +} + +.critical::before { + background: url("/highlight_critical.svg") no-repeat; +} diff --git a/highlight/highlights.png b/highlight/highlights.png new file mode 100644 index 0000000000000000000000000000000000000000..421ec0dbd6de7f6478c6f4a718506f022413a42a GIT binary patch literal 9987 zcmch7d011|x;Iu^v{X=OMMa>N3bryS3J8QamMW7Ypva&IH~L-#8#|9mo9OG~#|^S6YCcy>-p%Pjlg{yoRh0aF}h&pDqn{bJP* z3%d_Z>l7CszIpV4-7>+lYn-nKj)a?E%x!-YL~7E_)cSlN=y7Ce<(0nlO%s_%_q99D zU{374mFD5^z5Ul;TT-tkhpg9GuicS(+h^~o4(3#@VtY?r7@dsD4;$STT`*$X>#FD) zj1COL$>`+hu>!K#hj(fT6yEG+E_4YRZE=Ebx^mIlT3Si>^`Rwd*+dT;L6=ZZ(o!w0 zS6w$y&`tI(u`YD6HUICv6v;=!#bvWhipdz&Kd;?FXyXrd(2Bdc5=K|}WswweI;gZ{9E@P;(SDPV)x7@kP*B_u(CeOPsRPRwOf zns0%v{3bmwAD_@HO^UTqTX=DBv<-qs7*^Ikd46u&TAD3LAb_{a!WGCW)@X>ET-x_fXg} z%$e}yv4ZEGIGa-jP&!A*8rGkUOsZZj+I-UAK>X22;&5J+>S&npC*@lRbD1i5BXxv@ebU5bFL}a zY4HrJ1aHZLcH`BN%ByJVON^8@RWmIeIL4gt+L48aQjcZw;pxNkV_qjf!fc-Mh~oXQ z`1N;hD*UXhS15c6o{R8L%i>q4i^XWF=qk#mDBr!@*tb*>6F;hcExnas{l=9r(I3pz znd+S9FU&HV!NK=GsrNBa4BMF_Brtssk|Gx^MeU@GKkzHj_iACsJ(PX5Mm_?5mf+3k1^@MuR zX(>C#j_k%u;4kf4d54Im_f=^P8Je>0Iw?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I*%MLK%<{e4gt Pv<@Ed++V&o=-2-MGOW$; literal 0 HcmV?d00001 diff --git a/highlight/shortcodes/highlight/critical.html b/highlight/shortcodes/highlight/critical.html new file mode 100644 index 0000000..237adc4 --- /dev/null +++ b/highlight/shortcodes/highlight/critical.html @@ -0,0 +1,3 @@ +
+ {{.Inner}} +
diff --git a/highlight/shortcodes/highlight/info.html b/highlight/shortcodes/highlight/info.html new file mode 100644 index 0000000..0ca14a0 --- /dev/null +++ b/highlight/shortcodes/highlight/info.html @@ -0,0 +1,3 @@ +
+ {{.Inner}} +
diff --git a/highlight/shortcodes/highlight/warning.html b/highlight/shortcodes/highlight/warning.html new file mode 100644 index 0000000..bd9938c --- /dev/null +++ b/highlight/shortcodes/highlight/warning.html @@ -0,0 +1,3 @@ +
+ {{.Inner}} +
diff --git a/highlight/static/highlight_critical.svg b/highlight/static/highlight_critical.svg new file mode 100644 index 0000000..0da46b9 --- /dev/null +++ b/highlight/static/highlight_critical.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/highlight/static/highlight_info.svg b/highlight/static/highlight_info.svg new file mode 100644 index 0000000..6ac8e08 --- /dev/null +++ b/highlight/static/highlight_info.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/highlight/static/highlight_warning.svg b/highlight/static/highlight_warning.svg new file mode 100644 index 0000000..581b088 --- /dev/null +++ b/highlight/static/highlight_warning.svg @@ -0,0 +1 @@ + \ No newline at end of file