Skip to content

Commit 455af9b

Browse files
committed
feat: highlight theme
1 parent 1e769b8 commit 455af9b

38 files changed

+231
-211
lines changed

_config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
## => Site Settings
1818
##############################
1919
text_skin: default # "default" (default), "dark", "forest", "ocean", "chocolate", "orange"
20+
highlight_theme: default # "default" (default), "tomorrow", "tomorrow-night", "tomorrow-night-eighties", "tomorrow-night-blue", "tomorrow-night-bright"
2021
url : # the base hostname & protocol for your site e.g. https://www.someone.com
2122
baseurl : # does not include hostname
2223
title : Your Site Title

_data/variables.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
default:
22
text_skin: default
3+
highlight_theme: default
34
lang: en
45
paths:
56
root: /

_layouts/page.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@
101101
{%- if site.repository and site.repository_tree -%}
102102
{%- assign __locale = site.data.locale.POST_ON_GITHUB -%}
103103
{%- include snippets/locale-to-string.html -%}
104-
&nbsp<a class="edit-on-github"
104+
<span class="split-space">&nbsp</span>
105+
<a class="edit-on-github"
105106
title="{{ __return }}"
106107
href="https://github.com/{{ site.repository }}/tree/{{ site.repository_tree }}/{{ page.path }}">
107108
<i class="far fa-edit"></i></a>

_sass/common/components/_toc.scss

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ul.toc {
33
margin: 0;
44
list-style-type: none;
55
& > li {
6-
margin: .1rem 0;
6+
margin: .2rem 0;
77
&.active {
88
a {
99
background-color: $main-color-3;
@@ -64,13 +64,13 @@ ul.toc {
6464
.toc-h1 {
6565
&, a {
6666
font-size: map-get($base, font-size);
67-
line-height: map-get($base, line-height-lg);
67+
line-height: map-get($base, line-height);
6868
}
6969
}
7070
.toc-h2 {
7171
&, a {
7272
font-size: map-get($base, font-size-sm);
73-
line-height: map-get($base, line-height);
73+
line-height: map-get($base, line-height-sm);
7474
}
7575
}
7676
.toc-h3,

_sass/components/_article.content.scss

+2-4
Original file line numberDiff line numberDiff line change
@@ -159,17 +159,15 @@
159159
margin-bottom: 0;
160160
}
161161
li {
162-
margin: 0;
163162
p {
164-
margin: 0;
163+
margin: map-get($base, vertical-space);
165164
}
166165
}
167166
}
168167
dl {
169168
dt, dd {
170-
margin: 0;
171169
p {
172-
margin: 0;
170+
margin: map-get($base, vertical-space);
173171
}
174172
}
175173
dt {

_sass/layout/_archive.scss

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
margin: 0;
2121
border: 2px solid $border-color;
2222
border-radius: map-get($button, pill-radius);
23+
background-color: transparent;
2324
@include transition(box-shadow map-get($animation, duration) map-get($animation, timing-function));
2425
@include focus {
2526
box-shadow: 0 0 0 2px rgba($border-color, .4);

_sass/layout/_page.scss

+3
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@
4040
header, h1 {
4141
display: inline;
4242
}
43+
.split-space {
44+
@include user-select(none);
45+
}
4346
.edit-on-github {
4447
text-decoration: none !important;
4548
}

_sass/skins/_chocolate.scss

+4-4
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ $mask-color: rgba(#000, .8);
3939
$select-color: rgba($main-color-3, .5);
4040

4141
// function colors
42-
$green: #57c22d;
43-
$blue: #2593fc;
44-
$yellow: #f8ac30;
45-
$red: #f22635;
42+
$green: #52c41a;
43+
$blue: #1890ff;
44+
$yellow: #fa8c16;
45+
$red: #f5222d;
4646
$text-color-function: #fff;
4747

4848
// logo colors

_sass/skins/_dark.scss

+4-4
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ $mask-color: rgba(#000, .8);
3939
$select-color: rgba($main-color-1, .5);
4040

4141
// function colors
42-
$green: #5c7829;
43-
$blue: #087099;
44-
$yellow: #b7b327;
45-
$red: #cc3333;
42+
$green: #74a851;
43+
$blue: #3b8e98;
44+
$yellow: #d8a348;
45+
$red: #d23442;
4646
$text-color-function: rgba(#fff, .9);
4747

4848
// logo colors

_sass/skins/_default.scss

+4-4
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ $mask-color: rgba(#000, .8);
3939
$select-color: rgba($main-color-1, .5);
4040

4141
// function colors
42-
$green: #57c22d;
43-
$blue: #2593fc;
44-
$yellow: #f8ac30;
45-
$red: #f22635;
42+
$green: #52c41a;
43+
$blue: #1890ff;
44+
$yellow: #fa8c16;
45+
$red: #f5222d;
4646
$text-color-function: #fff;
4747

4848
// logo colors

_sass/skins/_forest.scss

+4-4
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ $mask-color: rgba(#000, .8);
3939
$select-color: rgba($main-color-1, .5);
4040

4141
// function colors
42-
$green: #57c22d;
43-
$blue: #2593fc;
44-
$yellow: #f8ac30;
45-
$red: #f22635;
42+
$green: #52c41a;
43+
$blue: #1890ff;
44+
$yellow: #fa8c16;
45+
$red: #f5222d;
4646
$text-color-function: #fff;
4747

4848
// logo colors

_sass/skins/_ocean.scss

+5-5
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ $mask-color: rgba(#000, .8);
3939
$select-color: rgba($main-color-1, .5);
4040

4141
// function colors
42-
$green: #57c22d;
43-
$blue: #2593fc;
44-
$yellow: #f8ac30;
45-
$red: #f22635;
42+
$green: #52c41a;
43+
$blue: #1890ff;
44+
$yellow: #fa8c16;
45+
$red: #f5222d;
4646
$text-color-function: #fff;
4747

4848
// logo colors
@@ -55,4 +55,4 @@ $douban-color: #42bd56;
5555
$github-color: #000;
5656
$linkedin-color: #1074af;
5757

58-
@import './highlight/tomorrow';
58+
@import './highlight/tomorrow-night-blue';

_sass/skins/_orange.scss

+4-4
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ $mask-color: rgba(#000, .8);
3939
$select-color: rgba($main-color-3, .5);
4040

4141
// function colors
42-
$green: #57c22d;
43-
$blue: #2593fc;
44-
$yellow: #f8ac30;
45-
$red: #f22635;
42+
$green: #52c41a;
43+
$blue: #1890ff;
44+
$yellow: #fa8c16;
45+
$red: #f5222d;
4646
$text-color-function: #fff;
4747

4848
// logo colors

_sass/skins/highlight/_default.scss

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@import "./tomorrow/night-blue";
2+
@import "./tomorrow/highlight";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@import "./tomorrow/night-bright";
2+
@import "./tomorrow/highlight";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@import "./tomorrow/night-eighties";
2+
@import "./tomorrow/highlight";
+2-65
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,2 @@
1-
.highlight {
2-
.c { color: #969896 } /* Comment */
3-
.err { color: #cc6666 } /* Error */
4-
.k { color: #b294bb } /* Keyword */
5-
.l { color: #de935f } /* Literal */
6-
.n { color: #c5c8c6 } /* Name */
7-
.o { color: #8abeb7 } /* Operator */
8-
.p { color: #c5c8c6 } /* Punctuation */
9-
.cm { color: #969896 } /* Comment.Multiline */
10-
.cp { color: #969896 } /* Comment.Preproc */
11-
.c1 { color: #969896 } /* Comment.Single */
12-
.cs { color: #969896 } /* Comment.Special */
13-
.gd { color: #cc6666 } /* Generic.Deleted */
14-
.ge { font-style: italic } /* Generic.Emph */
15-
.gh { color: #c5c8c6; font-weight: bold } /* Generic.Heading */
16-
.gi { color: #b5bd68 } /* Generic.Inserted */
17-
.gp { color: #969896; font-weight: bold } /* Generic.Prompt */
18-
.gs { font-weight: bold } /* Generic.Strong */
19-
.gu { color: #8abeb7; font-weight: bold } /* Generic.Subheading */
20-
.kc { color: #b294bb } /* Keyword.Constant */
21-
.kd { color: #b294bb } /* Keyword.Declaration */
22-
.kn { color: #8abeb7 } /* Keyword.Namespace */
23-
.kp { color: #b294bb } /* Keyword.Pseudo */
24-
.kr { color: #b294bb } /* Keyword.Reserved */
25-
.kt { color: #f0c674 } /* Keyword.Type */
26-
.ld { color: #b5bd68 } /* Literal.Date */
27-
.m { color: #de935f } /* Literal.Number */
28-
.s { color: #b5bd68 } /* Literal.String */
29-
.na { color: #81a2be } /* Name.Attribute */
30-
.nb { color: #c5c8c6 } /* Name.Builtin */
31-
.nc { color: #f0c674 } /* Name.Class */
32-
.no { color: #cc6666 } /* Name.Constant */
33-
.nd { color: #8abeb7 } /* Name.Decorator */
34-
.ni { color: #c5c8c6 } /* Name.Entity */
35-
.ne { color: #cc6666 } /* Name.Exception */
36-
.nf { color: #81a2be } /* Name.Function */
37-
.nl { color: #c5c8c6 } /* Name.Label */
38-
.nn { color: #f0c674 } /* Name.Namespace */
39-
.nx { color: #81a2be } /* Name.Other */
40-
.py { color: #c5c8c6 } /* Name.Property */
41-
.nt { color: #8abeb7 } /* Name.Tag */
42-
.nv { color: #cc6666 } /* Name.Variable */
43-
.ow { color: #8abeb7 } /* Operator.Word */
44-
.w { color: #c5c8c6 } /* Text.Whitespace */
45-
.mf { color: #de935f } /* Literal.Number.Float */
46-
.mh { color: #de935f } /* Literal.Number.Hex */
47-
.mi { color: #de935f } /* Literal.Number.Integer */
48-
.mo { color: #de935f } /* Literal.Number.Oct */
49-
.sb { color: #b5bd68 } /* Literal.String.Backtick */
50-
.sc { color: #c5c8c6 } /* Literal.String.Char */
51-
.sd { color: #969896 } /* Literal.String.Doc */
52-
.s2 { color: #b5bd68 } /* Literal.String.Double */
53-
.se { color: #de935f } /* Literal.String.Escape */
54-
.sh { color: #b5bd68 } /* Literal.String.Heredoc */
55-
.si { color: #de935f } /* Literal.String.Interpol */
56-
.sx { color: #b5bd68 } /* Literal.String.Other */
57-
.sr { color: #b5bd68 } /* Literal.String.Regex */
58-
.s1 { color: #b5bd68 } /* Literal.String.Single */
59-
.ss { color: #b5bd68 } /* Literal.String.Symbol */
60-
.bp { color: #c5c8c6 } /* Name.Builtin.Pseudo */
61-
.vc { color: #cc6666 } /* Name.Variable.Class */
62-
.vg { color: #cc6666 } /* Name.Variable.Global */
63-
.vi { color: #cc6666 } /* Name.Variable.Instance */
64-
.il { color: #de935f } /* Literal.Number.Integer.Long */
65-
}
1+
@import "./tomorrow/night";
2+
@import "./tomorrow/highlight";

_sass/skins/highlight/_tomorrow.scss

+2-69
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,2 @@
1-
/**
2-
* Syntax highlighting styles
3-
*/
4-
5-
.highlight {
6-
.c { color: #8e908c } /* Comment */
7-
.err { color: #c82829 } /* Error */
8-
.k { color: #8959a8 } /* Keyword */
9-
.l { color: #f5871f } /* Literal */
10-
.n { color: #4d4d4c } /* Name */
11-
.o { color: #3e999f } /* Operator */
12-
.p { color: #4d4d4c } /* Punctuation */
13-
.cm { color: #8e908c } /* Comment.Multiline */
14-
.cp { color: #8e908c } /* Comment.Preproc */
15-
.c1 { color: #8e908c } /* Comment.Single */
16-
.cs { color: #8e908c } /* Comment.Special */
17-
.gd { color: #c82829 } /* Generic.Deleted */
18-
.ge { font-style: italic } /* Generic.Emph */
19-
.gh { color: #4d4d4c; font-weight: bold } /* Generic.Heading */
20-
.gi { color: #718c00 } /* Generic.Inserted */
21-
.gp { color: #8e908c; font-weight: bold } /* Generic.Prompt */
22-
.gs { font-weight: bold } /* Generic.Strong */
23-
.gu { color: #3e999f; font-weight: bold } /* Generic.Subheading */
24-
.kc { color: #8959a8 } /* Keyword.Constant */
25-
.kd { color: #8959a8 } /* Keyword.Declaration */
26-
.kn { color: #3e999f } /* Keyword.Namespace */
27-
.kp { color: #8959a8 } /* Keyword.Pseudo */
28-
.kr { color: #8959a8 } /* Keyword.Reserved */
29-
.kt { color: #eab700 } /* Keyword.Type */
30-
.ld { color: #718c00 } /* Literal.Date */
31-
.m { color: #f5871f } /* Literal.Number */
32-
.s { color: #718c00 } /* Literal.String */
33-
.na { color: #4271ae } /* Name.Attribute */
34-
.nb { color: #4d4d4c } /* Name.Builtin */
35-
.nc { color: #eab700 } /* Name.Class */
36-
.no { color: #c82829 } /* Name.Constant */
37-
.nd { color: #3e999f } /* Name.Decorator */
38-
.ni { color: #4d4d4c } /* Name.Entity */
39-
.ne { color: #c82829 } /* Name.Exception */
40-
.nf { color: #4271ae } /* Name.Function */
41-
.nl { color: #4d4d4c } /* Name.Label */
42-
.nn { color: #eab700 } /* Name.Namespace */
43-
.nx { color: #4271ae } /* Name.Other */
44-
.py { color: #4d4d4c } /* Name.Property */
45-
.nt { color: #3e999f } /* Name.Tag */
46-
.nv { color: #c82829 } /* Name.Variable */
47-
.ow { color: #3e999f } /* Operator.Word */
48-
.w { color: #4d4d4c } /* Text.Whitespace */
49-
.mf { color: #f5871f } /* Literal.Number.Float */
50-
.mh { color: #f5871f } /* Literal.Number.Hex */
51-
.mi { color: #f5871f } /* Literal.Number.Integer */
52-
.mo { color: #f5871f } /* Literal.Number.Oct */
53-
.sb { color: #718c00 } /* Literal.String.Backtick */
54-
.sc { color: #4d4d4c } /* Literal.String.Char */
55-
.sd { color: #8e908c } /* Literal.String.Doc */
56-
.s2 { color: #718c00 } /* Literal.String.Double */
57-
.se { color: #f5871f } /* Literal.String.Escape */
58-
.sh { color: #718c00 } /* Literal.String.Heredoc */
59-
.si { color: #f5871f } /* Literal.String.Interpol */
60-
.sx { color: #718c00 } /* Literal.String.Other */
61-
.sr { color: #718c00 } /* Literal.String.Regex */
62-
.s1 { color: #718c00 } /* Literal.String.Single */
63-
.ss { color: #718c00 } /* Literal.String.Symbol */
64-
.bp { color: #4d4d4c } /* Name.Builtin.Pseudo */
65-
.vc { color: #c82829 } /* Name.Variable.Class */
66-
.vg { color: #c82829 } /* Name.Variable.Global */
67-
.vi { color: #c82829 } /* Name.Variable.Instance */
68-
.il { color: #f5871f } /* Literal.Number.Integer.Long */
69-
}
1+
@import "./tomorrow/default";
2+
@import "./tomorrow/highlight";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
$highlight-background : #f7f7f7;
2+
$highlight-foreground : #4d4d4c;
3+
$highlight-comment : #8e908c;
4+
$highlight-red : #c82829;
5+
$highlight-orange : #f5871f;
6+
$highlight-yellow : #eab700;
7+
$highlight-green : #718c00;
8+
$highlight-aqua : #3e999f;
9+
$highlight-blue : #4271ae;
10+
$highlight-purple : #8959a8;

0 commit comments

Comments
 (0)