This repository has been archived by the owner on Jan 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
382 lines (330 loc) · 12.8 KB
/
index.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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Maria Jose Basgall</title>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" rel="stylesheet">
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ekko-lightbox/5.3.0/ekko-lightbox.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/showdown.min.js"></script>
<script src="https://apis.google.com/js/api.js"></script>
<style>
html {
scroll-behavior: smooth;
}
body {
display: flex;
flex-direction: column;
min-height: 100%;
}
main {
flex: 1;
}
.container {
padding-bottom: 10px;
padding-top: 10px;
}
.navbar-fixed {
position: fixed;
top: 0;
width: 100%;
z-index: 1000;
}
.navbar-fixed + main {
margin-top: 56px; /* Adjust the value based on the navbar height */
}
section {
padding-bottom: 10px;
padding-top: 10px;
}
/* Styling for the thumbnails */
.thumbnail-container {
position: relative;
width: 100%;
height: 0;
padding-bottom: 100%; /* Set a fixed aspect ratio for the thumbnails (1:1 in this example) */
}
.thumbnail {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover; /* Crop the images to fit the thumbnail size while preserving aspect ratio */
border: 2px solid #ccc;
padding: 5px;
}
.modal-dialog {
max-width: 800px;
margin: 1.75rem auto;
}
.carousel-inner .d-block {
object-fit: contain;
max-width: 100%;
max-height: 100%;
width: auto !important;
height: auto !important;
}
/* Styling for the modal carousel */
.carousel-item img {
max-width: 100%;
max-height: 100%;
width: auto;
height: auto;
object-fit: contain !important; /* Ensure the entire image is visible within the container */
}
.repository {
margin-bottom: 20px;
}
.repository-description {
margin-bottom: 10px;
}
.repository-meta {
margin-top: 10px;
margin-bottom: 10px;
}
/* Media Queries */
@media (max-width: 767px) {
/* Decrease the font size for better readability on small screens */
body {
font-size: 14px;
}
/* Hide long URLs in navigation menu on small screens */
.navbar-nav .nav-link {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* Adjust the image size based on screen width */
.responsive-image {
max-width: 100%;
height: auto;
}
/* Hide or adjust background images for small screens */
.hero-section {
background-image: none; /* Remove the background image */
}
.feature-section {
background-position: center; /* Adjust the background image position */
}
}
@media (min-width: 768px) {
.responsive-image {
width: 100%;
height: auto;
}
}
@media (pointer: coarse) {
/* Increase the button size for touch devices */
button {
padding: 12px 24px;
font-size: 16px;
}
}
</style>
<script>
$(document).ready(function () {
var navbar = $("#navbar");
var navbarOffsetTop = navbar.offset().top;
$(window).scroll(function () {
if ($(window).scrollTop() >= navbarOffsetTop) {
navbar.addClass("navbar-fixed");
} else {
navbar.removeClass("navbar-fixed");
}
});
});
</script>
</head>
<body data-offset="50" data-spy="scroll" data-target="#navbar">
<nav class="navbar navbar-expand-lg navbar-dark bg-dark" id="navbar">
<a class="navbar-brand" href="#">María José Basgall</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarMenu" aria-controls="navbarMenu" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarMenu">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link active" href="#">About</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#projects">Projects</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#papers">Papers</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#gallery">Photo gallery</a>
</li>
<li class="nav-item">
<a class="nav-link" href="cv/BASGALL_CV.pdf">CV</a>
</li>
<li class="nav-item">
<a class="nav-link" id="email-link">
<i class="fas fa-envelope"></i>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://www.linkedin.com/in/mjbasgall/e">
<i class="fab fa-linkedin-in"></i>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://www.github.com/majobasgall">
<i class="fab fa-github"></i>
</a>
</li>
</ul>
</div>
</nav>
<main class="bg-light">
<div class="container">
<section id="about">
<!-- About section content will be loaded dynamically -->
</section>
</div>
<div class="container">
<section id="projects">
<!-- Projects section content will be loaded dynamically -->
</section>
</div>
<div class="container">
<section id="papers">
<!-- Papers section content will be loaded dynamically -->
</section>
</div>
<div class="container">
<section id="gallery">
<!-- Gallery section content will be loaded dynamically -->
</section>
</div>
</main>
<footer class="bg-dark text-light">
<div class="container py-4">
<div class="row justify-content-center">
<div class="col-md-6 text-center">
<p>2023 María José Basgall</p>
</div>
</div>
</div>
</footer>
<script>
function getReadme(user, repo, readmeContentElement) {
var readmeUrl = `https://api.github.com/repos/${user}/${repo}/readme`;
fetch(readmeUrl)
.then(response => response.json())
.then(data => {
var downloadUrl = data.download_url;
fetch(downloadUrl)
.then(response => response.text())
.then(readmeContent => {
var converter = new showdown.Converter();
var htmlContent = converter.makeHtml(readmeContent);
readmeContentElement.innerHTML = `
<details>
<summary>Show README</summary>
<div class="readme">${htmlContent}</div>
</details>
`;
})
.catch(error => {
console.log(`Error fetching README content for repository "${repo}":`, error);
});
})
.catch(error => {
console.log(`Error fetching README metadata for repository "${repo}":`, error);
});
}
// GitHub username
var username = "majobasgall";
// Personal access token
//var accessToken = "";
// GitHub API endpoint for retrieving repositories
var apiUrl = "https://api.github.com/users/" + username + "/repos";
//var apiUrl = "https://api.github.com/users/" + username + "/repos?access_token=YOUR_ACCESS_TOKEN";
// Function to fetch and display repositories
function fetchRepositories() {
//fetch(apiUrl, {
// headers: {
// Authorization: "Bearer " + accessToken,
// },
//})
fetch(apiUrl)
.then(response => response.json())
.then(data => {
if (Array.isArray(data)) {
// Sort repositories by their stargazer count in descending order
var sortedRepos = data.sort((a, b) => b.stargazers_count - a.stargazers_count);
var projectsList = document.getElementById("projects-list");
// Display repositories
var projectsList = document.getElementById("projects-list");
sortedRepos.forEach(repo => {
var repoItem = document.createElement("div");
repoItem.innerHTML = `
<div class="repository">
<h3>
<a href="${repo.html_url}" target="_blank">${repo.name}</a>
</h3>
<p class="repository-description">${repo.description}</p>
<div class="repository-meta">
<span class="mr-3">
<i class="far fa-star"></i> ${repo.stargazers_count}
</span>
<span class="mr-3">
<i class="far fa-eye"></i> ${repo.watchers_count}
</span>
<span class="mr-3">
<i class="far fa-code-branch"></i> ${repo.forks_count}
</span>
</div>
<div id="${repo.name}-readme"></div>
</div>
`;
projectsList.appendChild(repoItem);
var readmeContentElement = document.getElementById(`${repo.name}-readme`);
getReadme(username, repo.name, readmeContentElement);
});
} else {
console.log("Error: Invalid data format.");
}
})
.catch(error => {
console.log("Error fetching repositories:", error);
});
}
$(document).ready(function () {
// Load the About section content
$('#about').load('about.html');
// Load the Projects section content
$('#projects').load('projects.html', function() {
fetchRepositories();
});
// Load the Papers section content
$('#papers').load('papers.html');
// Load the Gallery section content
$('#gallery').load('gallery.html');
// Initialize scrollspy with options
$('body').scrollspy({
target: '#navbar',
offset: 50
});
});
// Function to obfuscate the email address
function generateEmail() {
var user = "majo.basgall";
var domain = "gmail.com";
return user + "@" + domain;
}
var emailElement = document.getElementById("email-link");
emailElement.addEventListener("click", function () {
var emailAddress = generateEmail();
var emailLink = document.createElement("a");
emailLink.href = "mailto:" + emailAddress;
emailLink.textContent = emailAddress;
emailElement.parentNode.replaceChild(emailLink, emailElement);
});
</script>
</body>
</html>