-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathindex.html
61 lines (60 loc) · 2.25 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<meta charset="UTF-8" />
<title>Qingdao University Online Judge</title>
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/[email protected]/lib/themes/vue.min.css" />
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/[email protected]/themes/prism.min.css" />
<style>
.sidebar li > p {
font-size: 16px;
}
</style>
</head>
<body>
<div id="app"></div>
<script src="//cdn.jsdelivr.net/npm/[email protected]/dist/mermaid.min.js"></script>
<script>
let num = 0;
mermaid.initialize({ startOnLoad: false });
window.$docsify = {
name: 'OnlineJudge',
loadSidebar: true,
coverpage: true,
alias: {
'/.*/_sidebar.md': '/_sidebar.md',
},
markdown: {
renderer: {
code(code, lang) {
// thanks https://github.com/HugoDF/docsify-mermaid-10
if (lang === "mermaid") {
const svgName = `mermaid-svg-${num++}`;
const MERMAID_CONTAINER_ID = `${svgName}-container`;
mermaid.render(svgName, code).then(({ svg }) => {
const containerElement = document.querySelector(
`#${MERMAID_CONTAINER_ID}`
);
if (containerElement) {
containerElement.innerHTML = svg;
} else {
console.error(`Error: #${MERMAID_CONTAINER_ID} not found`);
}
});
return `<div class="mermaid" id="${MERMAID_CONTAINER_ID}"></div>`;
}
return this.origin.code.apply(this, arguments);
},
},
},
};
</script>
<script defer src="//cdn.jsdelivr.net/npm/[email protected]/lib/docsify.min.js"></script>
<script defer src="//cdn.jsdelivr.net/npm/[email protected]/lib/plugins/zoom-image.min.js"></script>
<script defer src="//cdn.jsdelivr.net/npm/[email protected]/components/prism-bash.min.js"></script>
<script defer src="//cdn.jsdelivr.net/npm/[email protected]/components/prism-yaml.min.js"></script>
<script defer src="//cdn.jsdelivr.net/npm/[email protected]/components/prism-c.min.js"></script>
</body>
</html>