Skip to content

Commit 87f04d1

Browse files
committed
added full dark theme
1 parent 3e7bbfe commit 87f04d1

File tree

10 files changed

+19982
-19998
lines changed

10 files changed

+19982
-19998
lines changed

gatsby-ssr.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44
* See: https://www.gatsbyjs.org/docs/ssr-apis/
55
*/
66

7-
const React = require("react");
8-
const withPrefix = require("./src/utils/withPrefix").default;
7+
const React = require('react')
8+
const withPrefix = require('./src/utils/withPrefix').default
99

1010
exports.onRenderBody = function ({ setHeadComponents, setPostBodyComponents }) {
11-
setHeadComponents([]);
11+
setHeadComponents([])
1212

13-
setPostBodyComponents([
14-
<React.Fragment>
15-
<script src={withPrefix("js/init.js")} />
16-
<script src={withPrefix("js/page-load.js")} />
17-
<script src={withPrefix("js/page-unload.js")} />
18-
</React.Fragment>,
19-
]);
20-
};
13+
setPostBodyComponents([
14+
<React.Fragment>
15+
<script src={withPrefix('js/init.js')} />
16+
<script src={withPrefix('js/page-load.js')} />
17+
<script src={withPrefix('js/page-unload.js')} />
18+
</React.Fragment>,
19+
])
20+
}

package-lock.json

Lines changed: 19890 additions & 19890 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/sass/imports/_footer.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
text-transform: uppercase;
3131

3232
.copyright,
33-
> a {
33+
>a {
3434
font-size: 11px;
3535
margin-bottom: 0.5em;
3636
margin-right: 8px;
@@ -43,7 +43,7 @@
4343

4444
.to-top {
4545
border: 0;
46-
color: _palette(primary);
46+
color: _palette(accent);
4747
display: none;
4848
-webkit-flex: 0 0 auto;
4949
-ms-flex: 0 0 auto;

src/sass/imports/_general.scss

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ html {
88
}
99

1010
body {
11-
font-family: _font(text);
12-
background: _palette(blue10);
13-
color: _palette(text20);
11+
font-family: _font(body);
12+
background: _palette(primary);
13+
color: _palette(txtp20);
1414
line-height: 1.66667;
1515
}
1616

1717
a {
18-
border-bottom: 2px solid _palette(accent);
19-
color: _palette(secondary);
18+
border-bottom: 1px solid _palette(acchyp);
19+
color: _palette(acchyp);
2020
text-decoration: none;
2121
-webkit-transition: border 0.3s ease, color 0.3s ease;
2222
transition: border 0.3s ease, color 0.3s ease;
@@ -33,12 +33,13 @@ h3,
3333
h4,
3434
h5,
3535
h6 {
36-
font-family: _font(primary);
37-
color: _palette(text20);
38-
font-weight: bold;
36+
font-family: _font(head);
37+
color: _palette(txth10);
38+
font-weight: 500;
3939
line-height: 1.2;
4040
margin: 1.66667rem 0 0.83333rem;
4141
text-rendering: optimizeLegibility;
42+
text-transform: uppercase;
4243

4344
&:first-child {
4445
margin-top: 0;
@@ -91,13 +92,14 @@ ins {
9192
code,
9293
pre {
9394
font-family: _font(monospace);
95+
font-weight: normal;
9496
font-size: 0.88889rem;
9597
}
9698

9799
pre {
98100
background-color: _palette(bg);
99101
border: 1px solid _palette(border);
100-
border-radius: 5px;
102+
border-radius: 10px;
101103
color: _palette(secondary);
102104
margin: 1.66667rem 0;
103105
overflow: auto;
@@ -133,7 +135,7 @@ blockquote {
133135

134136
small,
135137
cite {
136-
color: _palette(meta);
138+
color: _palette(txtmet);
137139
display: block;
138140
font-size: 0.52941em;
139141
font-style: normal;
@@ -187,7 +189,7 @@ table {
187189
}
188190

189191
caption {
190-
color: _palette(meta);
192+
color: _palette(txtmet);
191193
font-size: 0.88889rem;
192194
font-style: normal;
193195
margin-bottom: 1em;
@@ -213,7 +215,7 @@ th {
213215

214216
/* Form fields */
215217
label {
216-
color: _palette(secondary);
218+
color: _palette(mettxt);
217219
display: inline-block;
218220
line-height: 1.5;
219221
margin-bottom: 0.25em;
@@ -228,10 +230,10 @@ input[type="search"],
228230
input[type="url"],
229231
select,
230232
textarea {
231-
font-family: _font(accent);
233+
font-family: _font(body);
232234
background: _palette(bg);
233235
border: 1px solid _palette(border);
234-
border-radius: 5px;
236+
border-radius: 10px;
235237
box-shadow: none;
236238
box-sizing: border-box;
237239
color: _palette(primary);
@@ -308,34 +310,34 @@ textarea {
308310

309311
/* Placeholder text */
310312
::-webkit-input-placeholder {
311-
color: _palette(meta);
313+
color: _palette(txtmet);
312314
}
313315

314316
::-moz-placeholder {
315-
color: _palette(meta);
317+
color: _palette(txtmet);
316318
opacity: 1;
317319
}
318320

319321
:-ms-input-placeholder {
320-
color: _palette(meta);
322+
color: _palette(txtmet);
321323
}
322324

323325
::-ms-input-placeholder {
324-
color: _palette(meta);
326+
color: _palette(txtmet);
325327
}
326328

327329
::placeholder {
328-
color: _palette(meta);
330+
color: _palette(txtmet);
329331
}
330332

331333
button,
332334
input[type="submit"],
333335
input[type="button"],
334336
input[type="reset"],
335337
.button {
336-
background: _palette(blue10);
337-
border: 2px solid _palette(accent);
338-
border-radius: 30px;
338+
background: _palette(secondary);
339+
border: 1px solid _palette(accent);
340+
border-radius: 15px;
339341
box-sizing: border-box;
340342
color: _palette(accent);
341343
display: inline-block;
@@ -355,7 +357,7 @@ input[type="reset"],
355357
background: transparent;
356358
border-color: _palette(accent);
357359
box-shadow: 0 0 1px 0.5em rgba(_palette(accent), 0.2);
358-
color: _palette(secondary);
360+
color: _palette(border);
359361
outline: 0;
360362
}
361363
}
@@ -411,7 +413,7 @@ img {
411413
.post-content,
412414
.block {
413415
img {
414-
border-radius: 5px;
416+
border-radius: 10px;
415417
}
416418
}
417419

src/sass/imports/_header.scss

Lines changed: 24 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
* Site Header
33
*/
44
.site-header {
5-
background: _palette(blue20);
6-
border-bottom: 1px solid _palette(border);
7-
color: _palette(text20);
5+
background: _palette(secondary);
6+
border-bottom: 1px solid _palette(meta);
7+
color: _palette(txtmet);
88
}
99

1010
.site-header-inside {
@@ -49,18 +49,26 @@
4949

5050
.avatar {
5151
border: 2px solid _palette(accent);
52-
box-shadow: 0 0 1px 7px rgba(_palette(accent), 0.2);
52+
box-shadow: 0 0 1px 8px rgba(_palette(accent), 0.2);
5353
border-radius: 100%;
5454
display: block;
5555
-o-object-fit: cover;
5656
object-fit: cover;
5757
height: 45px;
5858
width: 45px;
59+
60+
&:hover {
61+
border: 1px solid _palette(accent);
62+
box-shadow: 0 0 1px 6px rgba(_palette(accent), 0.2);
63+
-webkit-transition: 0.3s ease;
64+
transition: 0.3s ease;
65+
}
66+
5967
}
6068
}
6169

6270
.site-title {
63-
color: _palette(secondary);
71+
color: _palette(txth10);
6472
font-size: 1.11111rem;
6573
font-weight: bold;
6674
line-height: 1;
@@ -73,6 +81,7 @@
7381
}
7482

7583
.site-description {
84+
color: _palette(txtp20);
7685
font-size: 12px;
7786
line-height: 1;
7887
margin: 0.25em 0 0;
@@ -84,7 +93,7 @@
8493
}
8594

8695
.site-navigation {
87-
background: #fff;
96+
background: _palette(secondary);
8897
bottom: 0;
8998
box-sizing: border-box;
9099
-webkit-overflow-scrolling: touch;
@@ -135,7 +144,7 @@
135144
&.menu-button {
136145
padding: 1em 0;
137146

138-
& + .menu-button {
147+
&+.menu-button {
139148
border-top: 0;
140149
padding-top: 0;
141150
}
@@ -144,6 +153,12 @@
144153
.button {
145154
padding-bottom: 0.54286em;
146155
padding-top: 0.54286em;
156+
157+
&:hover,
158+
&:focus,
159+
&:active {
160+
color: _palette(accent);
161+
}
147162
}
148163

149164
a {
@@ -196,45 +211,12 @@
196211
background: _palette(accent);
197212
border-color: _palette(accent);
198213
box-shadow: 0 0 1px 5px rgba(_palette(accent), 0.2);
199-
color: #fff;
214+
color: _palette(secondary);
200215
}
201216
}
202217
}
203218
}
204219

205-
.site-header.dark {
206-
background: _palette(secondary);
207-
border: 0;
208-
color: _palette(meta);
209-
210-
.site-navigation {
211-
background: _palette(secondary);
212-
}
213-
214-
.site-title {
215-
color: #fff;
216-
}
217-
218-
.menu-item {
219-
.button {
220-
&:hover,
221-
&:focus,
222-
&:active {
223-
color: _palette(accent);
224-
}
225-
}
226-
}
227-
228-
.menu-item,
229-
.social-links .button-icon {
230-
border-color: _palette(primary);
231-
}
232-
233-
.social-links .button-icon:hover {
234-
border-color: _palette(accent);
235-
}
236-
}
237-
238220
@media only screen and (min-width: 801px) {
239221
.site-header {
240222
border-bottom: 0;
@@ -350,6 +332,7 @@
350332
width: 100%;
351333
z-index: 9997;
352334
}
335+
353336
.site-navigation {
354337
right: 0;
355338
-webkit-transition: right 0.3s ease-in-out;

src/sass/imports/_post-navigation.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
}
99

1010
.page-number {
11-
color: _palette(meta);
11+
color: _palette(accent);
1212
display: inline-block;
1313
font-size: 14px;
1414
letter-spacing: 1px;

0 commit comments

Comments
 (0)