Skip to content

Commit

Permalink
Added highlightjs github dark theme variant
Browse files Browse the repository at this point in the history
  • Loading branch information
azmeuk committed Jun 26, 2022
1 parent cdf44d4 commit bc39119
Show file tree
Hide file tree
Showing 3 changed files with 210 additions and 88 deletions.
2 changes: 1 addition & 1 deletion cinder/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
{% if config.theme.colorscheme %}
<link rel="stylesheet" href="//cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/styles/{{ config.theme.colorscheme }}.min.css">
{% else %}
<link rel="stylesheet" href="//cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/styles/github.min.css">
<link rel="stylesheet" href="{{ 'css/highlight.min.css'|url }}">
{% endif %}
{% endif %}

Expand Down
294 changes: 208 additions & 86 deletions cinder/css/highlight.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,92 +8,214 @@ github.com style (c) Vasily Polovnyov <[email protected]>
display: block;
overflow-x: auto;
padding: 0.5em;
color: #333;
background: #FCFDFF;
}

.hljs-comment,
.hljs-quote {
color: #998;
font-style: italic;
}

.hljs-keyword,
.hljs-selector-tag,
.hljs-subst {
color: #333;
font-weight: bold;
}

.hljs-number,
.hljs-literal,
.hljs-variable,
.hljs-template-variable,
.hljs-tag .hljs-attr {
color: #008080;
}

.hljs-string,
.hljs-doctag {
color: #d14;
}

.hljs-title,
.hljs-section,
.hljs-selector-id {
color: #900;
font-weight: bold;
}

.hljs-subst {
font-weight: normal;
}

.hljs-type,
.hljs-class .hljs-title {
color: #458;
font-weight: bold;
}

.hljs-tag,
.hljs-name,
.hljs-attribute {
color: #000080;
font-weight: normal;
}

.hljs-regexp,
.hljs-link {
color: #009926;
}

.hljs-symbol,
.hljs-bullet {
color: #990073;
}

.hljs-built_in,
.hljs-builtin-name {
color: #0086b3;
}

.hljs-meta {
color: #999;
font-weight: bold;
}

.hljs-deletion {
background: #fdd;
}

.hljs-addition {
background: #dfd;
}

.hljs-emphasis {
font-style: italic;
}

.hljs-strong {
font-weight: bold;
@media (prefers-color-scheme: light) {
.hljs {
color: #333;
background: #FCFDFF;
}

.hljs-comment,
.hljs-quote {
color: #998;
font-style: italic;
}

.hljs-keyword,
.hljs-selector-tag,
.hljs-subst {
color: #333;
font-weight: bold;
}

.hljs-number,
.hljs-literal,
.hljs-variable,
.hljs-template-variable,
.hljs-tag .hljs-attr {
color: #008080;
}

.hljs-string,
.hljs-doctag {
color: #d14;
}

.hljs-title,
.hljs-section,
.hljs-selector-id {
color: #900;
font-weight: bold;
}

.hljs-subst {
font-weight: normal;
}

.hljs-type,
.hljs-class .hljs-title {
color: #458;
font-weight: bold;
}

.hljs-tag,
.hljs-name,
.hljs-attribute {
color: #000080;
font-weight: normal;
}

.hljs-regexp,
.hljs-link {
color: #009926;
}

.hljs-symbol,
.hljs-bullet {
color: #990073;
}

.hljs-built_in,
.hljs-builtin-name {
color: #0086b3;
}

.hljs-meta {
color: #999;
font-weight: bold;
}

.hljs-deletion {
background: #fdd;
}

.hljs-addition {
background: #dfd;
}

.hljs-emphasis {
font-style: italic;
}

.hljs-strong {
font-weight: bold;
}
}

@media (prefers-color-scheme: dark) {
.hljs {
color: rgb(200, 195, 188);
background: rgb(28, 30, 31);
}

.hljs-doctag,
.hljs-keyword,
.hljs-meta .hljs-keyword,
.hljs-template-tag,
.hljs-template-variable,
.hljs-type,
.hljs-variable.language_ {
/* prettylights-syntax-keyword */
color: #d73a49;
}

.hljs-title,
.hljs-title.class_,
.hljs-title.class_.inherited__,
.hljs-title.function_ {
/* prettylights-syntax-entity */
color: #6f42c1;
}

.hljs-attr,
.hljs-attribute,
.hljs-literal,
.hljs-meta,
.hljs-number,
.hljs-operator,
.hljs-variable,
.hljs-selector-attr,
.hljs-selector-class,
.hljs-selector-id {
/* prettylights-syntax-constant */
color: #005cc5;
}

.hljs-regexp,
.hljs-string,
.hljs-meta .hljs-string {
/* prettylights-syntax-string */
color: #032f62;
}

.hljs-built_in,
.hljs-symbol {
/* prettylights-syntax-variable */
color: #e36209;
}

.hljs-comment,
.hljs-code,
.hljs-formula {
/* prettylights-syntax-comment */
color: #6a737d;
}

.hljs-name,
.hljs-quote,
.hljs-selector-tag,
.hljs-selector-pseudo {
/* prettylights-syntax-entity-tag */
color: #22863a;
}

.hljs-subst {
/* prettylights-syntax-storage-modifier-import */
color: #24292e;
}

.hljs-section {
/* prettylights-syntax-markup-heading */
color: #005cc5;
font-weight: bold;
}

.hljs-bullet {
/* prettylights-syntax-markup-list */
color: #735c0f;
}

.hljs-emphasis {
/* prettylights-syntax-markup-italic */
color: #24292e;
font-style: italic;
}

.hljs-strong {
/* prettylights-syntax-markup-bold */
color: #24292e;
font-weight: bold;
}

.hljs-addition {
/* prettylights-syntax-markup-inserted */
color: #22863a;
background-color: #f0fff4;
}

.hljs-deletion {
/* prettylights-syntax-markup-deleted */
color: #b31d28;
background-color: #ffeef0;
}

.hljs-char.escape_,
.hljs-link,
.hljs-params,
.hljs-property,
.hljs-punctuation,
.hljs-tag {
/* purposely ignored */
}
}
2 changes: 1 addition & 1 deletion cinder/css/highlight.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bc39119

Please sign in to comment.