-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path404.html
More file actions
163 lines (149 loc) · 6.41 KB
/
404.html
File metadata and controls
163 lines (149 loc) · 6.41 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="MarkBind 6.3.1">
<meta name="viewport" content="width=device-width, initial-scale=1"><title>Page not found</title> <link rel="stylesheet" href="/markbind/css/bootstrap.min.css"><link rel="stylesheet" href="/markbind/css/codeblock-light.min.css"><link rel="stylesheet" href="/markbind/css/markbind.min.css"><link rel="stylesheet" href="/plugins/codeBlockCopyButtons/codeBlockButtons.css"><link rel="stylesheet" href="/plugins/codeBlockWrapButtons/codeBlockButtons.css"><link rel="stylesheet" href="/plugins/markbind-plugin-anchors/markbind-plugin-anchors.css"><link rel="stylesheet" href="/plugins/markbind-plugin-tree/markbind-plugin-tree.css"><link rel="icon" href="/favicon.ico"></head>
<script>
const baseUrl = ''
</script>
<body data-code-theme="light">
<div id="app"><div><p><div class="text-center"><p style="font-size:10rem;">404</p></div> <div class="text-center"><p style="font-size:1.5rem;">File not found<br>Click <a href="/">here</a> to go back to the home page.</p></div></p></div></div>
</body><script src="/markbind/js/bootstrap-utility.min.js"></script>
<script src="/markbind/js/polyfill.min.js"></script>
<script src="/markbind/js/vue.global.prod.min.js"></script>
<script src="/markbind/js/markbind.min.js"></script>
<script src="404.page-vue-render.js"></script>
<script>
MarkBind.setupWithSearch()
</script>
<script src="https://cdn.jsdelivr.net/npm/@custardui/custardui@latest" data-base-url="/"></script>
<script>
function copyCodeBlock(element) {
const pre = element.parentElement.parentElement;
const codeElement = pre.querySelector('code');
const copyButtonBody = element.querySelector('.function-btn-body');
const tooltipText = element.querySelector(".tooltiptext");
// create dummy text element to select() the text field
const textElement = document.createElement('textarea');
textElement.value = codeElement.textContent;
document.body.appendChild(textElement);
textElement.select();
document.execCommand('copy');
document.body.removeChild(textElement);
copyButtonBody.innerHTML = `
<svg
xmlns="http://www.w3.org/2000/svg"
width="18"
height="18"
viewBox="2 2 22 22"
>
<path d="M 19.28125 5.28125 L 9 15.5625 L 4.71875 11.28125 L 3.28125 12.71875 L 8.28125 17.71875
L 9 18.40625 L 9.71875 17.71875 L 20.71875 6.71875 Z"></path>
</svg>
`;
console.log("Running tooltip");
tooltipText.innerText = `Copied!`;
setTimeout(() => {
copyButtonBody.innerHTML = `
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
width="18" height="18" viewBox="0 0 18 18" version="1.1">
<g id="surface1">
<path d="M 11.273438 0 L 2.546875 0 C 1.746094 0 1.089844 0.613281 1.089844
1.363281 L 1.089844 10.910156 L 2.546875 10.910156 L 2.546875 1.363281 L 11.273438
1.363281 Z M 13.453125 2.726562 L 5.453125 2.726562 C 4.65625 2.726562 4 3.339844 4
4.089844 L 4 13.636719 C 4 14.386719 4.65625 15 5.453125 15 L 13.453125 15 C 14.253906
15 14.910156 14.386719 14.910156 13.636719 L 14.910156 4.089844 C 14.910156 3.339844
14.253906 2.726562 13.453125 2.726562 Z M 13.453125 13.636719 L 5.453125 13.636719 L
5.453125 4.089844 L 13.453125 4.089844 Z M 13.453125 13.636719 "/>
</g>
</svg>
`;
tooltipText.innerText = `Copy`;
}, 3000);
}
</script>
<script>
function toggleCodeBlockWrap(element) {
const pre = element.parentElement.parentElement;
const tooltipText = element.querySelector(".tooltiptext");
const classList = pre.querySelector('code').classList;
if (classList.contains('wrap')) {
classList.remove('wrap');
tooltipText.innerText = `Wrap Text`;
} else {
classList.add('wrap')
tooltipText.innerText = `Unwrap Text`;
}
}
</script>
<script type="module">
window.mermaidPromise = null;
const loadMermaid = () => {
if (window.mermaidPromise === null) {
window.mermaidPromise = import('https://unpkg.com/mermaid@10/dist/mermaid.esm.min.mjs')
.then(({ default: mermaid }) => {
mermaid.initialize({
startOnLoad: false,
});
console.log('Mermaid loaded successfully');
return mermaid;
})
.catch((error) => {
console.error('Mermaid failed to load:', error);
window.mermaidPromise = false;
return null;
});
}
return window.mermaidPromise;
};
const renderMermaidDiagrams = (elements) => {
if (!elements || elements.length === 0) {
return Promise.resolve();
}
return loadMermaid().then(mermaid => {
if (!mermaid) return;
return mermaid.run({ nodes: Array.from(elements) })
.catch(err => console.error('Error rendering mermaid diagrams:', err));
});
};
const setupMermaidObserver = () => {
const observer = new MutationObserver((mutations) => {
let newMermaidElements = [];
mutations.forEach(mutation => {
if (mutation.addedNodes.length) {
mutation.addedNodes.forEach(node => {
if (node.nodeType === 1 && node.classList &&
node.classList.contains('mermaid')) {
newMermaidElements.push(node);
}
if (node.nodeType === 1 && node.querySelectorAll) {
const mermaidInNode = node.querySelectorAll('.mermaid');
if (mermaidInNode.length) {
newMermaidElements = [...newMermaidElements, ...mermaidInNode];
}
}
});
}
});
if (newMermaidElements.length > 0) {
renderMermaidDiagrams(newMermaidElements);
}
});
observer.observe(document.body, {
childList: true,
subtree: true
});
return observer;
};
// Initialize on DOM content loaded
document.addEventListener('DOMContentLoaded', () => {
const existingDiagrams = document.querySelectorAll('.mermaid');
if (existingDiagrams.length > 0) {
renderMermaidDiagrams(existingDiagrams);
}
setupMermaidObserver();
});
</script>
</html>