This repository was archived by the owner on Mar 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathteam.html
More file actions
98 lines (83 loc) · 2.99 KB
/
team.html
File metadata and controls
98 lines (83 loc) · 2.99 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
<!doctype html>
<html lang="de">
<head>
<title>Team | UCA</title>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=chrome">
<link rel="shortcut icon" href="common/img/UCLogo_new.png" type="image/x-icon">
<link rel="stylesheet" href="common/css/master.css">
<link rel="stylesheet" href="common/css/font.css">
<script src="common/js/master.js" async></script>
</head>
<body>
<nav id="nav"></nav>
<video autoplay muted loop id="backgroundVideo">
<source src="common/img/UnicacityAddonWebsiteBackground.mp4" type="video/mp4">
</video>
<div class="team">
<p class="text-50-700">Team</p>
<div id="content"></div>
</div>
<div id="footer"></div>
</body>
</html>
<script>
async function fetchAndDisplayContent() {
try {
const response = await fetch('https://rettichlp.de:8443/unicacityaddon/v1/dhgpsklnag2354668ec1d905xcv34d9bdee4b877/player');
const json = await response.json();
const contentElement = document.getElementById("content");
const teams = [
{
name: 'CEO',
team: json.CEO,
class: 'ceo',
},
{
name: 'Developer',
team: json.DEV,
class: 'dev',
},
{
name: 'Moderatoren',
team: json.MOD,
class: 'mod',
},
{
name: 'Supporter',
team: json.SUP,
class: 'sup',
},
{
name: 'Beta-Tester',
team: json.BETA,
class: 'bet',
},
];
let html = '';
teams.forEach(teamEntry => {
const teamName = teamEntry.name;
const teamMembers = teamEntry.team;
const teamClass = teamEntry.class;
html += `<p class="text-40-400" style="text-align: center">${teamName}</p>`;
html += '<div class="team-group">';
teamMembers.forEach((teamMemberEntry) => {
const name = teamMemberEntry.name;
const uuid = teamMemberEntry.uuid;
html += `
<div class="team-group-entry ${teamClass}">
<img src="https://crafatar.com/avatars/${uuid}?size=130&overlay" alt="Skin of ${name}"><br>
<p class="text-25-300">${name}</p>
</div>
`;
});
html += '</div>';
});
contentElement.innerHTML = html;
} catch (error) {
console.error('Cannot fetch data:', error);
}
}
</script>