Skip to content

Commit

Permalink
Add more theme.
Browse files Browse the repository at this point in the history
  • Loading branch information
cweijan committed Dec 13, 2024
1 parent e34812b commit 5c35e56
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 1 deletion.
11 changes: 11 additions & 0 deletions resource/vditor/css/theme/Monokai.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
:root {
--hr-bg: #49483e;
--ext-border-color: #49483e;
--bg-color: #272822;
--front-color: #f8f8f2;
--second-bg-color: #1e1f1c;
--code-bg-color: #3e3d32;
--list-hover-color: #66d9ef;
--dropdown-hover-background: #49483e;
--error-color: #f92672;
}
11 changes: 11 additions & 0 deletions resource/vditor/css/theme/Nord.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
:root {
--hr-bg: #4c566a;
--ext-border-color: #3b4252;
--bg-color: #2e3440;
--front-color: #d8dee9;
--second-bg-color: #3b4252;
--code-bg-color: #434c5e;
--list-hover-color: #88c0d0;
--dropdown-hover-background: #434c5e;
--error-color: #bf616a;
}
11 changes: 11 additions & 0 deletions resource/vditor/css/theme/One Dark.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
:root {
--hr-bg: #3f4451;
--ext-border-color: #181a1f;
--bg-color: #282c34;
--front-color: #abb2bf;
--second-bg-color: #21252b;
--code-bg-color: #31363f;
--list-hover-color: #61afef;
--dropdown-hover-background: #3a3f4b;
--error-color: #e06c75;
}
7 changes: 6 additions & 1 deletion src/provider/markdownEditorProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,12 @@ export class MarkdownEditorProvider implements vscode.CustomTextEditorProvider {
new MarkdownService(this.context).exportMarkdown(uri, option)
}).on("theme", async (theme) => {
if (!theme) {
const themes = ["Auto", "|", "Light", "Solarized", "|", "Dracula", "Github Dark"]
const themes = [
"Auto", "|",
"Light", "Solarized", "|",
"One Dark", "Github Dark",
"Nord", "Monokai", "Dracula",
];
const editorTheme = Global.getConfig('editorTheme');
const themeItems: vscode.QuickPickItem[] = themes.map(theme => {
if (theme == '|') return { label: '|', kind: vscode.QuickPickItemKind.Separator }
Expand Down

0 comments on commit 5c35e56

Please sign in to comment.