Skip to content

Commit edebba6

Browse files
ibraudeRokt33r
authored andcommitted
added more admonition styles
1 parent 72c2a20 commit edebba6

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

browser/components/markdown.styl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,10 @@ admonition_types = {
363363
danger: {color: #c2185b, icon: "block"},
364364
caution: {color: #ffa726, icon: "warning"},
365365
error: {color: #d32f2f, icon: "error_outline"},
366-
attention: {color: #455a64, icon: "priority_high"}
366+
question: {color: #64dd17, icon: "help_outline"},
367+
quote: {color: #9e9e9e, icon: "format_quote"},
368+
abstract: {color: #00b0ff, icon: "subject"},
369+
attention: {color: #455a64, icon: "priority_high"},
367370
}
368371

369372
for name, val in admonition_types

browser/lib/markdown.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ class Markdown {
124124
slugify: require('./slugify')
125125
})
126126
this.md.use(require('markdown-it-kbd'))
127-
this.md.use(require('markdown-it-admonition'), {types: ['note', 'hint', 'attention', 'caution', 'danger', 'error']})
127+
this.md.use(require('markdown-it-admonition'), {types: ['note', 'hint', 'attention', 'caution', 'danger', 'error', 'quote', 'abstract', 'question']})
128128
this.md.use(require('markdown-it-abbr'))
129129
this.md.use(require('markdown-it-sub'))
130130
this.md.use(require('markdown-it-sup'))

webpack-production.config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@ const NodeTargetPlugin = require('webpack/lib/node/NodeTargetPlugin')
66
var config = Object.assign({}, skeleton, {
77
module: {
88
loaders: [
9+
{
10+
test: /pdf(\.worker)?(\.min)?\.js\.map$/,
11+
loader: 'raw-loader'
12+
},
913
{
1014
test: /(\.js|\.jsx)?$/,
11-
exclude: /(node_modules|bower_components)/,
15+
exclude: [/(node_modules|bower_components)/, /pdf(\.worker)?(\.min)?\.js\.map$/],
1216
loader: 'babel'
1317
},
1418
{

webpack-skeleton.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ var config = {
3030
]
3131
},
3232
externals: [
33+
'pdf-js',
3334
'prettier',
3435
'node-ipc',
3536
'electron',

0 commit comments

Comments
 (0)