-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path404.html
More file actions
285 lines (257 loc) · 10.6 KB
/
404.html
File metadata and controls
285 lines (257 loc) · 10.6 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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
<!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>MarkBind - 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/codeBlockWrapButtons/codeBlockButtons.css"><link rel="stylesheet" href="/plugins/web3Form/web-3-form.css"><link rel="stylesheet" href="/plugins/codeBlockCopyButtons/codeBlockButtons.css"><link rel="stylesheet" href="/plugins/dataTable/datatables.min.css"><link rel="stylesheet" href="/plugins/dataTable/datatables-additional.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>
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>
function submitForm(element) {
event.preventDefault();
const formData = new FormData(element);
const formProps = Object.fromEntries(formData);
const json = JSON.stringify(formProps);
const submitButton = element.querySelector('button[type="submit"]');
const submitButtonText = submitButton.innerText;
submitButton.innerText = 'Please wait...'
fetch('https://api.web3forms.com/submit', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json'
},
body: json,
})
.then(async (response) => {
if (response.status == 200) {
alert('Form submitted! Thank you for your response');
} else {
alert('Error submitting form! Please try again later.');
}
})
.catch(error => {
alert('Error submitting form! Please try again later.');
})
.finally(() => {
submitButton.innerText = submitButtonText;
})
}
</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 src="/plugins/dataTable/datatables.min.js"></script>
<script>
function getTableOptions(el) {
const options = {};
if ($(el).hasClass('sortable-table')) {
options.searching = false;
options.paging = false;
options.info = false;
} else if ($(el).hasClass('searchable-table')) {
options.ordering = false;
options.paging = false;
options.info = false;
options.dom = '<"row"<"col-sm-12"f>>' + '<"row"<"col-sm-12"t>>';
} else if ($(el).hasClass('sortable-searchable-table')) {
options.paging = false;
options.info = false;
options.dom = '<"row"<"col-sm-12"f>>' + '<"row"<"col-sm-12"t>>';
}
return options;
}
function initializeTables(tables) {
if (!tables || tables.length === 0) return;
tables.forEach(table => {
const options = getTableOptions(table);
$(table).DataTable(options);
$(table).addClass('dt-processed');
});
}
function setupTableObserver() {
const observer = new MutationObserver((mutations) => {
let newTables = [];
mutations.forEach(mutation => {
if (mutation.addedNodes.length) {
mutation.addedNodes.forEach(node => {
if (node.nodeType === 1 && node.tagName === 'TABLE' &&
!$(node).hasClass('dt-processed') &&
($(node).hasClass('sortable-table') ||
$(node).hasClass('searchable-table') ||
$(node).hasClass('sortable-searchable-table'))) {
newTables.push(node);
}
if (node.nodeType === 1 && node.querySelectorAll) {
const tablesInNode = node.querySelectorAll(
'table.sortable-table:not(.dt-processed), ' +
'table.searchable-table:not(.dt-processed), ' +
'table.sortable-searchable-table:not(.dt-processed)');
if (tablesInNode.length) {
newTables = [...newTables, ...tablesInNode];
}
}
});
}
});
if (newTables.length > 0) {
initializeTables(newTables);
}
});
// Start observing the entire document for changes
observer.observe(document.body, {
childList: true,
subtree: true
});
return observer;
}
document.addEventListener('DOMContentLoaded', function() {
// Process any existing tables
const existingTables = document.querySelectorAll(
'table.sortable-table:not(.dt-processed), ' +
'table.searchable-table:not(.dt-processed), ' +
'table.sortable-searchable-table:not(.dt-processed)'
);
if (existingTables.length > 0) {
initializeTables(existingTables);
}
setupTableObserver();
});
</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>