2021-08-25 11:33:29 +00:00
+++
description = "Disclaimers to help you structure your page"
title = "Notice"
+++
2017-08-20 15:10:29 +00:00
2022-05-25 21:39:19 +00:00
The `notice` shortcode shows various types of disclaimers with adjustable color, title and icon to help you structure your page.
2022-05-23 22:37:03 +00:00
{{% notice style="primary" title="There may be pirates" icon="skull-crossbones" %}}
It is all about the boxes.
{{% /notice %}}
2017-08-20 15:10:29 +00:00
2021-07-16 20:04:22 +00:00
## Usage
2017-08-20 15:10:29 +00:00
2022-10-31 11:10:36 +00:00
While the examples are using shortcodes with named parameter you are free to use positional as well or also call this shortcode from your own partials.
2022-05-23 22:37:03 +00:00
2022-05-29 21:35:16 +00:00
{{< tabs groupId = "shortcode-parameter" > }}
2022-06-22 22:03:24 +00:00
{{% tab name="shortcode" %}}
2022-05-23 22:37:03 +00:00
````go
{{%/* notice style="primary" title="There may be pirates" icon="skull-crossbones" */%}}
It is all about the boxes.
{{%/* /notice */%}}
````
{{% /tab %}}
2022-06-22 22:03:24 +00:00
{{% tab name="shortcode (positional)" %}}
2022-05-23 22:37:03 +00:00
2021-08-23 21:32:34 +00:00
````go
2022-05-23 22:37:03 +00:00
{{%/* notice primary "There may be pirates" "skull-crossbones" */%}}
It is all about the boxes.
2017-08-20 15:10:29 +00:00
{{%/* /notice */%}}
2021-07-16 20:04:22 +00:00
````
2017-08-20 15:10:29 +00:00
2022-06-22 22:03:24 +00:00
{{% /tab %}}
{{% tab name="partial" %}}
````go
{{ partial "shortcodes/notice.html" (dict
"context" .
"style" "primary"
"title" "There may be pirates"
"icon" "skull-crossbones"
"content" "It is all about the boxes."
)}}
````
2022-05-23 22:37:03 +00:00
{{% /tab %}}
{{< / tabs > }}
2021-10-22 02:20:30 +00:00
2022-05-23 22:37:03 +00:00
### Parameter
2022-06-05 17:31:59 +00:00
| Name | Position | Default | Notes |
|:----------|:---------|:----------|:------------|
2023-01-23 23:14:10 +00:00
| **style** | 1 | `default` | The style scheme used for the box.< br >< br > - by severity: `info` , `note` , `tip` , `warning` < br > - by brand color: `primary` , `secondary` , `accent` < br > - by color: `blue` , `green` , `grey` , `orange` , `red` < br > - by special color: `default` , `transparent` |
2023-01-23 21:35:43 +00:00
| **color** | | see notes | The [CSS color value ](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value ) to be used. If not set, the chosen color depends on the **style** . Any given value will overwrite the default.< br >< br > - for severity styles: a nice matching color for the severity< br > - for all other styles: the corresponding color |
| **title** | 2 | see notes | Arbitrary text for the box title. Depending on the **style** there may be a default title. Any given value will overwrite the default.< br >< br > - for severity styles: the matching title for the severity< br > - for all other styles: _<empty>_ < br >< br > If you want no title for a severity style, you have to set this parameter to `" "` (a non empty string filled with spaces) |
| **icon** | 3 | see notes | [Font Awesome icon name ]({{%relref "shortcodes/icon#finding-an-icon" %}} ) set to the left of the title. Depending on the **style** there may be a default icon. Any given value will overwrite the default.< br >< br > - for severity styles: a nice matching icon for the severity< br > - for all other styles: _<empty>_ < br >< br > If you want no icon for a severity style, you have to set this parameter to `" "` (a non empty string filled with spaces) |
2022-10-31 11:10:36 +00:00
| _**<content>**_ | | _<empty>_ | Arbitrary text to be displayed in box. |
2021-10-22 02:20:30 +00:00
2021-07-16 20:04:22 +00:00
## Examples
2021-08-23 20:16:08 +00:00
2022-05-23 22:37:03 +00:00
### By Severity
2017-08-20 15:10:29 +00:00
2022-05-23 22:37:03 +00:00
#### Info with markup
2022-06-07 18:30:07 +00:00
````go
{{%/* notice style="info" */%}}
2022-05-23 22:37:03 +00:00
An **information** disclaimer
2021-07-16 20:04:22 +00:00
2022-05-23 12:59:24 +00:00
You can add standard markdown syntax:
2021-07-16 17:48:48 +00:00
2021-07-16 20:04:22 +00:00
- multiple paragraphs
- bullet point lists
2022-06-07 18:30:07 +00:00
- _emphasized_, **bold** and even ** *bold emphasized*** text
2021-07-16 20:04:22 +00:00
- [links ](https://example.com )
- etc.
2021-08-23 21:32:34 +00:00
```plaintext
2021-07-16 20:04:22 +00:00
...and even source code
```
2022-10-31 11:10:36 +00:00
> the possibilities are endless (almost - including other shortcodes may or may not work)
2022-06-07 18:30:07 +00:00
{{%/* /notice */%}}
````
2022-05-23 22:37:03 +00:00
2022-06-07 18:30:07 +00:00
{{% notice style="info" %}}
2022-05-23 22:37:03 +00:00
An **information** disclaimer
2021-07-16 20:04:22 +00:00
2022-05-23 12:59:24 +00:00
You can add standard markdown syntax:
2021-07-16 20:04:22 +00:00
- multiple paragraphs
- bullet point lists
2022-06-07 18:30:07 +00:00
- _emphasized_, **bold** and even **_bold emphasized_** text
2021-07-16 20:04:22 +00:00
- [links ](https://example.com )
- etc.
2017-08-20 15:10:29 +00:00
2021-08-23 21:32:34 +00:00
```plaintext
2021-07-16 20:04:22 +00:00
...and even source code
2017-08-20 15:10:29 +00:00
```
2022-10-31 11:10:36 +00:00
> the possibilities are endless (almost - including other shortcodes may or may not work)
2022-05-23 22:37:03 +00:00
{{% /notice %}}
2021-07-16 20:04:22 +00:00
2022-06-07 18:30:07 +00:00
#### Note
2021-07-16 20:04:22 +00:00
2022-05-23 22:37:03 +00:00
````go
{{%/* notice style="note" */%}}
A **notice** disclaimer
{{%/* /notice */%}}
````
2021-07-16 20:04:22 +00:00
2022-06-07 18:30:07 +00:00
{{% notice style="note" %}}
A **notice** disclaimer
2017-08-20 15:10:29 +00:00
{{% /notice %}}
2022-06-07 18:30:07 +00:00
#### Tip
2022-05-23 22:37:03 +00:00
2021-08-23 21:32:34 +00:00
````go
2022-05-23 22:37:03 +00:00
{{%/* notice style="tip" */%}}
A **tip** disclaimer
````
2021-07-16 20:04:22 +00:00
2022-06-07 18:30:07 +00:00
{{% notice style="tip" %}}
A **tip** disclaimer
2022-05-23 22:37:03 +00:00
{{% /notice %}}
2017-08-20 15:10:29 +00:00
2022-06-07 18:30:07 +00:00
#### Warning
2022-05-23 22:37:03 +00:00
````go
{{%/* notice style="warning" */%}}
A **warning** disclaimer
2021-07-16 20:04:22 +00:00
{{%/* /notice */%}}
````
2022-05-23 22:37:03 +00:00
2022-06-07 18:30:07 +00:00
{{% notice style="warning" %}}
2022-05-23 22:37:03 +00:00
A **warning** disclaimer
{{% /notice %}}
2021-07-16 20:04:22 +00:00
2022-06-07 18:30:07 +00:00
#### Warning with Non-Default Title and Icon
2021-07-16 20:04:22 +00:00
2022-05-23 22:37:03 +00:00
````go
{{%/* notice style="warning" title="Here are dragons" icon="dragon" */%}}
A **warning** disclaimer
{{%/* /notice */%}}
````
2021-07-16 20:04:22 +00:00
2022-06-07 18:30:07 +00:00
{{% notice style="warning" title="Here are dragons" icon="dragon" %}}
2022-05-23 22:37:03 +00:00
A **warning** disclaimer
2017-08-20 15:10:29 +00:00
{{% /notice %}}
2022-06-07 18:30:07 +00:00
#### Warning without a Title and Icon
2022-05-23 22:37:03 +00:00
2021-08-23 21:32:34 +00:00
````go
2022-05-23 22:37:03 +00:00
{{%/* notice style="warning" title=" " icon=" " */%}}
A **warning** disclaimer
{{%/* /notice */%}}
````
2021-07-16 20:04:22 +00:00
2022-06-07 18:30:07 +00:00
{{% notice style="warning" title=" " icon=" " %}}
A **warning** disclaimer
{{% /notice %}}
2021-07-16 20:04:22 +00:00
2022-05-23 22:37:03 +00:00
### By Brand Colors
2017-08-20 15:10:29 +00:00
2022-06-05 17:31:59 +00:00
#### Primary with Title only
2017-08-20 15:10:29 +00:00
2022-05-23 22:37:03 +00:00
````go
{{%/* notice style="primary" title="Primary" */%}}
A **primary** disclaimer
2021-07-16 20:04:22 +00:00
{{%/* /notice */%}}
````
2022-05-23 22:37:03 +00:00
2022-06-07 18:30:07 +00:00
{{% notice style="primary" title="Primary" %}}
A **primary** disclaimer
2022-05-23 22:37:03 +00:00
{{% /notice %}}
2021-07-16 20:04:22 +00:00
2022-06-07 18:30:07 +00:00
#### Secondary with Icon only
2021-07-16 20:04:22 +00:00
2022-05-23 22:37:03 +00:00
````go
{{%/* notice style="secondary" icon="stopwatch" */%}}
A **secondary** disclaimer
{{%/* /notice */%}}
````
2021-07-16 20:04:22 +00:00
2022-06-07 18:30:07 +00:00
{{% notice style="secondary" icon="stopwatch" %}}
A **secondary** disclaimer
{{% /notice %}}
2021-07-16 20:04:22 +00:00
2023-01-23 23:14:10 +00:00
#### Accent
````go
{{%/* notice style="accent" */%}}
An **accent** disclaimer
{{%/* /notice */%}}
````
{{% notice style="accent" %}}
An **accent** disclaimer
{{% /notice %}}
2022-05-23 22:37:03 +00:00
### By Color
2022-06-05 17:31:59 +00:00
#### Blue without a Title and Icon
2022-05-23 22:37:03 +00:00
2021-08-23 21:32:34 +00:00
````go
2022-05-23 22:37:03 +00:00
{{%/* notice style="blue" */%}}
A **blue** disclaimer
{{%/* /notice */%}}
````
2021-07-16 20:04:22 +00:00
2022-06-07 18:30:07 +00:00
{{% notice style="blue" %}}
A **blue** disclaimer
2022-05-23 22:37:03 +00:00
{{% /notice %}}
2021-07-16 20:04:22 +00:00
2022-06-07 18:30:07 +00:00
#### Green with Title only
2022-05-23 22:37:03 +00:00
````go
{{%/* notice style="green" title="Green" */%}}
A **green** disclaimer
2021-07-16 20:04:22 +00:00
{{%/* /notice */%}}
````
2022-05-23 22:37:03 +00:00
2022-06-07 18:30:07 +00:00
{{% notice style="green" title="Green" %}}
A **green** disclaimer
2022-05-23 22:37:03 +00:00
{{% /notice %}}
2022-06-07 18:30:07 +00:00
#### Grey with Icon only
2022-05-23 22:37:03 +00:00
````go
{{%/* notice style="grey" icon="bug" */%}}
A **grey** disclaimer
{{%/* /notice */%}}
````
2022-06-07 18:30:07 +00:00
{{% notice style="grey" icon="bug" %}}
A **grey** disclaimer
2022-05-23 22:37:03 +00:00
{{% /notice %}}
2022-06-07 18:30:07 +00:00
#### Orange with Title and Icon
2022-05-23 22:37:03 +00:00
````go
{{%/* notice style="orange" title="Orange" icon="bug" */%}}
A **orange** disclaimer
{{%/* /notice */%}}
````
2022-06-07 18:30:07 +00:00
{{% notice style="orange" title="Orange" icon="bug" %}}
A **orange** disclaimer
2022-05-23 22:37:03 +00:00
{{% /notice %}}
2023-01-14 00:39:28 +00:00
#### Red without a Title and Icon
2022-05-23 22:37:03 +00:00
````go
{{%/* notice style="red" */%}}
A **red** disclaimer
{{%/* /notice */%}}
````
2022-06-07 18:30:07 +00:00
{{% notice style="red" %}}
A **red** disclaimer
{{% /notice %}}
2022-05-23 22:37:03 +00:00
### By Special Color
2023-01-23 21:35:43 +00:00
#### Default with Positional Parameter
2021-10-22 02:20:30 +00:00
````go
2023-01-23 21:35:43 +00:00
{{%/* notice default "Pay Attention to this Note!" "skull-crossbones" */%}}
2022-05-23 22:37:03 +00:00
Some serious information.
2021-10-22 02:20:30 +00:00
{{%/* /notice */%}}
````
2022-05-23 22:37:03 +00:00
2022-06-07 18:30:07 +00:00
{{% notice default "Pay Attention to this Note!" "skull-crossbones" %}}
2022-05-23 22:37:03 +00:00
Some serious information.
{{% /notice %}}
2022-06-07 18:30:07 +00:00
#### Transparent with Title and Icon
2022-05-23 22:37:03 +00:00
````go
2023-01-23 21:35:43 +00:00
{{%/* notice style="transparent" title="Pay Attention to this Note!" icon="skull-crossbones" */%}}
2022-05-23 22:37:03 +00:00
Some serious information.
{{%/* /notice */%}}
````
2022-06-07 18:30:07 +00:00
{{% notice style="transparent" title="Pay Attention to this Note!" icon="skull-crossbones" %}}
Some serious information.
{{% /notice %}}
2023-01-23 21:35:43 +00:00
2023-03-14 20:48:18 +00:00
### With User-Defined Color, Font Awesome Brand Icon and Markdown Title
2023-01-23 21:35:43 +00:00
````go
2023-03-14 20:48:18 +00:00
{{%/* notice color="fuchsia" title="**Hugo**" icon="fab fa-hackerrank" */%}}
2023-01-23 21:35:43 +00:00
Victor? Is it you?
{{%/* /notice */%}}
````
2023-03-14 20:48:18 +00:00
{{% notice color="fuchsia" title="**Hugo**" icon="fab fa-hackerrank" %}}
2023-01-23 21:35:43 +00:00
Victor? Is it you?
{{% /notice %}}