Skip to content

Commit

Permalink
✨ 添加 ant design 代码主题 fix #676
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Aug 11, 2020
1 parent e2d987d commit 8dfcef4
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 36 deletions.
67 changes: 32 additions & 35 deletions src/js/highlight.js/styles/ant-design.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,26 @@
.highlight-chroma {
display: block;
padding: 16px 32px;
color: rgba(0,0,0,.85);
color: rgba(0, 0, 0, .85);
font-size: 14px;
font-family: lucida console,Consolas,Monaco,andale mono,ubuntu mono,monospace;
font-family: lucida console, Consolas, Monaco, andale mono, ubuntu mono, monospace;
line-height: 2;
white-space: pre;
background: white;
border: 1px solid #e9e9e9;
border-radius: 2px;
}

.highlight-chroma::selection {
text-shadow: none;
background: #b3d4fc;
}
.highlight-o {
color: #0b8235;
}
.highlight-p {
color: #999;
}
/* Error */
.highlight-chroma .highlight-err {
color: #a61717;
Expand Down Expand Up @@ -89,8 +99,7 @@

/* KeywordReserved */
.highlight-chroma .highlight-kr {
color: #6ab825;
font-weight: bold
color: #008dff;
}

/* KeywordType */
Expand Down Expand Up @@ -209,12 +218,12 @@

/* LiteralStringRegex */
.highlight-chroma .highlight-sr {
color: #ed9d13
color: #e90;
}

/* LiteralStringSingle */
.highlight-chroma .highlight-s1 {
color: #ed9d13
color: #0b8235
}

/* LiteralStringSymbol */
Expand Down Expand Up @@ -283,7 +292,7 @@

/* CommentSingle */
.highlight-chroma .highlight-c1 {
color: #999999;
color: #708090;
font-style: italic
}

Expand Down Expand Up @@ -368,42 +377,27 @@
color: #666666
}

/*
Atom One Dark by Daniel Gamage
Original One Dark Syntax theme from https://github.com/atom/one-dark-syntax
base: #282c34
mono-1: #abb2bf
mono-2: #818896
mono-3: #5c6370
hue-1: #56b6c2
hue-2: #61aeee
hue-3: #c678dd
hue-4: #98c379
hue-5: #e06c75
hue-5-2: #be5046
hue-6: #d19a66
hue-6-2: #e6c07b
*/

.hljs {
display: block;
padding: 16px 32px;
color: rgba(0,0,0,.85);
color: rgba(0, 0, 0, .85);
font-size: 14px;
font-family: lucida console,Consolas,Monaco,andale mono,ubuntu mono,monospace;
font-family: lucida console, Consolas, Monaco, andale mono, ubuntu mono, monospace;
line-height: 2;
white-space: pre;
background: white;
border: 1px solid #e9e9e9;
border-radius: 2px;
}

.hljs::selection {
text-shadow: none;
background: #b3d4fc;
}

.hljs-comment,
.hljs-quote {
color: #5c6370;
color: #708090;
font-style: italic;
}

Expand All @@ -418,19 +412,22 @@ hue-6-2: #e6c07b
.hljs-selector-tag,
.hljs-deletion,
.hljs-subst {
color: #e06c75;
color: #999;
}

.hljs-literal {
color: #56b6c2;
}


.hljs-regexp {
color: #e90;
}
.hljs-string,
.hljs-regexp,
.hljs-addition,
.hljs-attribute,
.hljs-meta-string {
color: #98c379;
color: #0b8235;
}

.hljs-built_in,
Expand All @@ -446,7 +443,7 @@ hue-6-2: #e6c07b
.hljs-selector-attr,
.hljs-selector-pseudo,
.hljs-number {
color: #d19a66;
color: #f81d22;
}

.hljs-symbol,
Expand All @@ -455,7 +452,7 @@ hue-6-2: #e6c07b
.hljs-meta,
.hljs-selector-id,
.hljs-title {
color: #61aeee;
color: #f81d22;
}

.hljs-emphasis {
Expand Down
2 changes: 1 addition & 1 deletion src/ts/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export abstract class Constants {
"colorful", "dracula", "emacs", "friendly", "fruity", "github", "igor", "lovelace", "manni", "monokai",
"monokailight", "murphy", "native", "paraiso-dark", "paraiso-light", "pastie", "perldoc", "pygments",
"rainbow_dash", "rrt", "solarized-dark", "solarized-dark256", "solarized-light", "swapoff", "tango", "trac",
"vim", "vs", "xcode"];
"vim", "vs", "xcode", "ant-design"];
public static readonly CODE_LANGUAGES: string[] = ["mermaid", "echarts", "mindmap", "abc", "graphviz", "apache",
"bash", "cs", "cpp", "css", "coffeescript", "diff", "xml", "http", "ini", "json", "java", "javascript", "js",
"makefile", "markdown", "nginx", "objectivec", "php", "perl", "properties", "python", "ruby", "sql", "shell",
Expand Down

0 comments on commit 8dfcef4

Please sign in to comment.