-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
48 lines (47 loc) · 1.37 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
<!DOCTYPE html>
<html>
<head>
<title>CORE CDN</title>
<script src="https://unpkg.com/markdown-it/dist/markdown-it.min.js"></script>
<style>
html {
background-color: #323232;
color: #e0e0e0;
padding: 1rem;
}
a {
color: #a9b4ed;
}
a:visited {
color: #c8a9ed;
}
code.language-url {
font-size: 1.5rem;
padding: 0.3rem;
user-select: all;
-moz-user-select: all;
-webkit-user-select: all;
background-color: rgb(116 116 116 / 50%);
}
</style>
</head>
<body>
<div id="content"></div>
<script>
var md = window.markdownit();
fetch('https://github.com/bchainhub/corecdn/master/README.md')
.then(function(response) {
if (response.ok) {
return response.text();
} else {
return Promise.reject(response);
}
}).then(function(data) {
var htmlContent = md.render(data);
document.getElementById('content').innerHTML = htmlContent;
}).catch(function(err) {
document.getElementById('content').innerHTML = '<h2>Failed to load the documentation!</h2>';
});
</script>
</body>
</html>