You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replaced FontAwesome with integrated SVG icons. (#18)
* Removed dependency to FontAwesome and embedded icons as SVG directly.
* Support dark mode for callout alert style.
* Moved alert type naming from 'danger' to 'attention'. Introduced type mappings to support mapping further alert type keys to existing definitions, e.g. map legacy alert type 'danger' to new type definition 'attention'.
Copy file name to clipboardExpand all lines: README.md
+28-25Lines changed: 28 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@
6
6
7
7
This docsify plugin converts blockquotes into beautiful alerts. Look and feel can be configured on a global as well as on a alert specific level so output does fit your needs (some examples are shown below). In addition, you can provide own alert types.
8
8
9
-

9
+

10
10
11
11
## Installation and Usage
12
12
@@ -21,16 +21,7 @@ Assuming you have a working [docsify](https://docsify.js.org) app set up, it is
2. In docsify setup configure the plugin so it does fit your needs. A custom setup is not mandatory. By default styles `flat` and `callout` (Default: `callout`) and types `NOTE`, `TIP`, `WARNING` and `DANGER` are supported. Following mappings between type and heading is used:
25
-
26
-
| Type | Heading |
27
-
|------|---------|
28
-
| NOTE | Note |
29
-
| TIP | Tip |
30
-
| WARNING | Warning |
31
-
| DANGER | Attention |
32
-
33
-
**Be aware of different meaning between alert type and heading used for a specific type.**
24
+
2. In docsify setup configure the plugin so it does fit your needs. A custom setup is not mandatory. By default styles `flat` and `callout` (Default: `callout`) and types `NOTE`, `TIP`, `WARNING` and `ATTENTION` are supported.
34
25
35
26
You can change it using plugin configuration via `index.html` or for a single alert in your markdown files. (please see section `Customizations` for further details)
36
27
@@ -61,7 +52,7 @@ Assuming you have a working [docsify](https://docsify.js.org) app set up, it is
61
52
warning: {
62
53
label:"Warnung"
63
54
},
64
-
danger: {
55
+
attention: {
65
56
label:"Achtung"
66
57
}
67
58
}
@@ -93,7 +84,7 @@ Assuming you have a working [docsify](https://docsify.js.org) app set up, it is
93
84
'/':'Warning'
94
85
}
95
86
},
96
-
danger: {
87
+
attention: {
97
88
label: {
98
89
'/de-DE/':'Achtung',
99
90
'/':'Attention'
@@ -129,11 +120,11 @@ Modify or add a new blockquote so it matches required syntax like shown in follo
129
120
> An alert of type 'warning' using global style 'callout'.
130
121
```
131
122
132
-
* Sample alert using type `DANGER`
123
+
* Sample alert using type `ATTENTION`
133
124
134
125
```markdown
135
-
> [!DANGER]
136
-
> An alert of type 'danger' using global style 'callout'.
126
+
> [!ATTENTION]
127
+
> An alert of type 'attention' using global style 'callout'.
137
128
```
138
129
139
130
### Step #3 - docsify commands
@@ -142,7 +133,7 @@ Serve your documentation (`docsify serve`) as usual.
142
133
143
134
## Customizations
144
135
145
-
To use the plugin just modify an existing blockquote and prepend a line matching pattern `[!type]`. By default types `NOTE`, `TIP`, `WARNING` and `DANGER` are supported. You can extend the available types by providing a valid configuration (see below for an example).
136
+
To use the plugin just modify an existing blockquote and prepend a line matching pattern `[!type]`. By default types `NOTE`, `TIP`, `WARNING` and `ATTENTION` are supported. You can extend the available types by providing a valid configuration (see below for an example).
146
137
147
138
```markdown
148
139
> [!NOTE]
@@ -182,7 +173,7 @@ As mentioned above you can provide your own alert types. Therefore, you have to
182
173
window.$docsify= {
183
174
'flexible-alerts': {
184
175
comment: {
185
-
label:"Comment",
176
+
label:'Comment',
186
177
187
178
// localization
188
179
label: {
@@ -191,14 +182,16 @@ As mentioned above you can provide your own alert types. Therefore, you have to
191
182
},
192
183
193
184
// Assuming that we use Font Awesome
194
-
icon:"fas fa-comment",
195
-
className:"info"
185
+
icon:'fas fa-comment',
186
+
className:'note'
196
187
}
197
188
}
198
189
};
199
190
</script>
200
191
```
201
192
193
+
**Since we are using FontAwesome in previous example we have to include the library via `index.html`, e.g. using a CDN.**
194
+
202
195
In Markdown just use the alert according to the types provided by default.
203
196
204
197
```markdown
@@ -226,12 +219,22 @@ If alerts do no look as expected, check if your `index.html` as well as alerts i
226
219
227
220
## Changelog
228
221
229
-
09/23/2019 - Fixed issue concerning custom Font Awesome icons when using on alert based level.
222
+
09/20/2020
223
+
* Removed dependency to FontAwesome and embedded icons as SVG directly.
224
+
* Support dark mode for callout alert style.
225
+
* Moved alert type naming from 'danger' to 'attention'. Introduced type mappings to support mapping further alert type keys to existing definitions, e.g. map legacy alert type 'danger' to new type definition 'attention'.
226
+
227
+
09/23/2019
228
+
* Fixed issue concerning custom Font Awesome icons when using on alert based level.
230
229
231
-
04/14/2019 - Added camel case support for plugin configuration key.
230
+
04/14/2019
231
+
* Added camel case support for plugin configuration key.
232
232
233
-
03/03/2019 - Fixed issue concerning languages using characters others than [a-z,A-Z,0-9] like Chinese or Russian.
233
+
03/03/2019
234
+
* Fixed issue concerning languages using characters others than [a-z,A-Z,0-9] like Chinese or Russian.
234
235
235
-
01/19/2019 - Fixed issue when using plugin along with themeable plugin.
236
+
01/19/2019
237
+
* Fixed issue when using plugin along with themeable plugin.
0 commit comments