-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathindex.html
More file actions
59 lines (53 loc) · 1.96 KB
/
Copy pathindex.html
File metadata and controls
59 lines (53 loc) · 1.96 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>JPE Replicator Team</title>
<style>
body { font-family: sans-serif; padding: 2rem; background: #f9f9f9; }
h1 { color: #333; }
.card { background: white; border-radius: 10px; padding: 1rem; margin: 1rem 0; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.emoji { font-size: 2rem; }
</style>
</head>
<body>
<img src="images/logo.jpg" alt="Main Logo" style="max-width: 200px; height: auto; display: block; margin-bottom: 1rem;" />
<h1>JPE Replicator Team</h1>
<div id="cards"></div>
<script>
async function loadProfiles() {
try {
const resList = await fetch('_data/users.json');
if (!resList.ok) throw new Error('Could not load users.json');
const files = await resList.json();
const container = document.getElementById('cards');
for (let file of files) {
try {
const res = await fetch('_data/' + file);
if (!res.ok) throw new Error(`Could not load ${file}`);
const data = await res.json();
const card = document.createElement('div');
card.className = 'card';
const username = file.replace('.json', '');
card.innerHTML = `
<img src="https://github.com/${username}.png" alt="${username} avatar" width="64" height="64" style="border-radius: 50%;"/>
<div class="emoji">${data.emoji}</div>
<p><strong>${file.replace('.json', '')}</strong></p>
<p>${data.introduction}</p>
<p><em>${data.computing}</em></p>
<p>${data.institution}</p>
`;
container.appendChild(card);
} catch(e) {
console.warn(e.message);
}
}
} catch(e) {
console.error('Failed to load profiles:', e);
}
}
loadProfiles();
</script>
</body>
</html>