-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
420 lines (339 loc) · 16.5 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
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
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Docsify Open Course Starter Kit</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="Docsify Open Course Starter Kit">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="assets/favicon/favicon.png">
<!-- Themeable Simple theme -->
<link rel="stylesheet" href="assets/vendor/themeable/themes/theme-simple.css">
<!-- Themeable Simple light + dark theme (uncomment to use, and comment out the above loading of Simple theme) -->
<!-- <link rel="stylesheet" media="(prefers-color-scheme: light)" href="assets/vendor/themeable/themes/theme-simple.css"> -->
<!-- <link rel="stylesheet" media="(prefers-color-scheme: dark)"
href="assets/vendor/themeable/themes/theme-simple-dark.css"> -->
<link rel="stylesheet" href="assets/css/theme.css">
<link rel="stylesheet" href="assets/css/custom.css">
<!-- Font Awesome Stylesheets -->
<link rel="stylesheet" href="assets/vendor/fontawesome/css/fontawesome.css" />
<link rel="stylesheet" href="assets/vendor/fontawesome/css/brands.css" />
<link rel="stylesheet" href="assets/vendor/fontawesome/css/regular.css" />
<link rel="stylesheet" href="assets/vendor/fontawesome/css/solid.css" />
<style>
:root {
--base-font-family: "Source Sans Pro", "Helvetica Neue", Arial, sans-serif;
--base-line-height: 1.4;
--base-font-size: 1.125rem;
--cover-max-width: 45em;
--heading-h2-border-style: none;
--heading-h1-margin: 1rem 0rem -0.5rem 0rem;
--heading-h2-margin: 1rem 0rem -1.5rem 0rem;
--heading-h3-margin: 1rem 0rem -.5rem 0rem;
--heading-h4-margin: 1rem 0rem -.5rem 0rem;
--heading-h5-margin: 1rem 0rem -.5rem 0rem;
--heading-h6-margin: 1rem 0rem 0rem 0rem;
--heading-h1-font-size: 1.60rem;
--heading-h2-font-size: 1.40rem;
--heading-h3-font-size: 1.20rem;
--heading-h4-font-size: 1.15rem;
--heading-h5-font-size: 1.1rem;
--heading-h6-font-size: 1rem;
--heading-h1-font-weight: 400;
--heading-h2-font-weight: 400;
--heading-h3-font-weight: 400;
--heading-h4-font-weight: 400;
--heading-h5-font-weight: 400;
--heading-h6-font-weight: 400;
--link-color: #0374B5;
--link-text-decoration: underline;
--link-text-decoration--hover: underline;
--sidebar-name-color: #0374B5;
--sidebar-nav-link-color--active: #0374B5;
--sidebar-nav-link-border-color--active: #0374B5;
--sidebar-nav-link-font-weight--active: bold;
--sidebar-nav-pagelink-background--active:
no-repeat 0px center / 5px 6px
linear-gradient(225deg, transparent 2.75px, #0374B5 2.75px 4.25px, transparent 4.25px),
no-repeat 5px center / 5px 6px
linear-gradient(135deg, transparent 2.75px, #0374B5 2.75px 4.25px, transparent 4.25px);
--sidebar-nav-pagelink-background--collapse:
no-repeat 2px calc(50% - 2.5px) / 6px 5px
linear-gradient(45deg, transparent 2.75px, #0374B5 2.75px 4.25px, transparent 4px),
no-repeat 2px calc(50% + 2.5px) / 6px 5px
linear-gradient(135deg, transparent 2.75px, #0374B5 2.75px 4.25px, transparent 4px);
--sidebar-nav-pagelink-background--loaded:
no-repeat 0px center / 5px 6px
linear-gradient(225deg, transparent 2.75px, #0374B5 2.75px 4.25px, transparent 4.25px),
no-repeat 5px center / 5px 6px
linear-gradient(135deg, transparent 2.75px, #0374B5 2.75px 4.25px, transparent 4.25px);
--navbar-root-margin: 0 0 0 .8em;
--navbar-root-color--active: #0374B5;
--blockquote-border-color: #0374B5;
--pagination-title-color: #0374B5;
--docsifytabs-tab-color: var(--base-color);
}
</style>
</head>
<body>
<div id="app"></div>
<script>
// Enter the URL of your own GitHub Repository in between the two quotes below
var gitLinkRepoURL = '';
// Customize the text for your Edit this Page on GitHub link between the two quotes below
var editThisPageLinkText = 'Edit this Page';
// Set standalone to true to permanently hide the Sidebar and Navbar
var standalone = false;
// Set ToC to true to permanently show page Table of Contents (Sidebar and Navbar must also be hidden)
var ToC = false;
// Set navbar to true to permanently override the hiding of the Navbar when displaying as standalone
var navbar = false;
// Set footer to true to permanently show the Footer ('_footer.md)
var footer = false;
// Get value from GET-parameter in URL
// @param {array} name Parameter-name
// @param {*} isTrue Return if found
// @param {*} isFalse Return if not found
// @returns {string|null} Parameter-value
function getURLParameterByName(name, isTrue = null, isFalse = null, url = window.location.href) {
let exists = false;
if (Array.isArray(name)) {
name.forEach(element => {
if (getURLParameterByName(element)) {
exists = true;
}
});
} else {
name = name.toLowerCase().replace(/[\[\]]/g, '\\$&');
var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)');
var results = regex.exec(url.toLowerCase());
exists = (results && results[2]) ? true : false;
}
if (exists && isTrue) {
return isTrue;
}
if (!exists && isFalse) {
return isFalse;
}
return exists;
}
// Docsify
window.$docsify = {
// GENERAL SETTINGS
// -----------------------------------------------------------------
name: 'Docsify Open Course Starter Kit',
homepage: 'home.md',
loadSidebar: !(getURLParameterByName(['standalone', 'embedded']) || standalone || false),
loadNavbar: !(getURLParameterByName(['standalone', 'embedded']) && !(getURLParameterByName('navbar')) || standalone && !navbar ||false),
externalLinkTarget: standalone ? '_top' : (getURLParameterByName(['standalone', 'embedded'], '_top', '_blank')),
executeScript: true,
loadFooter: (getURLParameterByName('footer') || footer || false),
// SIDEBAR NAVIGATION
// -----------------------------------------------------------------
auto2top: true,
maxLevel: 3,
// Set subMaxLevel to 0 to remove automatic display of page table of contents (TOC) in Sidebar
subMaxLevel: 3,
hideSidebar: (getURLParameterByName(['standalone', 'embedded']) || standalone),
// PLUGIN SETTINGS
// -----------------------------------------------------------------
pagination: {
previousText: 'PREV',
nextText: 'NEXT',
crossChapter: false,
crossChapterText: false,
},
toc: {
scope: '.markdown-section',
headings: 'h2,h3',
title: '',
},
// CUSTOM PLUGINS
// -----------------------------------------------------------------
plugins: [
function (hook, vm) {
hook.afterEach(function (html, next) {
// Invoked each time after the Markdown file is parsed.
// beforeEach and afterEach support asynchronous。
// ...
// call `next(html)` when task is done.
var htmlElement = document.createElement('div');
htmlElement.innerHTML = html;
if (getURLParameterByName(['standalone', 'embedded']) || standalone) {
// Carry any existing URL parms in links
var URLparms = '';
if (getURLParameterByName('standalone') || standalone) {
URLparms = `?standalone=true`;
}
if (getURLParameterByName('embedded')) {
URLparms = `?embedded=true`;
}
if (getURLParameterByName('hidegitlink')) {
URLparms = URLparms + `&hidegitlink=true`;
}
if (getURLParameterByName('navbar') || navbar) {
URLparms = URLparms + `&navbar=true`;
}
if (getURLParameterByName('toc') || ToC) {
URLparms = URLparms + `&toc=true`;
}
if (getURLParameterByName('footer') || footer) {
URLparms = URLparms + `&footer=true`;
}
const links = Array.from(htmlElement.querySelectorAll('a'))
for (const link of links) {
//console.log(link.getAttribute('href'));
// Find any local Markdown file links not including Docsify id anchor links
if ((link.getAttribute('href')?.match(/^#/) && (link.getAttribute('href').includes('id=')) === false)) {
// Modify each Markdown file link to include existing parms
var existingLink = link.getAttribute('href');
//console.log(existingLink);
// Update Markdown file link
var newURL = existingLink + URLparms;
//console.log("Changed:");
//console.log(newURL);
link.setAttribute('href', newURL);
//console.log(link.getAttribute('href'));
}
}
}
/* JS to change Embedly cards to light or dark theme based on system setting when using the light + dark theme (uncomment to use) */
/*
const embeds = Array.from(htmlElement.querySelectorAll('.embedly-card'))
if (!(embeds.length === 0)) {
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
// dark mode
// console.log("dark");
embeds.forEach(embed => {
embed.setAttribute('data-card-theme', 'dark');
});
} else {
// light mode
// console.log("light");
embeds.forEach(embed => {
embed.setAttribute('data-card-theme', 'light');
});
}
window.matchMedia('(prefers-color-scheme: dark)').addListener(function (e) {
// console.log(`changed to ${e.matches ? "dark" : "light"} mode`);
// console.log(e.matches);
document.location.reload();
});
}
*/
next(htmlElement.innerHTML);
});
hook.beforeEach(function (html) {
if (/githubusercontent\.com/.test(vm.route.file)) {
url = vm.route.file
.replace('raw.githubusercontent.com', 'github.com')
.replace(/\/master/, '/blob/master')
} else {
url = gitLinkRepoURL + '/blob/main/docs/' + vm.route.file
}
var editHtml = '[:memo:' + editThisPageLinkText + '](' + url + ' ":class=align-items-vertically")\n'
if ((!(getURLParameterByName('hidegitlink'))) && (!!gitLinkRepoURL)) {
return html + '<br />' + '\n\n' + editHtml
} else {
return html
}
});
// Invoked on each page load after new HTML has been appended to the DOM
hook.doneEach(function () {
var hasEmbedly = document.getElementsByClassName('embedly-card');
if (hasEmbedly.length > 0) {
// console.log("Load Embedly");
// elements with class "embedly-card" exist
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'https://cdn.embedly.com/widgets/platform.js';
document.head.appendChild(script);
}
// Remove optional ToC area if full width header image is present
var hasImageHeader = document.getElementsByClassName('header-image-full-width');
if (hasImageHeader.length > 0) {
// console.log("header-image");
const elements = document.getElementsByClassName("nav");
while (elements.length > 0) elements[0].remove();
}
// Adjust left margin for optional ToC area if faded header image is present
var hasImageFade = document.getElementsByClassName('header-image-fade');
var hasNav = document.getElementsByClassName('nav');
if (hasImageFade.length > 0 && hasNav.length > 0) {
var editCSS = document.createElement('style')
editCSS.innerHTML = ".markdown-section {margin-right: 0px;}";
document.body.appendChild(editCSS);
}
// Update all iframes with source domains 'youtube.com', 'youtube-nocookie.com', 'docs.google.com' or 'onedrive.live.com' to include the default responsive CSS Markdown class `video-container-16by9`
const allIframes = Array.from(document.querySelectorAll('iframe[src*="youtube.com"], iframe[src*="youtube-nocookie.com"], iframe[src*="docs.google.com"], iframe[src*="onedrive.live.com"]'));
// Filter out iframes that are not already wrapped with a div including the classes 'video-container-16by9' and 'video-container-4by3'
const targetIframes = allIframes.filter(function(iframe) {
const parentDiv = iframe.parentNode;
return !parentDiv.matches('.video-container-16by9, .video-container-4by3');
});
// Wrap each target iframe with a div element
targetIframes.forEach(function(iframe) {
const wrapperDiv = document.createElement('div');
wrapperDiv.classList.add('video-container-16by9');
// Preserve existing classes on the iframe
iframe.classList.forEach(function(className) {
wrapperDiv.classList.add(className);
});
// Replace the iframe with the wrapper div
iframe.parentNode.replaceChild(wrapperDiv, iframe);
wrapperDiv.appendChild(iframe);
});
});
}
]
}
</script>
<!-- https://www.jsdelivr.com/package/npm/docsify/ -->
<script src="assets/vendor/docsify/docsify.min.js"></script>
<!-- Adjust Page Margins When Standalone or Embedded -->
<script>
if (getURLParameterByName(['standalone', 'embedded']) || standalone) {
var editCSS = document.createElement('style')
editCSS.innerHTML = ".markdown-section {padding: 1rem 14px;}";
document.body.appendChild(editCSS);
}
</script>
<!-- Customizable Theme -->
<!-- https://www.jsdelivr.com/package/npm/docsify-themeable/ -->
<script src="assets/vendor/themeable/docsify-themeable.min.js"></script>
<!-- Search Box Plugin -->
<!-- <script src="assets/vendor/docsify/plugins/custom/search.min.js"></script> -->
<!-- Font Awesome Plugin -->
<!-- https://unpkg.com/docsify-fontawesome/ -->
<script src="assets/vendor/docsify/plugins/docsify-fontawesome.min.js"></script>
<!-- Tabs Plugin -->
<!-- https://cdn.jsdelivr.net/npm/docsify-tabs@1/dist/docsify-tabs.min.js -->
<script src="assets/vendor/docsify/plugins/docsify-tabs.min.js"></script>
<!-- Run External Scripts Plugin -->
<!-- https://cdn.jsdelivr.net/npm/docsify@4/lib/plugins/external-script.min.js -->
<script src="assets/vendor/docsify/plugins/external-script.min.js"></script>
<!-- Footnotes Plugin -->
<script src="assets/vendor/docsify/plugins/docsify-footnotes.min.js"></script>
<!-- Docsify Footer Plugin -->
<script src="assets/vendor/docsify/plugins/custom/docsify-footer.min.js"></script>
<!-- Pagination Plugin -->
<script src="assets/vendor/docsify/plugins/docsify-pagination.min.js"></script>
<!-- Docsify Browser-level Image Lazy Loading Plugin -->
<script src="assets/vendor/docsify/plugins/docsify-loading.min.js"></script>
<!-- Table of Contents Plugin -->
<script>
if (getURLParameterByName('toc') || ToC) {
document.write('<link rel="stylesheet" type="text/css" href="assets/css/toc.css" />');
document.write('<script src="assets/vendor/docsify/plugins/custom/toc.js"><\/script>');
}
</script>
<!-- Additional Languages for Prismjs -->
<script src="assets/vendor/prismjs/prism-bash.min.js"></script>
<script src="assets/vendor/prismjs/prism-go.min.js"></script>
<script src="assets/vendor/prismjs/prism-java.min.js"></script>
<script src="assets/vendor/prismjs/prism-kotlin.min.js"></script>
<script src="assets/vendor/prismjs/prism-php.min.js"></script>
<script src="assets/vendor/prismjs/prism-python.min.js"></script>
<script src="assets/vendor/prismjs/prism-swift.min.js"></script>
</body>
</html>