-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
90 lines (88 loc) · 3.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Docsify-examples</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 id="theme-stylesheet" rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css">
<style>
.theme-button {
margin: 5px;
padding: 5px 10px;
cursor: pointer;
border: 1px solid #ccc;
background-color: #f9f9f9;
border-radius: 5px;
}
.theme-button.active {
background-color: #ccc;
}
</style>
</head>
<body>
<div id="app"></div>
<div id="theme-selector" style="position: fixed; top: 10px; right: 10px;">
<button class="theme-button" data-theme="vue.css">Vue</button>
<button class="theme-button" data-theme="buble.css">Buble</button>
<button class="theme-button" data-theme="dark.css">Dark</button>
<button class="theme-button" data-theme="pure.css">Pure</button>
</div>
<script>
window.$docsify = {
name: '',
repo: '',
loadSidebar: true,
subMaxLevel: 6,
alias: {
'/.*/_sidebar.md': '/_sidebar.md',
'/.*/_navbar.md': '/_navbar.md'
},
sidebarDisplayLevel: 2, // set sidebar display level
search: {
maxAge: 86400000, // Expiration time, the default one day
paths: 'auto',
placeholder: 'Type to search',
noData: 'No Results!',
depth: 6,
hideOtherSidebarContent: true, // whether or not to hide other sidebar content
}
}
document.addEventListener('DOMContentLoaded', function () {
const buttons = document.querySelectorAll('.theme-button');
buttons.forEach(button => {
button.addEventListener('click', function () {
const theme = button.getAttribute('data-theme');
document.getElementById('theme-stylesheet').href = `//unpkg.com/docsify/lib/themes/${theme}`;
buttons.forEach(btn => btn.classList.remove('active'));
button.classList.add('active');
});
});
});
</script>
<!-- Docsify v4 -->
<script src="//cdn.jsdelivr.net/npm/docsify@4"></script>
<script type="module">
import mermaid from "https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs";
mermaid.initialize({ startOnLoad: true });
window.mermaid = mermaid;
</script>
<script src="//unpkg.com/[email protected]/dist/docsify-mermaid.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/search.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/docsify-sidebar-collapse/dist/docsify-sidebar-collapse.min.js"></script>
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify-sidebar-collapse/dist/sidebar-folder.min.css" />
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-bash.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-docker.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-git.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-java.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-jsx.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-markdown.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-php.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-rust.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-sql.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-swift.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-typescript.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-yaml.min.js"></script>
</body>