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