-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcert.html
More file actions
81 lines (68 loc) · 1.75 KB
/
Copy pathcert.html
File metadata and controls
81 lines (68 loc) · 1.75 KB
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
<html>
<head>
<title>Certificate</title>
<style>
body {
font-family: "Times New Roman", Times, serif;
line-height: 150%;
font-size: 18pt;
}
h1 {
font-family: "Arial", serif;
}
@media print and (width: 21cm) and (height: 29.7cm) {
@page {
margin: 3cm;
}
}
@media print and (width: 8.5in) and (height: 11in) {
@page {
margin: 1in;
}
}
@page {
size: A4 landscape;
margin: 10%;
}
</style>
<script>
function parseQuery(query) {
const based = atob(query);
if (!based) {
return false;
}
return JSON.parse(based);
}
function load() {
let query = window.location.search;
if (query) {
query = query.slice(1);
}
const params = parseQuery(query);
document.getElementById("cert-name").textContent = params.name;
document.getElementById("cert-number").textContent = params.id;
document.getElementById("cert-issued").textContent = params.issued;
document.getElementById("cert-score").textContent = params.score;
};
window.addEventListener("load", (event) => {
load();
})
</script>
</head>
<body>
<div>
<h1 style="text-align: center; padding-top: 20%;">
Certificate
</h1>
<div style="text-align: center;">
Hereby <span id="cert-name" style="font-weight: bold;"></span><br>
and <a href="https://certifiedmanagement.org">certifiedmanagement.org</a><br>
proudly confirm scoring <span id="cert-score" style="font-weight: bold;"></span>% (out of 100%)<br>
</div>
<div style="text-align: center; padding-bottom: 15%;">
Issued on <span id="cert-issued" style="font-weight: bold;"></span><br>
Certificate number: <span id="cert-number" style="font-weight: bold;"></span>
</div>
</div>
</body>
</html>