forked from doocs/leetcode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
162 lines (153 loc) · 7.91 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>LeetCode & Coding Interview Guide - Doocs Open Source Organization</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="keywords"
content="doc,docs,doocs,documentation,github,gitee,coding,pages,leetcode,lcof,lcci,lcof2,coding-interview,coding-interview-guide,cracking-the-coding-interview,yanglbme">
<meta name="description" content="LeetCode、剑指Offer、程序员面试金典题解">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/npm/[email protected]/lib/themes/vue.css">
<link rel="stylesheet" href="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/npm/docsify-darklight-theme@latest/dist/style.min.css">
<link rel="stylesheet" href="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/npm/katex@latest/dist/katex.min.css"/>
<link rel="icon" type="image/png" sizes="32x32" href="images/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="images/favicon-16x16.png">
<style>
.markdown-section code {
font-weight: 400;
}
</style>
</head>
<body>
<div id="app">LeetCode & Coding Interview Guide @Doocs</div>
<script>
const isEn = () => location.hash.includes('README_EN');
const isRoot = () => ['', '#/', '#/README', '#/README_EN'].includes(location.hash);
const sidebar = () => isRoot() ? false : (isEn() ? 'summary_en.md' : 'summary.md');
window.addEventListener('hashchange', () => {
window.$docsify.loadSidebar = sidebar();
window.$docsify.pagination.previousText = isEn() ? 'PREVIOUS' : '上一题';
window.$docsify.pagination.nextText = isEn() ? 'NEXT' : '下一题';
});
window.$docsify = {
name: 'leetcode',
repo: 'doocs/leetcode',
logo: '/images/doocs-leetcode.png',
search: {
depth: 2,
hideOtherSidebarContent: true,
pathNamespaces: ['/', '/solution', '/lcof', '/lcof2', '/lcci', '/lcs', '/lcp', '/basic']
},
loadSidebar: sidebar(),
auto2top: true,
subMaxLevel: 2,
alias: {
'/lcs/.*/summary.md': '/lcs/summary.md',
'/lcp/.*/summary.md': '/lcp/summary.md',
'/lcci/.*/summary.md': '/lcci/summary.md',
'/lcof/.*/summary.md': '/lcof/summary.md',
'/lcof2/.*/summary.md': '/lcof2/summary.md',
'/solution/.*/summary.md': '/solution/summary.md',
'/basic/.*/summary.md': '/basic/summary.md',
'/lcs/.*/summary_en.md': '/lcs/summary_en.md',
'/lcp/.*/summary_en.md': '/lcp/summary_en.md',
'/lcci/.*/summary_en.md': '/lcci/summary_en.md',
'/lcof/.*/summary_en.md': '/lcof/summary_en.md',
'/lcof2/.*/summary_en.md': '/lcof2/summary_en.md',
'/solution/.*/summary_en.md': '/solution/summary_en.md',
'/basic/.*/summary_en.md': '/basic/summary_en.md',
},
contributors: {
repo: 'doocs/leetcode',
ignores: ['/README.md', '/README_EN.md', '/solution/README.md', '/solution/README_EN.md', '/summary.md'],
image: {
margin: '0.2em',
isRound: true
}
},
darklightTheme: {
defaultTheme: 'light',
siteFont: 'Source Sans Pro,Helvetica Neue,Arial,sans-serif',
codeFontFamily: 'Roboto Mono, Monaco, courier, monospace',
bodyFontSize: '15px',
dark: {
background: '#191919',
highlightColor: '#e96900',
codeBackgroundColor: '#202020',
codeTextColor: '#b4b4b4',
},
light: {
highlightColor: '#e96900',
}
},
pagination: {
previousText: isEn() ? 'PREVIOUS' : '上一题',
nextText: isEn() ? 'NEXT' : '下一题',
crossChapter: true,
crossChapterText: true
},
tabs: {
persist: true,
sync: true,
theme: 'classic',
tabComments: true,
tabHeadings: true
},
plugins: [
(hook, vm) => {
hook.beforeEach((html) => {
const { file } = vm.route
const userContent = /githubusercontent\.com/.test(file)
const url = userContent ? file
.replace('raw.githubusercontent.com', 'github.com')
.replace(/\/main/, '/blob/main') : 'https://github.com/doocs/leetcode/blob/main/' + file
const github = `[GitHub](${url})`
const gitee = `[Gitee](${url.replace("github", "gitee")})`
const editHtml = isEn() ? `:memo: Edit on ${github} / ${gitee}\n` : `:memo: 在 ${github} / ${gitee} 编辑\n`
return editHtml + html
})
hook.afterEach((html) => {
const copyright = isEn() ? '. All Rights Reserved' : ' 版权所有'
const currentYear = new Date().getFullYear()
const footer = `<footer>Copyright © 2018-${currentYear} <a href="https://github.com/doocs" target="_blank">Doocs</a>${copyright}</footer>`
return html + footer
})
},
]
}
</script>
<script src="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/npm/[email protected]/lib/docsify.min.js"></script>
<script src="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/npm/prismjs/components/prism-c.min.js"></script>
<script src="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/npm/prismjs/components/prism-go.min.js"></script>
<script src="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/npm/prismjs/components/prism-sql.min.js"></script>
<script src="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/npm/prismjs/components/prism-bash.min.js"></script>
<script src="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/npm/prismjs/components/prism-cpp.min.js"></script>
<script src="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/npm/prismjs/components/prism-java.min.js"></script>
<script src="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/npm/prismjs/components/prism-kotlin.min.js"></script>
<script src="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/npm/prismjs/components/prism-csharp.min.js"></script>
<script src="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/npm/prismjs/components/prism-javascript.min.js"></script>
<script src="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/npm/prismjs/components/prism-typescript.min.js"></script>
<script src="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/npm/prismjs/components/prism-python.min.js"></script>
<script src="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/npm/prismjs/components/prism-swift.min.js"></script>
<script src="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/npm/prismjs/components/prism-nim.min.js"></script>
<script src="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/npm/prismjs/components/prism-ruby.min.js"></script>
<script src="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/npm/prismjs/components/prism-rust.min.js"></script>
<script src="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/npm/[email protected]/dist/docsify-copy-code.min.js"></script>
<script src="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/npm/docsify/lib/plugins/search.min.js"></script>
<script src="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/npm/docsify/lib/plugins/zoom-image.min.js"></script>
<script src="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/npm/docsify-tabs@1/dist/[email protected]"></script>
<script src="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/npm/docsify-pagination/dist/docsify-pagination.min.js"></script>
<script src="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/npm/docsify-darklight-theme@latest/dist/index.min.js"></script>
<script src="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/npm/docsify-contributors@latest/dist/index.min.js"></script>
<script src="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/npm/docsify-katex@latest/dist/docsify-katex.js"></script>
</body>
<!--
cdn.jsdelivr.net
test1.jsdelivr.net
testingcf.jsdelivr.net
fastly.jsdelivr.net
gcore.jsdelivr.net
-->
</html>