mirror of
https://github.com/QingdaoU/oj-docs.git
synced 2024-12-27 15:01:44 +00:00
62 lines
2.3 KiB
HTML
62 lines
2.3 KiB
HTML
<!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/docsify@4.13.1/lib/themes/vue.min.css" />
|
|
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/prismjs@1.29.0/themes/prism.min.css" />
|
|
<style>
|
|
.sidebar li > p {
|
|
font-size: 16px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="app"></div>
|
|
<script src="//cdn.jsdelivr.net/npm/mermaid@10.9.0/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/docsify@4.13.1/lib/docsify.min.js"></script>
|
|
<script defer src="//cdn.jsdelivr.net/npm/docsify@4.13.1/lib/plugins/zoom-image.min.js"></script>
|
|
<script defer src="//cdn.jsdelivr.net/npm/prismjs@1.29.0/components/prism-bash.min.js"></script>
|
|
<script defer src="//cdn.jsdelivr.net/npm/prismjs@1.29.0/components/prism-yaml.min.js"></script>
|
|
<script defer src="//cdn.jsdelivr.net/npm/prismjs@1.29.0/components/prism-c.min.js"></script>
|
|
</body>
|
|
</html>
|