-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
203 lines (192 loc) · 8.02 KB
/
index.html
File metadata and controls
203 lines (192 loc) · 8.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<title>Hus_King's Note</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="Description">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify@4/lib/themes/vue.css">
<link rel="icon" type="image/svg+xml" href="_media/icon.svg">
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/prismjs@1/themes/prism-tomorrow.min.css">
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify-sidebar-collapse/dist/sidebar.min.css" />
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify-darklight-theme@latest/dist/style.min.css" title="docsify-darklight-theme" type="text/css" />
<link rel="stylesheet" href="_media/cover.css?v=202507112" />
<!-- 强制应用深色背景 -->
<style>
/* 强制覆盖所有可能的背景设置 */
section.cover,
section.cover.show,
body section.cover,
#app section.cover,
.app section.cover,
section.cover[data-page] {
background: linear-gradient(to left bottom, #000000 0%, #1a237e 100%) !important;
background-image: linear-gradient(to left bottom, #000000 0%, #1a237e 100%) !important;
}
/* 移除背景图案中的方格 */
section.cover::before {
background-image: none !important;
}
</style>
<style>
/* 设置中文字体为华文中宋 */
body:lang(zh), h1:lang(zh), h2:lang(zh), h3:lang(zh), h4:lang(zh), h5:lang(zh), h6:lang(zh) {
font-family: "华文中宋", "STZhongsong", serif !important;
}
/* 设置英文字体为 Times New Roman */
body:lang(en), h1:lang(en), h2:lang(en), h3:lang(en), h4:lang(en), h5:lang(en), h6:lang(en) {
font-family: "Times New Roman", Times, serif !important;
}
/* 确保段落和其他文本元素也应用相应字体 */
p:lang(zh) {
font-family: "华文中宋", "STZhongsong", serif !important;
}
p:lang(en) {
font-family: "Times New Roman", Times, serif !important;
}
/* 如果需要,可以为侧边栏等特定元素设置字体 */
.sidebar {
font-family: "华文中宋", "STZhongsong", serif !important;
}
</style>
<style>
/* 深色模式下 navbar 下拉菜单背景适配 */
body[data-theme="dark"] .dropdown-menu,
body[data-theme="dark"] .sidebar-nav .dropdown-menu {
background: #232a4d !important;
color: #e0e0e0 !important;
border-color: #1a237e !important;
}
/* 深色模式下 navbar 下拉菜单背景及文字适配 */
body[data-theme="dark"] .app-nav,
body[data-theme="dark"] .app-nav .dropdown,
body[data-theme="dark"] .app-nav .dropdown-menu {
background: #232a4d !important;
color: #e0e0e0 !important;
border-color: #1a237e !important;
}
body[data-theme="dark"] .app-nav .dropdown-menu a {
color: #e0e0e0 !important;
}
body[data-theme="dark"] .app-nav .dropdown-menu a:hover {
background: #1a237e !important;
color: #fff !important;
}
</style>
</head>
<body>
<div id="app"></div>
<!-- Docsify v4 -->
<script>
window.$docsify = {
loadNavbar: true, // 保持 navbar 功能,但移除 fixed 样式
loadSidebar: true,
alias: {
'/.*/_sidebar.md': '/_sidebar.md',
},
subMaxLevel: 2,
sidebarDisplayLevel: 1, // 设置侧边栏默认展开层级
coverpage: true,
auto2top: true,
logo: '_media/avatar.ico',
name: 'Hus_King',
nameLink: '/',
repo: 'https://github.com/hus-king/note',
themeColor: '#1a237e', // 修改为深蓝色,与背景匹配
// 添加封面配置
coverpage: {
'/': '_coverpage.md'
},
onlyCover: false, // 让封面和内容页同时出现
// 关闭搜索功能
// search: {
// maxAge: 86400000,
// paths: ['/', '/note/', '/algorithm/', '/tech/', '/uav/', '/Sach/'],
// placeholder: {
// '/zh-cn/': '搜索',
// '/': 'Type to search',
// },
// noData: {
// '/zh-cn/': '找不到结果',
// '/': 'No Results',
// },
// depth: 4,
// hideOtherSidebarContent: false,
// namespace: 'website-1',
// pathNamespaces: ['/zh-cn', '/ru-ru', '/ru-ru/v1'],
// },
// 添加深色模式支持
darklightTheme: {
siteFont: 'Source Sans Pro,Helvetica Neue,Arial,sans-serif',
defaultTheme: 'dark', // 修改为默认使用深色模式
dark: {
background: '#121836', // 调整为深蓝色,与封面背景协调
toggleBtnBg: '#1a237e', // 使用封面背景的深蓝色
textColor: '#e0e0e0' // 提高亮度,增强可读性
},
light: {
background: 'white',
toggleBtnBg: 'var(--theme-color)',
textColor: 'var(--text-color-base)'
}
},
progress: {
position: 'top',
color: 'var(--theme-color,#42b983)',
height: '3px',
},
}
</script>
<script src="//cdn.jsdelivr.net/npm/docsify-copy-code/dist/docsify-copy-code.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/docsify@4/lib/docsify.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js"></script>
<script src="//unpkg.com/docsify-pdf-embed-plugin/src/docsify-pdf-embed.js"></script>
<!-- 注释掉搜索插件 -->
<!-- <script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/search.min.js"></script> -->
<script src="//cdn.jsdelivr.net/npm/docsify-edit-on-github"></script>
<script src="//cdn.jsdelivr.net/npm/docsify-darklight-theme@latest/dist/index.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-clike.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-cpp.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-c.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-bash.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/katex@latest/dist/katex.min.js"></script>
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/katex@latest/dist/katex.min.css" />
<script src="//cdn.jsdelivr.net/npm/marked@4"></script>
<!-- CDN files for docsify-katex -->
<script src="//cdn.jsdelivr.net/npm/docsify-katex@latest/dist/docsify-katex.js"></script>
<script src="//cdn.jsdelivr.net/npm/docsify-sidebar-collapse/dist/docsify-sidebar-collapse.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/docsify-progress@latest/dist/progress.min.js"></script>
<script src="//unpkg.com/@rakutentech/docsify-code-inline/dist/index.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/docsify-terminal-block@1.0.3"></script>
<!-- 封面动画和效果 -->
<script src="_media/cover-animations.js"></script>
<script src="_media/cover-stars.js"></script>
<!-- 强制应用深色背景 -->
<script>
// 在页面加载完成后执行
document.addEventListener('DOMContentLoaded', function() {
// 立即执行一次
applyDarkBackground();
// 之后每100ms执行一次,持续1秒,确保覆盖任何可能的延迟加载的样式
let attempts = 0;
const interval = setInterval(function() {
applyDarkBackground();
attempts++;
if (attempts >= 10) clearInterval(interval);
}, 100);
function applyDarkBackground() {
const coverElements = document.querySelectorAll('section.cover');
if (coverElements.length) {
coverElements.forEach(function(el) {
el.style.setProperty('background', 'linear-gradient(to left bottom, #000000 0%, #1a237e 100%)', 'important');
el.style.setProperty('background-image', 'linear-gradient(to left bottom, #000000 0%, #1a237e 100%)', 'important');
});
console.log('已应用深色背景');
}
}
});
</script>
</body>
</html>