1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 17:56:25 +00:00

improve readability

This commit is contained in:
yosmoc
2017-11-11 23:17:00 +01:00
parent cb298b8cad
commit dbc0fedf43
2 changed files with 3 additions and 3 deletions

View File

@@ -259,7 +259,7 @@ export default class MarkdownPreview extends React.Component {
? theme ? theme
: 'elegant' : 'elegant'
this.getWindow().document.getElementById('codeTheme').href = theme.startsWith('solarized') this.getWindow().document.getElementById('codeTheme').href = theme.startsWith('solarized')
? `${appPath}/node_modules/codemirror/theme/${theme.split(' ')[0]}.css` ? `${appPath}/node_modules/codemirror/theme/solarized.css`
: `${appPath}/node_modules/codemirror/theme/${theme}.css` : `${appPath}/node_modules/codemirror/theme/${theme}.css`
} }

View File

@@ -92,7 +92,7 @@ function get () {
if (config.editor.theme !== 'default') { if (config.editor.theme !== 'default') {
if (config.editor.theme.startsWith('solarized')) { if (config.editor.theme.startsWith('solarized')) {
editorTheme.setAttribute('href', '../node_modules/codemirror/theme/' + config.editor.theme.split(' ')[0] + '.css') editorTheme.setAttribute('href', '../node_modules/codemirror/theme/solarized.css')
} else { } else {
editorTheme.setAttribute('href', '../node_modules/codemirror/theme/' + config.editor.theme + '.css') editorTheme.setAttribute('href', '../node_modules/codemirror/theme/' + config.editor.theme + '.css')
} }
@@ -127,7 +127,7 @@ function set (updates) {
if (newTheme !== 'default') { if (newTheme !== 'default') {
if (newTheme.startsWith('solarized')) { if (newTheme.startsWith('solarized')) {
editorTheme.setAttribute('href', '../node_modules/codemirror/theme/' + newTheme.split(' ')[0] + '.css') editorTheme.setAttribute('href', '../node_modules/codemirror/theme/solarized.css')
} else { } else {
editorTheme.setAttribute('href', '../node_modules/codemirror/theme/' + newTheme + '.css') editorTheme.setAttribute('href', '../node_modules/codemirror/theme/' + newTheme + '.css')
} }