-
Notifications
You must be signed in to change notification settings - Fork 17
/
users.html
194 lines (180 loc) · 6.43 KB
/
users.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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
<!doctype html>
<html dir="ltr" lang="en">
<head>
<meta charset="utf-8" />
<meta content="width=device-width, initial-scale=1" name="viewport" />
<meta content="summary" name="twitter:card" />
<meta
content="http://pslmodels.org/imgs/PolicySimLibrary-1000px.png"
name="twitter:image"
/>
<meta content="Catalog" name="twitter:title" />
<title>PSL</title>
<script
async=""
src="https://www.googletagmanager.com/gtag/js?id=UA-128365658-1"
></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag("js", new Date());
gtag("config", "UA-128365658-1");
</script>
<link
crossorigin="anonymous"
href="https://use.fontawesome.com/releases/v5.5.0/css/all.css"
integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU"
rel="stylesheet"
/>
<link
href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap"
rel="stylesheet"
/>
<link
crossorigin="anonymous"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"
integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO"
rel="stylesheet"
/>
<link
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"
rel="stylesheet"
/>
<link
rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
/>
<link
rel="stylesheet"
type="text/css"
href="https://cdn.jsdelivr.net/npm/[email protected]/slick/slick.css"
/>
<link
rel="stylesheet"
type="text/css"
href="https://cdn.jsdelivr.net/npm/[email protected]/slick/slick-theme.css"
/>
<link href="../CSS/catalog.css" rel="stylesheet" />
</head>
<body id="page">
<div id="navbar"></div>
<div class="banner">
<div class="banner-content">
<div class="banner-text">
<h1>PSL Users</h1>
<h5>
Policy Simulation Library powers comprehensive policy analysis for
researchers, governments, and organizations globally.
</h5>
</div>
<br />
<div class="banner-image"></div>
</div>
</div>
<div class="text-box">
<div class="box-header"></div>
<div class="box-content" style="text-align: center">
<i class="fas fa-landmark" style="font-size: 3em; color: #3498db"></i>
<br />
<h2>Government</h2>
<div class="separator"></div>
<br />
<div class="user-grid-container" id="users-grid-government"></div>
</div>
</div>
<div class="text-box">
<div class="box-header"></div>
<div class="box-content" style="text-align: center">
<i class="fas fa-brain" style="font-size: 3em; color: #3498db"></i>
<h2>Think Tanks</h2>
<div class="separator"></div>
<br />
<div class="user-grid-container" id="users-grid-think-tanks"></div>
</div>
</div>
<div class="text-box">
<div class="box-header"></div>
<div class="box-content" style="text-align: center">
<i
class="fas fa-graduation-cap"
style="font-size: 3em; color: #3498db"
></i>
<h2>Academic</h2>
<div class="separator"></div>
<br />
<div class="user-grid-container" id="users-grid-academic"></div>
</div>
</div>
<div class="text-box">
<div class="box-header"></div>
<div class="box-content" style="text-align: center">
<i class="fas fa-newspaper" style="font-size: 3em; color: #3498db"></i>
<h2>Journalism</h2>
<div class="separator"></div>
<br />
<div class="user-grid-container" id="users-grid-journalism"></div>
</div>
</div>
<div class="text-box">
<div class="box-header"></div>
<div class="box-content" style="text-align: center">
<i class="fas fa-building" style="font-size: 3em; color: #3498db"></i>
<h2>Other Private Sector and NGOs</h2>
<div class="separator"></div>
<br />
<div class="user-grid-container" id="users-grid-other"></div>
</div>
</div>
<div id="footer"></div>
<script>
function loadUsers(category, containerId) {
fetch('/layout/navbar.html')
.then(response => response.text())
.then(data => {
document.getElementById('navbar').innerHTML = data;
});
fetch('/layout/footer.html')
.then(response => response.text())
.then(data => {
document.getElementById('footer').innerHTML = data;
});
fetch("users.json")
.then((response) => response.json())
.then((data) => {
const container = document.getElementById(containerId);
if (data[category]) {
const sortedUsers = data[category].sort((a, b) =>
a.name.localeCompare(b.name),
);
sortedUsers.forEach(function (user) {
const item = document.createElement("div");
item.className = "user-grid-item";
item.innerHTML = `<a href="${user.link}"><img src="${user.image}" alt="${user.name}"><p>${user.name}</p></a>`;
container.appendChild(item);
});
} else {
console.error(`Category ${category} not found.`);
container.innerHTML = `<p>Category ${category} not found.</p>`;
}
})
.catch((error) => {
console.error("Error loading the users data:", error);
const container = document.getElementById(containerId);
container.innerHTML = "<p>Failed to load user data.</p>";
});
}
window.onload = function () {
loadUsers("government", "users-grid-government");
loadUsers("think-tanks", "users-grid-think-tanks");
loadUsers("academic", "users-grid-academic");
loadUsers("journalism", "users-grid-journalism");
loadUsers("other", "users-grid-other");
};
</script>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script>
</body>
</html>