-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
79 lines (64 loc) · 1.69 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
<html>
<head>
<style>
body {
margin: 0;
}
ul {
list-style-type: none;
margin: 0;
padding: 0;
width: 15%;
background-color: #f1f1f1;
position: fixed;
height: 100%;
overflow: auto;
display: block;
}
li a {
display: block;
color: #000;
padding: 8px 10px;
text-decoration: none;
font-family: Arial;
}
li a.active {
background-color: #04AA6D;
color: white;
}
li a:hover:not(.active) {
background-color: #E9F118;
color: #494892;
}
.title {
background-color: #494892;
color: #E9F118;
}
</style>
</head>
<body>
<div id="menu-bar">Loading...</div>
<script>
(async () => {
const response = await fetch("https://api.github.com/repos/Killercodes/py/contents/docs/lang");
const data = await response.json();
let htmlString = '';
for (let file of data)
{
var actualpath= "https://killercodes.github.io/py/" + file.path;
var fileName = (file.path).replace(".md","");
//fileName = (fileName).replace("docs/","");
htmlString += `<li class="tablinks"><a href="${fileName}" target="IFcontent">${file.name.replace(".md","")}</a></li>`;
}
htmlString += '';
var result= '<ul class="tab"><li><a href="/py" class="title">Python</a></li>';
result += htmlString;
result += '</ul>';
document.getElementById('menu-bar').innerHTML = result;
})()
</script>
<div style="margin-left:15%;padding:1px 1px;height:1000px;">
<iframe id="cont" name="IFcontent" src="https://www.python.org/static/community_logos/python-logo-master-v3-TM.png" frameborder="0" style="width: 100%;height: 100%;"></iframe>
</div>
<body>
</html>