Menci
6 years ago
13 changed files with 1135 additions and 650 deletions
@ -1,167 +1,167 @@
|
||||
monaco.editor.defineTheme('tomorrow', { |
||||
"base": "vs", |
||||
"inherit": true, |
||||
"rules": [ |
||||
{ |
||||
"foreground": "8e908c", |
||||
"token": "comment" |
||||
}, |
||||
{ |
||||
"foreground": "666969", |
||||
"token": "keyword.operator.class" |
||||
}, |
||||
{ |
||||
"foreground": "666969", |
||||
"token": "constant.other" |
||||
}, |
||||
{ |
||||
"foreground": "666969", |
||||
"token": "source.php.embedded.line" |
||||
}, |
||||
{ |
||||
"foreground": "c82829", |
||||
"token": "variable" |
||||
}, |
||||
{ |
||||
"foreground": "c82829", |
||||
"token": "support.other.variable" |
||||
}, |
||||
{ |
||||
"foreground": "c82829", |
||||
"token": "string.other.link" |
||||
}, |
||||
{ |
||||
"foreground": "c82829", |
||||
"token": "string.regexp" |
||||
}, |
||||
{ |
||||
"foreground": "c82829", |
||||
"token": "entity.name.tag" |
||||
}, |
||||
{ |
||||
"foreground": "c82829", |
||||
"token": "entity.other.attribute-name" |
||||
}, |
||||
{ |
||||
"foreground": "c82829", |
||||
"token": "meta.tag" |
||||
}, |
||||
{ |
||||
"foreground": "c82829", |
||||
"token": "declaration.tag" |
||||
}, |
||||
{ |
||||
"foreground": "f5871f", |
||||
"token": "constant.numeric" |
||||
}, |
||||
{ |
||||
"foreground": "f5871f", |
||||
"token": "constant.language" |
||||
}, |
||||
{ |
||||
"foreground": "f5871f", |
||||
"token": "support.constant" |
||||
}, |
||||
{ |
||||
"foreground": "f5871f", |
||||
"token": "constant.character" |
||||
}, |
||||
{ |
||||
"foreground": "f5871f", |
||||
"token": "variable.parameter" |
||||
}, |
||||
{ |
||||
"foreground": "f5871f", |
||||
"token": "punctuation.section.embedded" |
||||
}, |
||||
{ |
||||
"foreground": "f5871f", |
||||
"token": "keyword.other.unit" |
||||
}, |
||||
{ |
||||
"foreground": "c99e00", |
||||
"token": "entity.name.class" |
||||
}, |
||||
{ |
||||
"foreground": "c99e00", |
||||
"token": "entity.name.type.class" |
||||
}, |
||||
{ |
||||
"foreground": "c99e00", |
||||
"token": "support.type" |
||||
}, |
||||
{ |
||||
"foreground": "c99e00", |
||||
"token": "support.class" |
||||
}, |
||||
{ |
||||
"foreground": "718c00", |
||||
"token": "string" |
||||
}, |
||||
{ |
||||
"foreground": "718c00", |
||||
"token": "constant.other.symbol" |
||||
}, |
||||
{ |
||||
"foreground": "718c00", |
||||
"token": "entity.other.inherited-class" |
||||
}, |
||||
{ |
||||
"foreground": "718c00", |
||||
"token": "markup.heading" |
||||
}, |
||||
{ |
||||
"foreground": "3e999f", |
||||
"token": "keyword.operator" |
||||
}, |
||||
{ |
||||
"foreground": "3e999f", |
||||
"token": "constant.other.color" |
||||
}, |
||||
{ |
||||
"foreground": "4271ae", |
||||
"token": "entity.name.function" |
||||
}, |
||||
{ |
||||
"foreground": "4271ae", |
||||
"token": "meta.function-call" |
||||
}, |
||||
{ |
||||
"foreground": "4271ae", |
||||
"token": "support.function" |
||||
}, |
||||
{ |
||||
"foreground": "4271ae", |
||||
"token": "keyword.other.special-method" |
||||
}, |
||||
{ |
||||
"foreground": "4271ae", |
||||
"token": "meta.block-level" |
||||
}, |
||||
{ |
||||
"foreground": "8959a8", |
||||
"token": "keyword" |
||||
}, |
||||
{ |
||||
"foreground": "8959a8", |
||||
"token": "storage" |
||||
}, |
||||
{ |
||||
"foreground": "8959a8", |
||||
"token": "storage.type" |
||||
}, |
||||
{ |
||||
"foreground": "373b41", |
||||
"background": "e0e0e0", |
||||
"token": "meta.separator" |
||||
} |
||||
], |
||||
"colors": { |
||||
"editor.foreground": "#4D4D4C", |
||||
"editor.background": "#FFFFFF", |
||||
"editor.selectionBackground": "#D6D6D6", |
||||
"editor.lineHighlightBackground": "#EFEFEF", |
||||
"editorCursor.foreground": "#AEAFAD", |
||||
"editorWhitespace.foreground": "#D1D1D1" |
||||
} |
||||
monaco.editor.defineTheme('tomorrow', { |
||||
"base": "vs", |
||||
"inherit": true, |
||||
"rules": [ |
||||
{ |
||||
"foreground": "8e908c", |
||||
"token": "comment" |
||||
}, |
||||
{ |
||||
"foreground": "666969", |
||||
"token": "keyword.operator.class" |
||||
}, |
||||
{ |
||||
"foreground": "666969", |
||||
"token": "constant.other" |
||||
}, |
||||
{ |
||||
"foreground": "666969", |
||||
"token": "source.php.embedded.line" |
||||
}, |
||||
{ |
||||
"foreground": "c82829", |
||||
"token": "variable" |
||||
}, |
||||
{ |
||||
"foreground": "c82829", |
||||
"token": "support.other.variable" |
||||
}, |
||||
{ |
||||
"foreground": "c82829", |
||||
"token": "string.other.link" |
||||
}, |
||||
{ |
||||
"foreground": "c82829", |
||||
"token": "string.regexp" |
||||
}, |
||||
{ |
||||
"foreground": "c82829", |
||||
"token": "entity.name.tag" |
||||
}, |
||||
{ |
||||
"foreground": "c82829", |
||||
"token": "entity.other.attribute-name" |
||||
}, |
||||
{ |
||||
"foreground": "c82829", |
||||
"token": "meta.tag" |
||||
}, |
||||
{ |
||||
"foreground": "c82829", |
||||
"token": "declaration.tag" |
||||
}, |
||||
{ |
||||
"foreground": "f5871f", |
||||
"token": "constant.numeric" |
||||
}, |
||||
{ |
||||
"foreground": "f5871f", |
||||
"token": "constant.language" |
||||
}, |
||||
{ |
||||
"foreground": "f5871f", |
||||
"token": "support.constant" |
||||
}, |
||||
{ |
||||
"foreground": "f5871f", |
||||
"token": "constant.character" |
||||
}, |
||||
{ |
||||
"foreground": "f5871f", |
||||
"token": "variable.parameter" |
||||
}, |
||||
{ |
||||
"foreground": "f5871f", |
||||
"token": "punctuation.section.embedded" |
||||
}, |
||||
{ |
||||
"foreground": "f5871f", |
||||
"token": "keyword.other.unit" |
||||
}, |
||||
{ |
||||
"foreground": "c99e00", |
||||
"token": "entity.name.class" |
||||
}, |
||||
{ |
||||
"foreground": "c99e00", |
||||
"token": "entity.name.type.class" |
||||
}, |
||||
{ |
||||
"foreground": "c99e00", |
||||
"token": "support.type" |
||||
}, |
||||
{ |
||||
"foreground": "c99e00", |
||||
"token": "support.class" |
||||
}, |
||||
{ |
||||
"foreground": "718c00", |
||||
"token": "string" |
||||
}, |
||||
{ |
||||
"foreground": "718c00", |
||||
"token": "constant.other.symbol" |
||||
}, |
||||
{ |
||||
"foreground": "718c00", |
||||
"token": "entity.other.inherited-class" |
||||
}, |
||||
{ |
||||
"foreground": "718c00", |
||||
"token": "markup.heading" |
||||
}, |
||||
{ |
||||
"foreground": "3e999f", |
||||
"token": "keyword.operator" |
||||
}, |
||||
{ |
||||
"foreground": "3e999f", |
||||
"token": "constant.other.color" |
||||
}, |
||||
{ |
||||
"foreground": "4271ae", |
||||
"token": "entity.name.function" |
||||
}, |
||||
{ |
||||
"foreground": "4271ae", |
||||
"token": "meta.function-call" |
||||
}, |
||||
{ |
||||
"foreground": "4271ae", |
||||
"token": "support.function" |
||||
}, |
||||
{ |
||||
"foreground": "4271ae", |
||||
"token": "keyword.other.special-method" |
||||
}, |
||||
{ |
||||
"foreground": "4271ae", |
||||
"token": "meta.block-level" |
||||
}, |
||||
{ |
||||
"foreground": "8959a8", |
||||
"token": "keyword" |
||||
}, |
||||
{ |
||||
"foreground": "8959a8", |
||||
"token": "storage" |
||||
}, |
||||
{ |
||||
"foreground": "8959a8", |
||||
"token": "storage.type" |
||||
}, |
||||
{ |
||||
"foreground": "373b41", |
||||
"background": "e0e0e0", |
||||
"token": "meta.separator" |
||||
} |
||||
], |
||||
"colors": { |
||||
"editor.foreground": "#4D4D4C", |
||||
"editor.background": "#FFFFFF", |
||||
"editor.selectionBackground": "#D6D6D6", |
||||
"editor.lineHighlightBackground": "#EFEFEF", |
||||
"editorCursor.foreground": "#AEAFAD", |
||||
"editorWhitespace.foreground": "#D1D1D1" |
||||
} |
||||
}); |
@ -1,37 +1,70 @@
|
||||
.editor { |
||||
background: #fff; |
||||
font-family: "Fira Mono", "Bitstream Vera Sans Mono", Menlo, Consolas, "Lucida Console", monospace; |
||||
} |
||||
|
||||
.monaco-editor .inputarea { |
||||
min-height: 0 !important; |
||||
padding: 0 !important; |
||||
border: 0 !important; |
||||
color: rgba(0, 0, 0, 0) !important; |
||||
} |
||||
|
||||
.monaco-editor-background.textAreaCover.line-numbers { |
||||
visibility: hidden; |
||||
} |
||||
|
||||
.monaco-editor .selected-text, .monaco-editor .monaco-editor-background { |
||||
border-radius: 0 !important; |
||||
} |
||||
|
||||
.monaco-editor .mtk1 { |
||||
color: #4d4d4c !important; |
||||
} |
||||
|
||||
.monaco-editor .cursor { |
||||
color: #000 !important; |
||||
border-color: #000 !important; |
||||
background-color: #000 !important; |
||||
} |
||||
|
||||
.monaco-editor .line-numbers { |
||||
color: #4d4d4c !important; |
||||
} |
||||
|
||||
.monaco-editor .margin-view-overlays .current-line { |
||||
background-color: #efefef !important; |
||||
} |
||||
.editor { |
||||
background: #fff; |
||||
position: relative; |
||||
border: 1px solid rgba(34, 36, 38, 0.15); |
||||
} |
||||
|
||||
.editor.editor-with-border { |
||||
border-radius: .28571429rem; |
||||
overflow: hidden; |
||||
outline: none; |
||||
} |
||||
|
||||
.editor.editor-with-border:focus-within { |
||||
border-color: #85b7d9; |
||||
} |
||||
|
||||
.editor.editor-with-border .monaco-editor .margin { |
||||
visibility: hidden; |
||||
} |
||||
|
||||
.editor.editor-with-border .monaco-editor .lines-content.monaco-editor-background { |
||||
margin-top: 9px; |
||||
margin-left: 4px; |
||||
} |
||||
|
||||
.monaco-editor .inputarea { |
||||
min-height: 0 !important; |
||||
padding: 0 !important; |
||||
border: 0 !important; |
||||
color: rgba(0, 0, 0, 0) !important; |
||||
} |
||||
|
||||
.monaco-editor-background.textAreaCover.line-numbers { |
||||
visibility: hidden; |
||||
} |
||||
|
||||
.monaco-editor .selected-text, .monaco-editor .monaco-editor-background { |
||||
border-radius: 0 !important; |
||||
} |
||||
|
||||
.monaco-editor .mtk1 { |
||||
color: #4d4d4c !important; |
||||
} |
||||
|
||||
.monaco-editor .cursor { |
||||
color: #000 !important; |
||||
border-color: #000 !important; |
||||
background-color: #000 !important; |
||||
} |
||||
|
||||
.monaco-editor .line-numbers { |
||||
color: #575756 !important; |
||||
} |
||||
|
||||
.monaco-editor .margin-view-overlays .current-line ~ .line-numbers { |
||||
color: #000 !important; |
||||
font-weight: 500; |
||||
} |
||||
|
||||
.editor.editor-with-border .monaco-editor .monaco-scrollable-element .scrollbar.vertical { |
||||
background: rgba(0,0,0,.1); |
||||
border-radius: 0; |
||||
} |
||||
|
||||
.editor.editor-with-border .monaco-editor .monaco-scrollable-element .scrollbar.vertical .slider { |
||||
border-radius: 5px; |
||||
background: rgba(0,0,0,.25); |
||||
-webkit-transition: color .2s ease; |
||||
transition: color .2s ease; |
||||
} |
||||
|
@ -1,8 +1,23 @@
|
||||
<script> |
||||
window.pathLib = "<%- lib('') %>"; |
||||
window.pathSelfLib = "<%- selfLib('') %>"; |
||||
</script> |
||||
|
||||
<script src="<%- lib('monaco-editor/0.16.2/min/vs/loader.js') %>"></script> |
||||
<script src="<%- selfLib('monaco-editor.js') %>"></script> |
||||
<link rel="stylesheet" href="<%- selfLib('monaco-editor.css') %>"> |
||||
<script> |
||||
window.pathLib = "<%- lib('') %>"; |
||||
window.pathSelfLib = "<%- selfLib('') %>"; |
||||
|
||||
var originalConsoleWarn = console.warn; |
||||
console.warn = function (message) { |
||||
if (message.startsWith('Duplicate definition of module')) return; |
||||
originalConsoleWarn.apply(console, arguments); |
||||
}; |
||||
</script> |
||||
|
||||
<!-- Load monaco-editor --> |
||||
<script src="<%- lib('monaco-editor/0.16.2/min/vs/loader.js') %>"></script> |
||||
<script src="<%- selfLib('monaco-editor.js') %>"></script> |
||||
<link rel="stylesheet" href="<%- selfLib('monaco-editor.css') %>"> |
||||
|
||||
<% |
||||
this.showLoadingEditor = () => { |
||||
%> |
||||
<div class="ui active medium text loader">编辑器加载中 …</div> |
||||
<% |
||||
}; |
||||
%> |
||||
|
Loading…
Reference in new issue