Skip to content

Commit 70c4e0e

Browse files
authored
Merge pull request #7 from summerscar/master
🐞fix(codeblock/style/bolg url):
2 parents 53b4d28 + 9c8c7d7 commit 70c4e0e

File tree

3 files changed

+30
-15
lines changed

3 files changed

+30
-15
lines changed

docusaurus.config.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
const codeblockTheme = require('prism-react-renderer/themes/palenight')
2+
// 可选theme https://github.com/FormidableLabs/prism-react-renderer/tree/master/src/themes
3+
// 覆盖背景色
4+
codeblockTheme.plain.backgroundColor = '#000000'
5+
16
module.exports = {
27
title: 'CodeLab',
38
tagline: '传递编程的乐趣,鼓励孩子成为数字时代的创作者',
@@ -113,6 +118,10 @@ module.exports = {
113118
/*copyright: `Copyright © ${new Date().getFullYear()} CodeLab, Inc. Built with Docusaurus.`,*/
114119
copyright: `©CodeLab`,
115120
},
121+
prism: {
122+
theme: codeblockTheme,
123+
darkTheme: codeblockTheme,
124+
},
116125
},
117126
presets: [
118127
[
@@ -130,7 +139,7 @@ module.exports = {
130139
showReadingTime: true,
131140
// Please change this to your repo.
132141
editUrl:
133-
'https://github.com/CodeLabClub/NewCodeLabWeb/tree/master/blog/',
142+
'https://github.com/CodeLabClub/NewCodeLabWeb/tree/master/',
134143
},
135144
theme: {
136145
customCss: require.resolve('./src/css/custom.css'),

src/css/custom.css

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
--ifm-navbar-background-color:black;
1919
--ifm-background-color: white !important;
2020
--ifm-navbar-height: 4rem;
21-
--ifm-navbar-item-padding-horizontal: 2.85rem;
21+
--ifm-navbar-item-padding-horizontal: 2.85rem;
2222
--ifm-navbar-link-color: white;
2323
--ifm-color-content-secondary: #1a1a1a!important;/*右侧目录字体颜色,重新挑选修改!*/
2424
--ifm-button-border-radius:0rem;
@@ -174,6 +174,10 @@ h2[class^='margin-bottom--sm blogPostTitle'] {
174174
}
175175

176176
@media screen and (max-width: 966px) {
177+
:root {
178+
--ifm-color-content: #c2c2c2;
179+
}
180+
177181
.navbar__items {
178182
justify-content: unset;
179183
}
@@ -190,77 +194,77 @@ h2[class^='margin-bottom--sm blogPostTitle'] {
190194
font-size: 10em;
191195
line-height: 0.7em;
192196
word-wrap: break-word;
193-
overflow-wrap: break-word;
197+
overflow-wrap: break-word;
194198
}
195199

196200
.char1{
197201
z-index: 12;
198-
text-shadow:0 0.05em 0.12em rgba(0,0,0,0.9);
202+
text-shadow:0 0.05em 0.12em rgba(0,0,0,0.9);
199203
margin-left:-0.1em;
200204
}
201205

202206
.char2{
203207
z-index: 11;
204-
text-shadow:0 0.05em 0.12em rgba(0,0,0,0.9);
208+
text-shadow:0 0.05em 0.12em rgba(0,0,0,0.9);
205209
margin-left:-0.1em;
206210
}
207211

208212
.char3{
209213
z-index: 10;
210-
text-shadow:0 0.05em 0.12em rgba(0,0,0,0.9);
214+
text-shadow:0 0.05em 0.12em rgba(0,0,0,0.9);
211215
margin-left:-0.1em;
212216
}
213217

214218
.char4{
215219
z-index: 9;
216-
text-shadow:0 0.05em 0.12em rgba(0,0,0,0.9);
220+
text-shadow:0 0.05em 0.12em rgba(0,0,0,0.9);
217221
margin-left:-0.1em;
218222
}
219223

220224
.char5{
221225
z-index: 8;
222-
text-shadow:0 0.05em 0.12em rgba(0,0,0,0.9);
226+
text-shadow:0 0.05em 0.12em rgba(0,0,0,0.9);
223227
margin-left:-0.1em;
224228
}
225229

226230
.char6{
227231
z-index: 7;
228-
text-shadow:0 0.05em 0.12em rgba(0,0,0,0.9);
232+
text-shadow:0 0.05em 0.12em rgba(0,0,0,0.9);
229233
margin-left:-0.1em;
230234
}
231235

232236
.char7{
233237
z-index: 6;
234-
text-shadow:0 0.05em 0.12em rgba(0,0,0,0.9);
238+
text-shadow:0 0.05em 0.12em rgba(0,0,0,0.9);
235239
margin-left:-0.1em;
236240
}
237241

238242
.char8{
239243
z-index: 5;
240-
text-shadow:0 0.05em 0.12em rgba(0,0,0,0.9);
244+
text-shadow:0 0.05em 0.12em rgba(0,0,0,0.9);
241245
margin-left:-0.1em;
242246
}
243247

244248
.char9{
245249
z-index: 4;
246-
text-shadow:0 0.05em 0.12em rgba(0,0,0,0.9);
250+
text-shadow:0 0.05em 0.12em rgba(0,0,0,0.9);
247251
margin-left:-0.1em;
248252
}
249253

250254
.char10{
251255
z-index: 3;
252-
text-shadow:0 0.05em 0.12em rgba(0,0,0,0.9);
256+
text-shadow:0 0.05em 0.12em rgba(0,0,0,0.9);
253257
margin-left:-0.1em;
254258
}
255259

256260
.char11{
257261
z-index: 2;
258-
text-shadow:0 0.05em 0.12em rgba(0,0,0,0.9);
262+
text-shadow:0 0.05em 0.12em rgba(0,0,0,0.9);
259263
margin-left:-0.1em;
260264
}
261265

262266
.char12{
263267
z-index: 1;
264-
text-shadow:0 0.05em 0.12em rgba(0,0,0,0.9);
268+
text-shadow:0 0.05em 0.12em rgba(0,0,0,0.9);
265269
margin-left:-0.1em;
266270
}

src/pages/styles.module.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,8 @@
417417
/* width:800px;
418418
height: 300px; */
419419
padding-bottom:4rem;
420+
margin-left: 0;
421+
margin-right: 0;
420422
}
421423

422424
.plus1,

0 commit comments

Comments
 (0)