-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
45 lines (40 loc) · 1.38 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
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="/static/css/bootstrap.min.css">
<script src="/static/js/jquery-3.5.1.min.js"></script>
<script src="/static/js/bootstrap.min.js"></script>
</head>
<body>
<div id="main" class="container d-flex flex-column justify-content-center vh-100 p-5">
<button type="button" disabled="disabled" class="btn btn-light my-1">
<h1>Flut-Test</h1>
</button>
</div>
</body>
<script>
async function setup() {
const result = await fetch(`/titles.json`);
result.json().then(
(Titles) => {
for (const title_data of Titles) {
console.log(title_data);
$('#main').append($(
`<a type="button" class="btn btn-primary my-1 d-flex flex-row align-items-center" href="/test.html?test=${title_data.link}">
<div class="bg-light rounded text-hide position-absolute">
<img src="/static/image/${title_data.image}" draggable="false"/>
</div>
<div class="d-flex justify-content-center container-fluid">
<h2>
${title_data.name}
</h2>
</div>
</a>`
));
}
}
);
}
setup();
</script>
</html>