hugo-theme-relearn/exampleSite/content/shortcodes/notice.en.md

206 lines
4.6 KiB
Markdown
Raw Normal View History

+++
description = "Disclaimers to help you structure your page"
title = "Notice"
+++
2017-08-20 15:10:29 +00:00
2021-07-16 20:04:22 +00:00
The notice shortcode shows four types of disclaimers to help you structure your page.
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
````go
{{%/* notice ( note | info | tip | warning ) [ <string> [ <string> ] ] */%}}
2021-07-16 20:04:22 +00:00
Some markup
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
The first parameter is required and indicates the type of notice.
The second parameter is optional. If provided, it will be used as the title of the notice. If not provided, then the type of notice will be used as the title. For example, the title of a warning notice will be "Warning".
The third parameter is optional. If provided, it will set the icon of near the title. For the standard types of notices, this is automatically determined but can be overridden with this parameter. If you want no icon at all, you have to set this parameter to `" "` (a non empty string filled with spaces).
2021-07-16 20:04:22 +00:00
## Examples
2021-07-16 20:04:22 +00:00
### Note
2017-08-20 15:10:29 +00:00
{{% notice note %}}
2021-07-16 20:04:22 +00:00
A **notice** disclaimer
You can add standard markdown syntax:
2021-07-16 20:04:22 +00:00
- multiple paragraphs
- bullet point lists
- _emphasized_, **bold** and even ***bold emphasized*** text
2021-07-16 20:04:22 +00:00
- [links](https://example.com)
- etc.
```plaintext
2021-07-16 20:04:22 +00:00
...and even source code
```
> the possiblities are endless (almost - including other shortcodes may or may not work)
2017-08-20 15:10:29 +00:00
{{% /notice %}}
2021-07-16 20:35:20 +00:00
{{% expand "Show markup" %}}
````go
2021-07-16 20:04:22 +00:00
{{%/* notice note */%}}
A **notice** disclaimer
You can add standard markdown syntax:
2021-07-16 20:04:22 +00:00
- multiple paragraphs
- bullet point lists
- _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
```plaintext
2021-07-16 20:04:22 +00:00
...and even source code
2017-08-20 15:10:29 +00:00
```
> the possiblities are endless (almost - including other shortcodes may or may not work)
2021-07-16 20:04:22 +00:00
{{%/* /notice */%}}
````
{{% /expand %}}
### Info
2017-08-20 15:10:29 +00:00
{{% notice info %}}
2021-07-16 20:04:22 +00:00
An **information** disclaimer
You can add standard markdown syntax:
2021-07-16 20:04:22 +00:00
- multiple paragraphs
- bullet point lists
- _emphasized_, **bold** and even ***bold emphasized*** text
2021-07-16 20:04:22 +00:00
- [links](https://example.com)
- etc.
```plaintext
2021-07-16 20:04:22 +00:00
...and even source code
```
> the possiblities are endless (almost - including other shortcodes may or may not work)
2017-08-20 15:10:29 +00:00
{{% /notice %}}
2021-07-16 20:35:20 +00:00
{{% expand "Show markup" %}}
````go
2021-07-16 20:04:22 +00:00
{{%/* notice info */%}}
An **information** disclaimer
You can add standard markdown syntax:
2021-07-16 20:04:22 +00:00
- multiple paragraphs
- bullet point lists
- _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
```plaintext
2021-07-16 20:04:22 +00:00
...and even source code
2017-08-20 15:10:29 +00:00
```
> the possiblities are endless (almost - including other shortcodes may or may not work)
2021-07-16 20:04:22 +00:00
{{%/* /notice */%}}
````
{{% /expand %}}
### Tip
2017-08-20 15:10:29 +00:00
{{% notice tip %}}
2021-07-16 20:04:22 +00:00
A **tip** disclaimer
You can add standard markdown syntax:
2021-07-16 20:04:22 +00:00
- multiple paragraphs
- bullet point lists
- _emphasized_, **bold** and even ***bold emphasized*** text
2021-07-16 20:04:22 +00:00
- [links](https://example.com)
- etc.
```plaintext
2021-07-16 20:04:22 +00:00
...and even source code
```
> the possiblities are endless (almost - including other shortcodes may or may not work)
2017-08-20 15:10:29 +00:00
{{% /notice %}}
2021-07-16 20:35:20 +00:00
{{% expand "Show markup" %}}
````go
2021-07-16 20:04:22 +00:00
{{%/* notice tip */%}}
A **tip** disclaimer
You can add standard markdown syntax:
2021-07-16 20:04:22 +00:00
- multiple paragraphs
- bullet point lists
- _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
```plaintext
2021-07-16 20:04:22 +00:00
...and even source code
2017-08-20 15:10:29 +00:00
```
> the possiblities are endless (almost - including other shortcodes may or may not work)
2021-07-16 20:04:22 +00:00
{{%/* /notice */%}}
````
{{% /expand %}}
### Warning
2017-08-20 15:10:29 +00:00
{{% notice warning %}}
2021-07-16 20:04:22 +00:00
A **warning** disclaimer
You can add standard markdown syntax:
2021-07-16 20:04:22 +00:00
- multiple paragraphs
- bullet point lists
- _emphasized_, **bold** and even ***bold emphasized*** text
2021-07-16 20:04:22 +00:00
- [links](https://example.com)
- etc.
```plaintext
2021-07-16 20:04:22 +00:00
...and even source code
```
> the possiblities are endless (almost - including other shortcodes may or may not work)
{{% /notice %}}
2021-07-16 20:04:22 +00:00
2021-07-16 20:35:20 +00:00
{{% expand "Show markup" %}}
````go
2021-07-16 20:04:22 +00:00
{{%/* notice warning */%}}
A **warning** disclaimer
You can add standard markdown syntax:
2021-07-16 20:04:22 +00:00
- multiple paragraphs
- bullet point lists
- _emphasized_, **bold** and even ***bold emphasized*** text
2021-07-16 20:04:22 +00:00
- [links](https://example.com)
- etc.
```plaintext
2021-07-16 20:04:22 +00:00
...and even source code
```
> the possiblities are endless (almost - including other shortcodes may or may not work)
2021-07-16 20:04:22 +00:00
{{%/* /notice */%}}
````
{{% /expand %}}
### Notice with default color, custom title and icon
You can customize the title of the notice by passing it as a second parameter.
{{% notice default "Pay Attention to this Note!" "skull-crossbones" %}}
The title is now the parameter that was provided.
{{% /notice %}}
{{% expand "Show markup" %}}
````go
{{%/* notice default "Pay Attention to this Note!" "skull-crossbones" */%}}
The title is now the parameter that was provided.
{{%/* /notice */%}}
````
{{% /expand %}}