Skip to content

Commit

Permalink
added more admonition styles
Browse files Browse the repository at this point in the history
  • Loading branch information
ibraude authored and Rokt33r committed Nov 21, 2019
1 parent 72c2a20 commit edebba6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
5 changes: 4 additions & 1 deletion browser/components/markdown.styl
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,10 @@ admonition_types = {
danger: {color: #c2185b, icon: "block"},
caution: {color: #ffa726, icon: "warning"},
error: {color: #d32f2f, icon: "error_outline"},
attention: {color: #455a64, icon: "priority_high"}
question: {color: #64dd17, icon: "help_outline"},
quote: {color: #9e9e9e, icon: "format_quote"},
abstract: {color: #00b0ff, icon: "subject"},
attention: {color: #455a64, icon: "priority_high"},
}

for name, val in admonition_types
Expand Down
2 changes: 1 addition & 1 deletion browser/lib/markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class Markdown {
slugify: require('./slugify')
})
this.md.use(require('markdown-it-kbd'))
this.md.use(require('markdown-it-admonition'), {types: ['note', 'hint', 'attention', 'caution', 'danger', 'error']})
this.md.use(require('markdown-it-admonition'), {types: ['note', 'hint', 'attention', 'caution', 'danger', 'error', 'quote', 'abstract', 'question']})
this.md.use(require('markdown-it-abbr'))
this.md.use(require('markdown-it-sub'))
this.md.use(require('markdown-it-sup'))
Expand Down
6 changes: 5 additions & 1 deletion webpack-production.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@ const NodeTargetPlugin = require('webpack/lib/node/NodeTargetPlugin')
var config = Object.assign({}, skeleton, {
module: {
loaders: [
{
test: /pdf(\.worker)?(\.min)?\.js\.map$/,
loader: 'raw-loader'
},
{
test: /(\.js|\.jsx)?$/,
exclude: /(node_modules|bower_components)/,
exclude: [/(node_modules|bower_components)/, /pdf(\.worker)?(\.min)?\.js\.map$/],
loader: 'babel'
},
{
Expand Down
1 change: 1 addition & 0 deletions webpack-skeleton.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ var config = {
]
},
externals: [
'pdf-js',
'prettier',
'node-ipc',
'electron',
Expand Down

0 comments on commit edebba6

Please sign in to comment.