-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsummary.html
More file actions
58 lines (48 loc) · 1.29 KB
/
summary.html
File metadata and controls
58 lines (48 loc) · 1.29 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
<html>
<head>
<meta charset="utf-8">
<title>relocaliser summary</title>
<style>
* {
margin: 0;
padding: 0;
border: 0;
}
html {
background-color: black;
color: white;
overflow: hidden; /* prevent the scrollbar from hecking up our height calculation */
}
table {
font-family: "Noto Sans";
font-size: 35px;
padding: 50px;
}
td {
padding: 10px 15px;
}
</style>
</head>
<body>
<table id="target"></table>
<script>
const target = document.getElementById('target')
const ingestSteps = (steps) => {
target.innerHTML = ''
for (let step of steps) {
const row = document.createElement('tr')
const flagCell = document.createElement('td')
const flag = document.createElement('img')
flag.setAttribute('src', `flags/${step.flag}.svg`)
flagCell.appendChild(flag)
const phraseCell = document.createElement('td')
phraseCell.appendChild(document.createTextNode(step.phrase))
row.appendChild(flagCell)
row.appendChild(phraseCell)
target.appendChild(row)
}
return target.offsetHeight
}
</script>
</body>
</html>