0%

Note (Bootstrap Callout)

Settings

next/_config.yml
1
2
3
4
5
6
7
8
9
10
11
note:
# Note tag style values:
# - simple bs-callout old alert style. Default.
# - modern bs-callout new (v2-v3) alert style.
# - flat flat callout style with background, like on Mozilla or StackOverflow.
# - disabled disable all CSS styles import of note tag.
style: simple
icons: false
# Offset lighter of background in % for modern and flat styles (modern: -12 | 12; flat: -18 | 6).
# Offset also applied to label tag variables. This option can work with disabled note tag.
light_bg_offset: 0

Usage

note.js
1
2
3
4
5
6
7
8
{% note [class] [no-icon] %}
Any content (support inline tags too.io).
{% endnote %}

[class] : default | primary | success | info | warning | danger.
[no-icon] : Disable icon in note.

All parameters are optional.

Examples

1
2
3
4
{% note %}
#### Header
(without define class style)
{% endnote %}

(without define class style)

1
2
3
4
{% note default %}
#### Default Header
Welcome to [Hexo!](https://hexo.io)
{% endnote %}

Default Header

Welcome to Hexo!

1
2
3
4
{% note primary %}
#### Primary Header
**Welcome** to [Hexo!](https://hexo.io)
{% endnote %}

Primary Header

Welcome to Hexo!

1
2
3
4
{% note info %}
### Info Header
**Welcome** to [Hexo!](https://hexo.io)
{% endnote %}

Info Header

Welcome to Hexo!

1
2
3
4
{% note success %}
#### Success Header
**Welcome** to [Hexo!](https://hexo.io)
{% endnote %}

Success Header

Welcome to Hexo!

1
2
3
4
{% note warning %}
#### Warning Header
**Welcome** to [Hexo!](https://hexo.io)
{% endnote %}

Warning Header

Welcome to Hexo!

1
2
3
4
{% note danger %}
#### Danger Header
**Welcome** to [Hexo!](https://hexo.io)
{% endnote %}

Danger Header

Welcome to Hexo!

1
2
3
4
5
6
7
8
{% note info no-icon %}
#### No icon note
Note **without** icon: `note info no-icon`

note info, note info, note info
note info, note info, note info
note info, note info, note info
{% endnote %}

No icon note

Note without icon: note info no-icon

note info, note info, note info
note info, note info, note info
note info, note info, note info

1
2
3
4
5
6
7
8
{% note success %}
#### Codeblock in note
{% code %}
code block in note tag
code block in note tag
code block in note tag
{% endcode %}
{% endnote %}

Codeblock in note

1
2
3
code block in note tag
code block in note tag
code block in note tag
1
2
3
4
5
6
7
8
9
10
11
12
13
14
{% note default %}
#### Lists in note
* ul
* ul
* ul
* ul
* ul

1. ol
2. ol
1. ol
2. ol
3. ol
{% endnote %}

Здесь возникают ошибки в Markdown

Lists in note

  • ul
  • ul
    • ul
    • ul
  • ul
  1. ol
  2. ol
    1. ol
    2. ol
  3. ol
1
2
3
4
5
6
7
8
#### Table in Note
{% note default %}
| 1 | 2 |
| - | - |
| 3 | 4 |
| 5 | 6 |
| 7 | 8 |
{% endnote %}

Table in note

12
34
56
78

Вложенный Список

1
2
3
4
5
6

1. Lists can be nested
* Four spaces
- Eight spaces
+ Twelve spaces
2. And back
  1. Lists can be nested
    • Four spaces
      • Eight spaces
        • Twelve spaces
  2. And back