Repository navigation
Expand file tree
/
Copy pathinfo.html
More file actions
138 lines (117 loc) · 3.21 KB
/
Copy pathinfo.html
File metadata and controls
138 lines (117 loc) · 3.21 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Our Team - Voluntracks</title>
<style>
/* Simple CSS to style the page and team members */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f4f4f4;
text-align: center;
}
h1 {
background-color: #4CAF50;
color: white;
padding: 15px 0;
}
.team-container {
display: flex;
justify-content: center;
flex-wrap: wrap;
margin-top: 20px;
}
.team-card {
background-color: white;
border: 1px solid #ddd;
border-radius: 10px;
width: 200px;
margin: 10px;
padding: 15px;
text-align: center;
}
.team-photo {
width: 100%;
height: 150px;
object-fit: cover;
border-radius: 5px;
}
.team-name {
font-weight: bold;
margin: 10px 0;
}
.team-role {
color: #555;
}
</style>
</head>
<body>
<!-- Title of the Page -->
<h1>Meet Our Team</h1>
<!-- Container where team members will appear -->
<div id="team-container" class="team-container"></div>
<!-- Script to generate team members dynamically -->
<script>
// Array with the team's information
const teamMembers = [
{
name: "Leo",
role: "",
photo: "",
description: ""
},
{
name: "FeiYang",
role: "",
photo: "",
description: ""
},
{
name: "Alan",
role: "",
photo: "",
description: ""
}
];
// Function to display the team members
function showTeam() {
const container = document.getElementById('team-container'); // Get the container element
// Loop through each member and create a card
for (let i = 0; i < teamMembers.length; i++) {
const member = teamMembers[i]; // Get the current member
// Create a div for the member card
const card = document.createElement('div');
card.className = 'team-card';
// Create an image element for the photo
const photo = document.createElement('img');
photo.src = member.photo;
photo.alt = member.name + "'s photo";
photo.className = 'team-photo';
// Create a paragraph for the name
const name = document.createElement('p');
name.className = 'team-name';
name.textContent = member.name;
// Create a paragraph for the role
const role = document.createElement('p');
role.className = 'team-role';
role.textContent = member.role;
// Create a paragraph for the description
const description = document.createElement('p');
description.textContent = member.description;
// Add the photo, name, role, and description to the card
card.appendChild(photo);
card.appendChild(name);
card.appendChild(role);
card.appendChild(description);
// Add the card to the container
container.appendChild(card);
}
}
// Call the function to display the team when the page loads
showTeam();
</script>
</body>
</html>