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

213 lines
3.9 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> ] */%}}
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".
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:
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)
- other shortcodes besides `notice`
- etc.
```plaintext
2021-07-16 20:04:22 +00:00
...and even source code
```
> the possiblities are endless
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:
- multiple paragraphs
- bullet point lists
- _emphasized_, **bold** and even ***bold emphasized*** text
2021-07-16 20:04:22 +00:00
- [links](https://example.com)
- other shortcodes besides `notice`
- 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
```
2021-07-16 20:04:22 +00:00
> the possiblities are endless
{{%/* /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:
- multiple paragraphs
- bullet point lists
- _emphasized_, **bold** and even ***bold emphasized*** text
2021-07-16 20:04:22 +00:00
- [links](https://example.com)
- other shortcodes besides `notice`
- etc.
```plaintext
2021-07-16 20:04:22 +00:00
...and even source code
```
> the possiblities are endless
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:
- multiple paragraphs
- bullet point lists
- _emphasized_, **bold** and even ***bold emphasized*** text
2021-07-16 20:04:22 +00:00
- [links](https://example.com)
- other shortcodes besides `notice`
- 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
```
2021-07-16 20:04:22 +00:00
> the possiblities are endless
{{%/* /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:
- multiple paragraphs
- bullet point lists
- _emphasized_, **bold** and even ***bold emphasized*** text
2021-07-16 20:04:22 +00:00
- [links](https://example.com)
- other shortcodes besides `notice`
- etc.
```plaintext
2021-07-16 20:04:22 +00:00
...and even source code
```
> the possiblities are endless
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:
- multiple paragraphs
- bullet point lists
- _emphasized_, **bold** and even ***bold emphasized*** text
2021-07-16 20:04:22 +00:00
- [links](https://example.com)
- other shortcodes besides `notice`
- 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
```
2021-07-16 20:04:22 +00:00
> the possiblities are endless
{{%/* /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:
- multiple paragraphs
- bullet point lists
- _emphasized_, **bold** and even ***bold emphasized*** text
2021-07-16 20:04:22 +00:00
- [links](https://example.com)
- other shortcodes besides `notice`
- etc.
```plaintext
2021-07-16 20:04:22 +00:00
...and even source code
```
> the possiblities are endless
{{% /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:
- multiple paragraphs
- bullet point lists
- _emphasized_, **bold** and even ***bold emphasized*** text
2021-07-16 20:04:22 +00:00
- [links](https://example.com)
- other shortcodes besides `notice`
- etc.
```plaintext
2021-07-16 20:04:22 +00:00
...and even source code
```
> the possiblities are endless
{{%/* /notice */%}}
````
{{% /expand %}}
2022-02-10 23:59:40 +00:00
### Notice with custom title and default color
You can customize the title of the notice by passing it as a second parameter.
2022-02-10 23:59:40 +00:00
{{% notice default "Pay Attention to this Note!" %}}
The title is now the parameter that was provided.
{{% /notice %}}
{{% expand "Show markup" %}}
````go
2022-02-10 23:59:40 +00:00
{{%/* notice default "Pay Attention to this Note!" */%}}
The title is now the parameter that was provided.
{{%/* /notice */%}}
````
{{% /expand %}}