forked from v8/tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
98 lines (96 loc) · 2.16 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
<!DOCTYPE html>
<!-- Copyright 2020 the V8 project authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="icon" href="favicon.ico">
<title>V8 Tools Page</title>
<style>
body {
font-family: sans-serif;
color: white;
margin-left: 5%;
margin-right: 5%;
background-color: #000000;
text-align: center;
}
dl a {
background-color: #BB86FC;
color: black;
padding: 15px 25px;
text-decoration: none;
display: inline-block;
border-radius: 2px;
}
dl a:hover, a:active {
background-color: white;
color:black;
}
dl div {
display: inline-block;
text-align: center;
padding: 10px 25px 10px 25px ;
margin: 5px;
transition: background-color 0.5s;
background-color: #121212;
border-radius: 10px;
}
dl div.head {
width: calc(100% - 60px);
}
dl div:hover {
background-color: #222;
}
dd {
padding: 15px 0 0 0;
margin: 0;
}
dt {
padding: 15px 0 0 0;
margin: 0;
}
</style>
</head>
<body>
<h1>Welcome to the V8 Tools Version Page</h1>
<dl id="container">
<div class="head">
<dt><a href="./head">HEAD</a></dt>
<dd>The latest version of V8 tools.</dd>
</div>
</dl>
<footer>
<p>
The sources of this page live on <a href="https://github.com/v8/tools">github</a>.
</p>
</footer>
</body>
<script>
fetch('versions.txt')
.then(response => response.text())
.then(data => addVersionLinks(data));
function addVersionLinks(versions) {
let container = document.querySelector("#container");
versions
.trimEnd()
.split("\n")
.reverse()
.forEach(version => {
let versionNumber = version.substring(1);
let div = document.createElement("div");
let dt = document.createElement("dt");
let a = document.createElement('a');
a.href = version;
a.innerText = versionNumber;
dt.appendChild(a);
div.appendChild(dt);
let dd = document.createElement('dd');
dd.innerText = `Tools for version ${versionNumber}.`;
div.appendChild(dd);
container.appendChild(div);
});
}
</script>
</html>