-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsinger.html
More file actions
98 lines (92 loc) · 2.04 KB
/
singer.html
File metadata and controls
98 lines (92 loc) · 2.04 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<html>
<head>
<title>UF Best Signer Score board</title>
<style type="text/css">
body{
}
div.placeholder{
}
div.container{
align-items: center;
}
div.singer{
align: center;
max-width: 300px;
width: auto;
height: auto;
padding: 15px;
margin: 15px;
float: left;
align-items: center;
justify-content: center;
border: 1px solid black;
}
div.singer img{
max-width: 300px;
}
</style>
</head>
<body>
<h1 id="title" align="center">2019 CSA Best Singer Score Board</h1>
<div class="container">
<script>
function generateSingerBlock() {
var nameList = [{
name: '向一开',
score: 50
}, {
name: '吕兆华',
score: 60
}, {
name: '唐逸飞',
score: 80
}, {
name: '姜雯楠',
score: 90
}, {
name: '孙嘉韵',
score: 90
}, {
name: '张逸仙',
score: 90
}, {
name: '戚稚芸',
score: 90
}, {
name: '朱晨',
score: 90
}, {
name: '李思明',
score: 90
}, {
name: '杨长江',
score: 90
}, {
name: '陈涵之',
score: 90
}, {
name: '黄世源',
score: 90
}, {
name: '曹珂',
score: 90
}, {
name: '蔡文璇',
score: 90
}];
nameList.sort((a, b) => b.score - a.score)
var singerBlocks = "";
var block = "<div class=\"singer\"><img src=\"img/temp.png\" width=\"250\"/><h2>Name: </h2><h2>Score: </h2></div>";
// for (var i = 0; i < 14; i++) {
// singerBlocks += block;
// }
for(let i = 0; i < nameList.length; i++) {
singerBlocks += `<div class=\"singer\"><img src=\"img/${nameList[i].name}.png\" width=\"150\" /><h2>Name: ${nameList[i].name}</h2><h2>Score: ${nameList[i].score}</h2></div>`;
}
document.write(singerBlocks);
}
generateSingerBlock();
</script>
</div>
</body>
</html>