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 0000000..421ec0d Binary files /dev/null and b/highlight/highlights.png differ 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 @@ +