Skip to content

Commit e1c0a84

Browse files
committed
Implement a Dark theme for syntaxhighlighter and blame
The SH dark theme is the same as the following file, with formatting and minor modifications: Resources/html/lib/syntaxhighlighter/styles/shThemeFadeToGrey.css Fixes gitx#356
1 parent bfcfc00 commit e1c0a84

5 files changed

Lines changed: 192 additions & 13 deletions

File tree

‎Resources/html/css/shThemeDark.css‎

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
/**
2+
* SyntaxHighlighter
3+
* http://alexgorbatchev.com/SyntaxHighlighter
4+
*
5+
* SyntaxHighlighter is donationware. If you are using it, please donate.
6+
* http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7+
*
8+
* @version
9+
* 3.0.83 (July 02 2010)
10+
*
11+
* @copyright
12+
* Copyright (C) 2004-2010 Alex Gorbatchev.
13+
*
14+
* @license
15+
* Dual licensed under the MIT and GPL licenses.
16+
*/
17+
.syntaxhighlighter {
18+
background-color: #121212 !important;
19+
}
20+
21+
.syntaxhighlighter .line.alt1 {
22+
background-color: #121212 !important;
23+
}
24+
25+
.syntaxhighlighter .line.alt2 {
26+
background-color: #121212 !important;
27+
}
28+
29+
.syntaxhighlighter .line.highlighted.alt1,
30+
.syntaxhighlighter .line.highlighted.alt2 {
31+
background-color: #2c2c29 !important;
32+
}
33+
34+
.syntaxhighlighter .line.highlighted.number {
35+
color: white !important;
36+
}
37+
38+
.syntaxhighlighter table caption {
39+
color: white !important;
40+
}
41+
42+
.syntaxhighlighter table td.code .container textarea {
43+
background: #121212;
44+
color: white;
45+
}
46+
47+
.syntaxhighlighter .gutter {
48+
color: #afafaf !important;
49+
border: 1px solid transparent !important;
50+
background-color: transparent !important;
51+
}
52+
53+
.syntaxhighlighter .gutter .line {
54+
border-right: 3px solid #3185b9 !important;
55+
}
56+
57+
.syntaxhighlighter .gutter .line.highlighted {
58+
background-color: #3185b9 !important;
59+
color: #121212 !important;
60+
}
61+
62+
.syntaxhighlighter.printing .line .content {
63+
border: none !important;
64+
}
65+
66+
.syntaxhighlighter.collapsed {
67+
overflow: visible !important;
68+
}
69+
70+
.syntaxhighlighter.collapsed .toolbar {
71+
color: #3185b9 !important;
72+
background: black !important;
73+
border: 1px solid #3185b9 !important;
74+
}
75+
76+
.syntaxhighlighter.collapsed .toolbar a {
77+
color: #3185b9 !important;
78+
}
79+
80+
.syntaxhighlighter.collapsed .toolbar a:hover {
81+
color: #d01d33 !important;
82+
}
83+
84+
.syntaxhighlighter .toolbar {
85+
color: white !important;
86+
background: #3185b9 !important;
87+
border: none !important;
88+
}
89+
90+
.syntaxhighlighter .toolbar a {
91+
color: white !important;
92+
}
93+
94+
.syntaxhighlighter .toolbar a:hover {
95+
color: #96daff !important;
96+
}
97+
98+
.syntaxhighlighter .plain,
99+
.syntaxhighlighter .plain a {
100+
color: white !important;
101+
}
102+
103+
.syntaxhighlighter .comments,
104+
.syntaxhighlighter .comments a {
105+
color: #696854 !important;
106+
}
107+
108+
.syntaxhighlighter .string,
109+
.syntaxhighlighter .string a {
110+
color: #e3e658 !important;
111+
}
112+
113+
.syntaxhighlighter .keyword {
114+
color: #d01d33 !important;
115+
}
116+
117+
.syntaxhighlighter .preprocessor {
118+
color: #435a5f !important;
119+
}
120+
121+
.syntaxhighlighter .variable {
122+
color: #898989 !important;
123+
}
124+
125+
.syntaxhighlighter .value {
126+
color: #009900 !important;
127+
}
128+
129+
.syntaxhighlighter .functions {
130+
color: #aaaaaa !important;
131+
}
132+
133+
.syntaxhighlighter .constants {
134+
color: #96daff !important;
135+
}
136+
137+
.syntaxhighlighter .script {
138+
font-weight: bold !important;
139+
color: #d01d33 !important;
140+
background-color: none !important;
141+
}
142+
143+
.syntaxhighlighter .color1,
144+
.syntaxhighlighter .color1 a {
145+
color: #ffc074 !important;
146+
}
147+
148+
.syntaxhighlighter .color2,
149+
.syntaxhighlighter .color2 a {
150+
color: #4a8cdb !important;
151+
}
152+
153+
.syntaxhighlighter .color3,
154+
.syntaxhighlighter .color3 a {
155+
color: #96daff !important;
156+
}
157+
158+
.syntaxhighlighter .functions {
159+
font-weight: bold !important;
160+
}

‎Resources/html/views/blame/blame.css‎

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ tr.block.l1 p.summary{
3535
display: none !important;
3636
}
3737

38-
table.blocks td {
38+
table.blocks tr.block > td {
3939
vertical-align: top !important;
4040
}
4141

@@ -44,28 +44,44 @@ p.author {
4444
}
4545

4646
table.blocks {
47-
font: 11px "Menlo" !important !important;
47+
font: 11px "Menlo" !important;
48+
border-bottom: 1px solid #c9c9c9 !important;
49+
width: 100% !important;
4850
}
4951

50-
table tr.block{
52+
table.blocks tr.block {
5153
border-top: 1px solid #c9c9c9 !important;
5254
}
53-
table.blocks{
54-
border-bottom: 1px solid #c9c9c9 !important;
55-
width: 100% !important;
56-
}
5755

58-
table.blocks tr td:nth-of-type(1) {
56+
table.blocks tr.block > td:nth-of-type(1) {
5957
background-color: #ececec !important;
6058
border-right: 1px solid #c9c9c9 !important;
59+
padding-right: 5px !important;
60+
padding-left: 5px !important;
6161
}
6262

63-
table.blocks tr td:nth-of-type(2) {
63+
table.blocks tr.block > td:nth-of-type(2) {
6464
width: 100% !important;
65-
padding-left: 1em !important;
6665
}
6766

68-
table.blocks tr.block td:nth-of-type(1){
69-
padding-right: 5px !important;
70-
padding-left: 5px !important;
67+
@media screen and (prefers-color-scheme: dark) {
68+
p.author,p.summary {
69+
color: white !important;
70+
}
71+
a {
72+
color: #e3e658 !important;
73+
}
74+
75+
table.blocks {
76+
border-bottom: 1px solid #2c2c29 !important;
77+
}
78+
79+
table.blocks tr.block {
80+
border-top: 1px solid #2c2c29 !important;
81+
}
82+
83+
table.blocks tr.block > td:nth-of-type(1) {
84+
background-color: #121212 !important;
85+
border-right: 1px solid #2c2c29 !important;
86+
}
7187
}

‎Resources/html/views/blame/index.html‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<link rel="stylesheet" href="blame.css" type="text/css" media="screen" title="no title" charset="utf-8">
1010
<link rel="stylesheet" href="../../css/shCoreGitX.css" type="text/css" media="screen" title="no title" charset="utf-8">
1111
<link rel="stylesheet" href="../../css/shThemeGitX.css" type="text/css" media="screen" title="no title" charset="utf-8">
12+
<link rel="stylesheet" href="../../css/shThemeDark.css" type="text/css" media="screen and (prefers-color-scheme: dark)" title="no title" charset="utf-8">
1213
</head>
1314
<body>
1415
<div id="txt">hola</pre>

‎Resources/html/views/fileview/index.html‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
<link rel="stylesheet" href="source.css" type="text/css" media="screen" title="no title" charset="utf-8">
3838
<link rel="stylesheet" href="../../css/shCoreGitX.css" type="text/css" media="screen" title="no title" charset="utf-8">
3939
<link rel="stylesheet" href="../../css/shThemeGitX.css" type="text/css" media="screen" title="no title" charset="utf-8">
40+
<link rel="stylesheet" href="../../css/shThemeDark.css" type="text/css" media="screen and (prefers-color-scheme: dark)" title="no title" charset="utf-8">
4041
</head>
4142
<body>
4243
<div id="source"></div>

‎Resources/html/views/fileview/index_test.html‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<link rel="stylesheet" href="source.css" type="text/css" media="screen" title="no title" charset="utf-8">
1111
<link rel="stylesheet" href="../../css/shCoreGitX.css" type="text/css" media="screen" title="no title" charset="utf-8">
1212
<link rel="stylesheet" href="../../css/shThemeGitX.css" type="text/css" media="screen" title="no title" charset="utf-8">
13+
<link rel="stylesheet" href="../../css/shThemeDark.css" type="text/css" media="screen and (prefers-color-scheme: dark)" title="no title" charset="utf-8">
1314
</head>
1415
<body onload="test();">
1516
<div id="source">

0 commit comments

Comments
 (0)