-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
99 lines (87 loc) · 2.57 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
<html>
<head>
<link rel="manifest" href="manifest.json"/>
<style>
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
}
li {
float: left;
}
li a, .dropbtn {
display: inline-block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-family: Arial;
}
li a:hover, .dropdown:hover .dropbtn {
background-color: red;
}
li.dropdown {
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
}
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;
}
.dropdown-content a:hover {background-color: #f1f1f1;}
.dropdown:hover .dropdown-content {
display: block;
}
</style>
</head>
<body>
<div id="menu-bar">Loading...</div>
<script>
if ("serviceWorker" in navigator) {
//window.addEventListener("load", function() {
navigator.serviceWorker
.register("serviceWorker.js")
.then(res => console.log("service worker registered"))
.catch(err => console.log("service worker not registered", err))
//})
}
</script>
<script>
(async () => {
const response = await fetch("https://api.github.com/repos/Killercodes/crm/contents/docs");
const data = await response.json();
let htmlString = '';
for (let file of data)
{
var actualpath= "https://killercodes.github.io/crm/" + file.path;
var fileName = (file.path).replace(".md","");
htmlString += `<a href="${fileName}" target="IFcontent">${file.name}</a>`;
}
htmlString += '';
var result= '<ul><li><a href="/">Dynamics 365 CE</a></li><li class="dropdown"><a href="javascript:void(0)" class="dropbtn">Documents</a><div class="dropdown-content">';
result += htmlString;
result += '</div></li>'
result += '<li class="dropdown"><a class="dropbtn">Tools</a><div class="dropdown-content">';
result += '<a href="tool/guid" target="IFcontent">Get Record Guid</a>';
result += '<a href="tool/error/7.0" target="IFcontent">Error Code CRM 7.0</a>';
result += '<a href="tool/error/8.2" target="IFcontent">Error Code CRM 8.2</a>';
result += '</div></li></ul>';
document.getElementById('menu-bar').innerHTML = result;
})()
</script>
<iframe id="cont" name="IFcontent" src="" frameborder="0" style="width: 100%;height: 100%;"></iframe>
<body>
</html>