mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 01:36:22 +00:00
Merge pull request #2125 from johannbre/admonition_bug_fix
Fix rendering of admonitions in Windows
This commit is contained in:
@@ -21,10 +21,12 @@ const attachmentManagement = require('../main/lib/dataApi/attachmentManagement')
|
||||
|
||||
const { app } = remote
|
||||
const path = require('path')
|
||||
const fileUrl = require('file-url')
|
||||
|
||||
const dialog = remote.dialog
|
||||
|
||||
const markdownStyle = require('!!css!stylus?sourceMap!./markdown.styl')[0][1]
|
||||
const appPath = 'file://' + (process.env.NODE_ENV === 'production'
|
||||
const appPath = fileUrl(process.env.NODE_ENV === 'production'
|
||||
? app.getAppPath()
|
||||
: path.resolve())
|
||||
const CSS_FILES = [
|
||||
|
||||
@@ -315,6 +315,8 @@ $admonition-icon
|
||||
position absolute
|
||||
left 1.2rem
|
||||
font-family: "Material Icons"
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-size: 24px
|
||||
display: inline-block;
|
||||
line-height: 1;
|
||||
@@ -346,27 +348,27 @@ $admonition-title
|
||||
margin-bottom 0
|
||||
|
||||
admonition_types = {
|
||||
note: {border-color: #448aff, title-color: rgba(68,138,255,.1), icon: "note"},
|
||||
hint: {border-color: #00bfa5, title-color: rgba(0,191,165,.1), icon: "info"},
|
||||
danger: {border-color: #ff1744, title-color: rgba(255,23,68,.1), icon: "block"},
|
||||
caution: {border-color: #ff9100, title-color: rgba(255,145,0,.1), icon: "warning"},
|
||||
error: {border-color: #ff1744, title-color: rgba(255,23,68,.1), icon: "error"},
|
||||
attention: {border-color: #64dd17, title-color: rgba(100,221,23,.1), icon: "priority_high"}
|
||||
note: {color: #0288D1, icon: "note"},
|
||||
hint: {color: #009688, icon: "info_outline"},
|
||||
danger: {color: #c2185b, icon: "block"},
|
||||
caution: {color: #ffa726, icon: "warning"},
|
||||
error: {color: #d32f2f, icon: "error_outline"},
|
||||
attention: {color: #455a64, icon: "priority_high"}
|
||||
}
|
||||
|
||||
for name, val in admonition_types
|
||||
.admonition.{name}
|
||||
@extend $admonition
|
||||
border-left-color: val[border-color]
|
||||
border-left-color: val[color]
|
||||
|
||||
.admonition.{name}>.admonition-title
|
||||
@extend $admonition-title
|
||||
border-bottom-color: .1rem solid val[title-color]
|
||||
background-color: val[title-color]
|
||||
border-bottom-color: .1rem solid rgba(val[color], 0.2)
|
||||
background-color: rgba(val[color], 0.2)
|
||||
|
||||
.admonition.{name}>.admonition-title:before
|
||||
@extend $admonition-icon
|
||||
color: val[border-color]
|
||||
color: val[color]
|
||||
content: val[icon]
|
||||
|
||||
themeDarkBackground = darken(#21252B, 10%)
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
"electron-config": "^0.2.1",
|
||||
"electron-gh-releases": "^2.0.2",
|
||||
"escape-string-regexp": "^1.0.5",
|
||||
"file-url": "^2.0.2",
|
||||
"filenamify": "^2.0.0",
|
||||
"flowchart.js": "^1.6.5",
|
||||
"font-awesome": "^4.3.0",
|
||||
|
||||
@@ -3190,6 +3190,10 @@ file-entry-cache@^2.0.0:
|
||||
flat-cache "^1.2.1"
|
||||
object-assign "^4.0.1"
|
||||
|
||||
file-url@^2.0.2:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/file-url/-/file-url-2.0.2.tgz#e951784d79095127d3713029ab063f40818ca2ae"
|
||||
|
||||
filename-regex@^2.0.0:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26"
|
||||
|
||||
Reference in New Issue
Block a user