diff --git a/.eslintrc.js b/.eslintrc.js index b826a37..cdd673f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,6 +10,7 @@ module.exports = { // wrong. "import/first": ["warn"], "indent": ["warn"], + "no-console": ["warn"], "no-multiple-empty-lines": ["warn"], "no-multi-spaces": ["warn"], "object-curly-spacing": ["warn"], diff --git a/public/css/index.css b/public/css/index.css index c304a96..fb8356e 100644 --- a/public/css/index.css +++ b/public/css/index.css @@ -20,24 +20,6 @@ body.night{ background: #333 !important; } -.toolbar { - background-color: #1c1c1e; - border: 1px solid #343434; -} - -.toolbar > .btn-toolbar > .btn-group > .btn { - background-color: #1c1c1e; - padding: 5px; - font-size: 1em; -} - -.toolbar > .btn-toolbar > .btn-group > .btn:hover { - background-color: #383a3e; - - padding: 5px; -} - - .CodeMirror { font-family: "Source Code Pro", Consolas, monaco, monospace; letter-spacing: 0.025em; diff --git a/public/css/ui/toolbar.css b/public/css/ui/toolbar.css new file mode 100644 index 0000000..fa51e1c --- /dev/null +++ b/public/css/ui/toolbar.css @@ -0,0 +1,33 @@ +.toolbar { + background-color: #fafafa; + border: 1px solid #ededed; +} + +.toolbar > .btn-toolbar > .btn-group > .btn { + background-color: #fafafa; + padding: 5px; + font-size: 1em; + color: #555; +} + +.toolbar > .btn-toolbar > .btn-group > .btn:hover { + background-color: #e1e1e1; + padding: 5px; +} + +body.night .toolbar { + background-color: #1c1c1e; + border: 1px solid #353538; +} + +body.night .toolbar > .btn-toolbar > .btn-group > .btn { + background-color: #1c1c1e; + padding: 5px; + font-size: 1em; + color: #5EB7E0; +} + +body.night .toolbar > .btn-toolbar > .btn-group > .btn:hover { + background-color: #37373b; + padding: 5px; +} diff --git a/public/js/lib/editor/index.js b/public/js/lib/editor/index.js index 17d30ca..8553caa 100644 --- a/public/js/lib/editor/index.js +++ b/public/js/lib/editor/index.js @@ -3,6 +3,8 @@ import config from './config' import statusBarTemplate from './statusbar.html' import toolBarTemplate from './toolbar.html' +import '../../../css/ui/toolbar.css' + /* config section */ const isMac = CodeMirror.keyMap.default === CodeMirror.keyMap.macDefault const defaultEditorMode = 'gfm' @@ -219,8 +221,8 @@ export default class Editor { makeComment.click(() => { utils.insertText(this.editor, '> []') }) + uploadImage.bind('change', function (e) { - console.log("tiggered") var files = e.target.files || e.dataTransfer.files e.dataTransfer = {} e.dataTransfer.files = files diff --git a/public/js/lib/editor/toolbar.html b/public/js/lib/editor/toolbar.html index 9ea1aac..dc5b8ad 100644 --- a/public/js/lib/editor/toolbar.html +++ b/public/js/lib/editor/toolbar.html @@ -1,49 +1,49 @@