Skip to content

Commit d55cb97

Browse files
committed
feat: add dark mode
新增黑暗模式,适合夜间阅读
1 parent 706f710 commit d55cb97

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

index.html

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<meta name="description" content="coding-interview">
88
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
99
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css">
10+
<link rel="stylesheet" href="//unpkg.com/[email protected]/dist/style.css" />
1011
<link rel="icon" type="image/png" sizes="32x32" href="images/favicon-32x32.png?v=5.1.4">
1112
<link rel="icon" type="image/png" sizes="16x16" href="images/favicon-16x16.png?v=5.1.4">
1213
</head>
@@ -15,7 +16,7 @@
1516
<script>
1617
window.$docsify = {
1718
name: 'coding-interview',
18-
repo: 'doocs/coding-interview',
19+
// repo: 'doocs/coding-interview',
1920
maxLevel: 3,
2021
auto2top: true,
2122
coverpage: true,
@@ -26,12 +27,17 @@
2627
'/docs/coding-interview',
2728
'/docs/the-beauty-of-programming'
2829
],
30+
darkMode: {
31+
light: {
32+
toggleBtnBg: '#42b983'
33+
}
34+
},
2935
plugins: [
3036
function (hook) {
3137
var footer = [
3238
'<hr/>',
3339
'<footer>',
34-
'<span>Copyright © 2018-2019 <a href="https://github.com/doocs" target="_blank">Doocs</a>. All rights reserved.</span>',
40+
'<span>Copyright © 2018-2020 <a href="https://github.com/doocs" target="_blank">Doocs</a>. All rights reserved.',
3541
'</footer>'
3642
].join('')
3743

@@ -53,5 +59,6 @@
5359
<script src="//unpkg.com/docsify/lib/plugins/search.js"></script>
5460
<script src="//unpkg.com/docsify/lib/plugins/emoji.js"></script>
5561
<script src="//unpkg.com/docsify/lib/plugins/zoom-image.js"></script>
62+
<script src="//unpkg.com/[email protected]/dist/index.js"></script>
5663
</body>
5764
</html>

0 commit comments

Comments
 (0)