-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
35 lines (31 loc) · 891 Bytes
/
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
<!doctype html>
<html>
<head>
<title>самизда́т</title>
<meta charset="utf-8"/>
</head>
<body>
<script>
url = window.location.href.replace('/index.html', '');
var link = document.createElement('link');
link.rel = 'stylesheet'
link.type = 'text/css';
link.href = url+'retro.css'
document.head.appendChild(link)
var script = document.createElement('script')
script.src = url+'marked.min.js'
document.head.appendChild(script)
fetch(url+'/index.md',{
headers : {
'Content-Type': 'text/html',
'Accept': 'text/html'
}
})
.then(response => response.text())
.then((data) => {
document.getElementById('content').innerHTML = marked(data);
})
</script>
<div id="content"></div>
</body>
</html>