Skip to content

Commit 420982a

Browse files
committed
Experimental *zen* editor theme
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
1 parent df2c0e2 commit 420982a

File tree

3 files changed

+119
-0
lines changed

3 files changed

+119
-0
lines changed

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,11 @@
175175
"mini-css-extract-plugin": "~0.4.1",
176176
"mocha": "~5.2.0",
177177
"mock-require": "~3.0.3",
178+
"node-sass": "^4.12.0",
178179
"nyc": "~14.0.0",
179180
"optimize-css-assets-webpack-plugin": "~5.0.0",
180181
"power-assert": "~1.6.1",
182+
"sass-loader": "^8.0.0",
181183
"script-loader": "~0.7.2",
182184
"sequelize-cli": "~5.4.0",
183185
"sinon": "~7.3.2",

public/css/zen.scss

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
$whiteColor: #FBFBFB;
2+
$darkColor: #333;
3+
4+
.ui-edit-area.zen {
5+
background-color: $whiteColor;
6+
7+
.toolbar {
8+
display: none;
9+
// TODO
10+
11+
// background: white;
12+
// color: black;
13+
// border-bottom: 1px solid #d2d2d2;
14+
// a {
15+
// color: black !important;
16+
// }
17+
// a.active, a:hover {
18+
// background: #eee;
19+
// }
20+
}
21+
22+
.CodeMirror {
23+
max-width: 625px;
24+
margin: 0 auto;
25+
}
26+
27+
.CodeMirror,
28+
.CodeMirror-scroll {
29+
background-color: $whiteColor !important;
30+
color: $darkColor;
31+
}
32+
.CodeMirror-gutters {
33+
background-color: $whiteColor !important;
34+
}
35+
.CodeMirror-overlayscroll-horizontal div,
36+
.CodeMirror-overlayscroll-vertical div {
37+
background: rgba(0, 0, 0, 0.5);
38+
border: 1px solid $whiteColor;
39+
}
40+
41+
.CodeMirror-sizer {
42+
padding-top: .5em;
43+
}
44+
45+
.CodeMirror {
46+
font-size: 16px;
47+
48+
.cm-m-markdown {
49+
// TODO: make font family selectable
50+
font-family: "Avenir Next", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
51+
52+
letter-spacing: 0.04em;
53+
filter: saturate(1.5) contrast(90%);
54+
line-height: 1.67;
55+
color: rgba(0, 0, 0, 0.8);
56+
57+
&.cm-header-1 {
58+
font-size: 1.33em;
59+
}
60+
61+
&.cm-header {
62+
line-height: 1.27;
63+
}
64+
&.cm-header-2 {
65+
font-size: 1.15em;
66+
}
67+
&.cm-quote {
68+
color: rgba(0, 0, 0, 0.48);
69+
}
70+
&.cm-builtin {
71+
color: rgba(0, 0, 0, 0.32);
72+
}
73+
&.cm-url {
74+
color: rgba(0, 0, 0, 0.32);
75+
}
76+
&.cm-link {
77+
color: #337ab7;
78+
}
79+
}
80+
.cm-m-xml {
81+
color: $darkColor;
82+
}
83+
.cm-comment {
84+
background-color: rgba(0,0,0,.05);
85+
border-radius: 3px;
86+
padding: .15em 0;
87+
}
88+
}
89+
90+
.status-bar {
91+
background: $whiteColor;
92+
color: $darkColor;
93+
border-top: 1px solid #d2d2d2;
94+
.status-info {
95+
color: $darkColor;
96+
}
97+
.status-length {
98+
color: $darkColor !important;
99+
}
100+
.status-indicators {
101+
background: $whiteColor;
102+
color: $darkColor;
103+
> div {
104+
border-left: 1px solid #d2d2d2;
105+
}
106+
}
107+
108+
.dropdown-menu {
109+
background-color: $whiteColor;
110+
}
111+
112+
.dropdown-menu > li > a {
113+
color: $darkColor;
114+
}
115+
}
116+
}

public/js/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ import appState from './lib/appState'
8282
require('../vendor/showup/showup')
8383

8484
require('../css/index.css')
85+
require('../css/zen.scss')
8586
require('../css/extra.css')
8687
require('../css/slide-preview.css')
8788
require('../css/site.css')

0 commit comments

Comments
 (0)