-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpeople.html
145 lines (131 loc) · 4.71 KB
/
people.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
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
139
140
141
142
143
144
145
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>People - Musée Thivierge</title>
<link rel="stylesheet" href="./w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
.person {
text-align: center;
padding: 15px; /* Reduced padding */
margin-bottom: 20px; /* Reduced margin-bottom */
flex-basis: 30%; /* Approx. one-third for three per row */
max-width: 30%;
box-sizing: border-box; /* Ensure padding is included in the total width */
}
.person img {
width: 100%;
height: 200px;
object-fit: cover;
max-width: 200px;
margin: 0 auto;
border-radius: 50%;
}
.person-name {
font-size: 1.2em;
font-weight: bold;
margin-top: 10px;
}
.person-bio {
text-align: justify;
margin-top: 10px;
}
.section-title {
font-size: 1.5em;
font-weight: bold;
margin-top: 30px;
margin-bottom: 20px;
}
/* Centered row layout */
.centered-row {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 15px; /* Reduced gap for better fit */
}
</style>
</head>
<body>
<!-- Navbar -->
<div class="w3-top">
<div class="w3-bar w3-white w3-wide w3-padding w3-card">
<a href="index.html" class="w3-bar-item w3-button"><b>MUSÉE</b> THIVIERGE</a>
<!-- Navbar links -->
<div class="w3-right w3-hide-small">
<a href="index.html" class="w3-bar-item w3-button">HOME</a>
<a href="about.html" class="w3-bar-item w3-button">ABOUT</a>
<a href="exhibits.html" class="w3-bar-item w3-button">EXHIBITS</a>
<a href="people.html" class="w3-bar-item w3-button">PEOPLE</a>
</div>
</div>
</div>
<!-- People Section -->
<div class="w3-content w3-container w3-padding-64">
<h3 class="w3-center">PEOPLE</h3>
<!-- Board of Trustees Section -->
<div>
<h4 class="section-title w3-center">Board of Trustees</h4>
<div id="board-of-trustees-container" class="centered-row"></div>
</div>
<!-- Curators Section -->
<div>
<h4 class="section-title w3-center">Curators</h4>
<div id="curators-container" class="centered-row"></div>
</div>
<!-- Communications Team Section -->
<div>
<h4 class="section-title w3-center">Communications Team</h4>
<div id="communications-team-container" class="centered-row"></div>
</div>
</div>
<script>
// Lists of people by team
const peopleSections = {
"board-of-trustees": ["Vincent", "Kelly"], // Replace with actual folder names
"curators": ["Tracey", "Elliott", "Anna"],
"communications-team": ["Sandy"]
};
// Function to load people data for a section
function loadPeople(section, containerId) {
const container = document.getElementById(containerId);
peopleSections[section].forEach(personFolder => {
const personDiv = document.createElement('div');
personDiv.classList.add('person');
// Fetch and display the image
const img = document.createElement('img');
img.src = `media/people/${section}/${personFolder}/image.jpeg`;
img.alt = `Image of ${personFolder}`;
personDiv.appendChild(img);
// Fetch and display the name
fetch(`media/people/${section}/${personFolder}/name.txt`)
.then(response => response.text())
.then(name => {
const nameElem = document.createElement('div');
nameElem.classList.add('person-name');
nameElem.textContent = name;
personDiv.appendChild(nameElem);
// Fetch and display the bio
fetch(`media/people/${section}/${personFolder}/bio.txt`)
.then(response => response.text())
.then(bio => {
const bioElem = document.createElement('p');
bioElem.classList.add('person-bio');
bioElem.textContent = bio;
personDiv.appendChild(bioElem);
})
.catch(error => console.error('Error loading bio:', error));
})
.catch(error => console.error('Error loading name:', error));
container.appendChild(personDiv);
});
}
// Load all people in each section
loadPeople("board-of-trustees", "board-of-trustees-container");
loadPeople("curators", "curators-container");
loadPeople("communications-team", "communications-team-container");
</script>
</body>
</html>