-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
31 lines (30 loc) · 922 Bytes
/
index.html
File metadata and controls
31 lines (30 loc) · 922 Bytes
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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Cardify</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://cdnjs.cloudflare.com/ajax/libs/mustache.js/2.3.0/mustache.min.js"></script>
</head>
<body onload="onLoad()">
<div id="container">
</div>
<script>
function onLoad(){
fetch('profile.json')
.then((resp) => resp.json())
.then(function(profilejson) {
const templateurl = profilejson.theme.name + "/template.html";
fetch(templateurl)
.then((resp) => resp.text())
.then(function(template) {
document.title = profilejson.basics.name;
profilejson.basics.picture_fullpath = profilejson.basics.profile;
const html = Mustache.render(template, profilejson);
document.getElementById("container").innerHTML = html;
});
});
}
</script>
</body>
</html>