-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathabout.html
More file actions
485 lines (464 loc) · 19.2 KB
/
Copy pathabout.html
File metadata and controls
485 lines (464 loc) · 19.2 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
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
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
<!DOCTYPE html>
<html lang="en" id="html-root">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta
name="description"
content="About Mohammad Ashfaq Ur Rahman, Trying to build something at Neumentora. Academic background, skills, work experience, and more."
/>
<title>About | Academic Profile</title>
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&display=swap"
rel="stylesheet"
/>
<link rel="stylesheet" href="styles/animations.css" />
<script src="https://cdn.tailwindcss.com?plugins=typography,forms"></script>
<script src="https://unpkg.com/lucide@latest/dist/umd/lucide.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
<script>
tailwind.config = {
darkMode: "class",
theme: {
extend: {
fontFamily: {
sans: ["Inter", "system-ui", "sans-serif"],
},
// Extending typography to customize prose styles
typography: ({ theme }) => ({
custom: {
css: {
"--tw-prose-body": theme("colors.slate[600]"),
"--tw-prose-headings": theme("colors.slate[800]"),
"--tw-prose-links": theme("colors.teal[600]"),
"--tw-prose-bold": theme("colors.slate[800]"),
"--tw-prose-bullets": theme("colors.slate[400]"),
"--tw-prose-hr": theme("colors.slate[200]"),
"--tw-prose-quotes": theme("colors.slate[800]"),
"--tw-prose-quote-borders": theme("colors.teal[300]"),
"--tw-prose-invert-body": theme("colors.slate[300]"),
"--tw-prose-invert-headings": theme("colors.slate[100]"),
"--tw-prose-invert-links": theme("colors.teal[400]"),
"--tw-prose-invert-bold": theme("colors.slate[100]"),
"--tw-prose-invert-bullets": theme("colors.slate[600]"),
"--tw-prose-invert-hr": theme("colors.slate[700]"),
"--tw-prose-invert-quotes": theme("colors.slate[100]"),
"--tw-prose-invert-quote-borders": theme("colors.teal[700]"),
},
},
}),
keyframes: {
slideUp: {
"0%": { transform: "translateY(10px)", opacity: "0" },
"100%": { transform: "translateY(0)", opacity: "1" },
},
fadeIn: {
"0%": { opacity: "0" },
"100%": { opacity: "1" },
},
},
animation: {
slideUp: "slideUp 0.5s ease-out forwards",
fadeIn: "fadeIn 0.5s ease-out forwards",
},
},
},
};
</script>
</head>
<body
class="font-sans bg-slate-50 text-slate-700 dark:bg-slate-900 dark:text-slate-300 min-h-screen flex flex-col transition-colors duration-300"
>
<div id="header-partial"></div>
<main
class="flex-1 w-full max-w-6xl mx-auto px-4 pb-10 flex flex-col lg:flex-row gap-12 pt-28"
>
<aside class="w-full lg:w-80 flex-shrink-0 lg:sticky lg:top-24 h-fit">
<div
class="rounded-2xl bg-white/50 dark:bg-slate-800/50 backdrop-blur-lg shadow-lg border border-slate-200 dark:border-slate-700 p-6 flex flex-col items-center text-center gap-4"
>
<div
class="p-1 rounded-full bg-gradient-to-tr from-teal-400 to-cyan-400 mb-2"
>
<img
src="assets/images/profile.png"
alt="Profile photo of Mohammad Ashfaq Ur Rahman"
class="w-32 h-32 rounded-full border-4 border-white dark:border-slate-800 shadow-md object-cover"
/>
</div>
<h1 class="text-2xl font-bold text-teal-600 dark:text-teal-300">
Mohammad Ashfaq Ur Rahman
</h1>
<p class="text-sm text-slate-500 dark:text-slate-400 -mt-2">
Trying to build something at Neumentora.
</p>
<p class="text-sm text-slate-400 dark:text-slate-500 italic">
"Keep Swimming" 🐬
</p>
<div class="flex flex-wrap justify-center gap-x-4 gap-y-2 pt-2">
<a
href="mailto:imashfaqfardin@gmail.com"
class="flex items-center gap-2 text-slate-600 dark:text-slate-300 hover:text-teal-500 dark:hover:text-teal-300 text-sm transition-colors"
>
<i data-lucide="mail" class="w-4 h-4"></i>Email
</a>
<a
href="https://github.com/ashfaqfardin"
target="_blank"
rel="noopener"
class="flex items-center gap-2 text-slate-600 dark:text-slate-300 hover:text-teal-500 dark:hover:text-teal-300 text-sm transition-colors"
>
<i data-lucide="github" class="w-4 h-4"></i>GitHub
</a>
<a
href="https://linkedin.com/in/ashfaqfardin"
target="_blank"
rel="noopener"
class="flex items-center gap-2 text-slate-600 dark:text-slate-300 hover:text-teal-500 dark:hover:text-teal-300 text-sm transition-colors"
>
<i data-lucide="linkedin" class="w-4 h-4"></i>LinkedIn
</a>
</div>
</div>
</aside>
<div class="flex-1 flex flex-col gap-8">
<section
id="about-main"
class="rounded-2xl bg-white/50 dark:bg-slate-800/50 backdrop-blur-lg shadow-lg border border-slate-200 dark:border-slate-700 p-6 flex flex-col gap-2 transition-all duration-300 hover:shadow-xl hover:-translate-y-1"
>
<h2 class="text-xl font-bold text-teal-600 dark:text-teal-300 mb-2">
About Me
</h2>
<p
class="text-base text-slate-600 dark:text-slate-300 leading-relaxed"
>
I'm a passionate researcher and developer with a strong interest in
building intelligent systems that can learn and reason. My current
focus is on exploring the frontiers of AI.
</p>
<p
class="text-base text-slate-600 dark:text-slate-300 leading-relaxed pt-2"
>
<strong>Research Interests:</strong>
<span class="font-semibold text-teal-700 dark:text-teal-400">
Artificial Intelligence, Machine Learning, Data Science, Deep
Learning, LLMs, Agentic Systems
</span>
</p>
</section>
<section
id="selected-publications"
class="rounded-2xl bg-white/50 dark:bg-slate-800/50 backdrop-blur-lg shadow-lg border border-slate-200 dark:border-slate-700 p-6 flex flex-col gap-4 transition-all duration-300 hover:shadow-xl hover:-translate-y-1"
>
<div class="flex items-center gap-3">
<i
data-lucide="book-open-check"
class="w-6 h-6 text-teal-500 dark:text-teal-400"
></i>
<h2 class="text-xl font-bold text-teal-600 dark:text-teal-300">
Selected Publications
</h2>
</div>
<div id="selected-publications-container"></div>
<div
class="flex justify-center mt-2 animate-fadeIn opacity-0"
style="animation-delay: 600ms"
>
<a
href="publications.html"
class="inline-flex items-center gap-2 text-sm text-teal-600 dark:text-teal-400 hover:underline"
>
View all publications
<i data-lucide="arrow-right" class="w-4 h-4"></i>
</a>
</div>
</section>
<div id="dynamic-content-container" class="flex flex-col gap-8"></div>
</div>
</main>
<div id="footer-partial"></div>
<script src="scripts/partials.js"></script>
<script>
// Function to escape HTML special characters
function escapeHtml(str) {
if (!str) return "";
return String(str).replace(/[&<>"']/g, function (s) {
return {
"&": "&",
"<": "<",
">": ">",
'"': """,
"'": "'",
}[s];
});
}
// --- PUBLICATIONS PARSER ---
const parsePublications = (md) => {
md = md.replace(/^\s*\[([^\]]+)\]:\s*(\S+)(?:\s+"([^"]+)")?\s*$/gm, "");
const entries = md
.split(/\r?\n-{3,}\r?\n/)
.map((e) => e.trim())
.filter(Boolean);
const parsedEntries = entries
.map((entry) => {
const fields = {};
let current = null;
entry.split(/\r?\n/).forEach((line) => {
const sec = line.match(/^\[(\w+)\]$/);
if (sec) {
current = sec[1].toLowerCase();
fields[current] = "";
} else if (current) {
if (fields[current]) fields[current] += "\n";
fields[current] += line.trim();
}
});
if (fields.paper) {
const match = fields.paper.match(/\[([^\]]+)\]\(([^)]+)\)/);
if (match) fields.paper = match[2];
}
if (fields.code) {
const match = fields.code.match(/\[([^\]]+)\]\(([^)]+)\)/);
if (match) fields.code = match[2];
}
return {
...fields,
numericYear: parseInt(fields.year) || 0,
};
})
.sort((a, b) => b.numericYear - a.numericYear);
return parsedEntries;
};
function copyBibTeX(button, bibText) {
navigator.clipboard
.writeText(bibText)
.then(() => {
const originalContent = button.innerHTML;
button.innerHTML = `<i data-lucide="check" class="w-3.5 h-3.5"></i>Copied!`;
lucide.createIcons();
setTimeout(() => {
button.innerHTML = originalContent;
lucide.createIcons();
}, 2000);
})
.catch((err) => console.error("Failed to copy text: ", err));
}
const createPublicationCard = (pub, delay) => {
const authorHtml = pub.author
? `<p class="text-xs text-slate-500 dark:text-slate-400 mt-1">${pub.author
.split(",")
.map((author) =>
author.includes("Mohammad Ashfaq")
? `<span class="text-teal-600 dark:text-teal-400">${escapeHtml(
author.trim()
)}</span>`
: escapeHtml(author.trim())
)
.join(", ")}</p>`
: "";
const buttonBaseClass = `inline-flex items-center gap-1.5 px-3 py-1 rounded-md border border-slate-300 dark:border-slate-600 text-slate-700 dark:text-slate-300 text-xs font-medium hover:border-teal-500 dark:hover:border-teal-400 hover:text-teal-600 dark:hover:text-teal-400 hover:scale-105 active:scale-95 transition-all duration-200 ease-out`;
return `<div class="flex flex-col sm:flex-row gap-4 p-3 rounded-lg hover:bg-white/50 dark:hover:bg-slate-700/50 transition-colors duration-300 group animate-slideUp opacity-0" style="animation-delay: ${delay}ms"><div class="w-24 h-24 flex-shrink-0 bg-white dark:bg-slate-800 rounded border border-slate-200 dark:border-slate-700 p-2 group-hover:scale-105 transition-transform duration-300"><img src="${escapeHtml(
pub.image
)}" alt="${escapeHtml(
pub.title
)}" class="w-full h-full object-contain rounded" onerror="this.onerror=null; this.src='assets/images/publication-placeholder.png';" /></div><div class="flex-1"><h3 class="font-semibold text-slate-800 dark:text-slate-200">${escapeHtml(
pub.title
)}</h3>${authorHtml}<p class="text-sm text-slate-600 dark:text-slate-400 mt-1">${escapeHtml(
pub.venue
)}${
pub.year ? ` (${escapeHtml(pub.year)})` : ""
}</p><div class="flex flex-wrap gap-2 mt-3 opacity-90 group-hover:opacity-100 transition-opacity duration-300">${
pub.code
? `<a href="${escapeHtml(
pub.code
)}" target="_blank" rel="noopener" class="${buttonBaseClass}"><i data-lucide="code-2" class="w-3.5 h-3.5"></i>Code</a>`
: ""
}${
pub.paper
? `<a href="${escapeHtml(
pub.paper
)}" target="_blank" rel="noopener" class="${buttonBaseClass}"><i data-lucide="file-text" class="w-3.5 h-3.5"></i>Paper</a>`
: ""
}${
pub.bib
? `<button onclick="copyBibTeX(this, \`${escapeHtml(
pub.bib
)}\`)" class="${buttonBaseClass}"><i data-lucide="quote" class="w-3.5 h-3.5"></i>BIB</button>`
: ""
}</div></div></div>`;
};
// --- GENERIC CUSTOM MARKDOWN PARSER ---
const parseCustomMarkdown = (md) => {
const entries = md
.split("---")
.map((e) => e.trim())
.filter(Boolean);
return entries.map((entry) => {
const item = {};
const regex = /\[(\w+)\]\n?([\s\S]*?)(?=\n\[\w+\]|$)/g;
let match;
while ((match = regex.exec(entry)) !== null) {
const key = match[1].toLowerCase();
let value = match[2].trim();
if (key === "responsibilities") {
item[key] = value
.split("\n")
.map((r) => r.trim().replace(/^- /, ""))
.filter(Boolean);
} else {
item[key] = value;
}
}
return item;
});
};
const createCustomHtml = (items) => {
return items
.map(
(item) => `
<div class="space-y-3">
${
item.role
? `<h4 class="!my-0 font-semibold text-base">${escapeHtml(
item.role
)}</h4>`
: ""
}
${
item.organization
? `<p class="!my-0 text-sm text-slate-600 dark:text-slate-400"><em>${escapeHtml(
item.organization
)}</em></p>`
: ""
}
${
item.duration || item.location
? `<p class="!my-0 text-xs text-slate-500 dark:text-slate-400">${escapeHtml(
item.duration
)}${item.duration && item.location ? " | " : ""}${escapeHtml(
item.location
)}</p>`
: ""
}
${
item.responsibilities && item.responsibilities.length > 0
? `
<ul class="!mt-2 !mb-0">
${item.responsibilities
.map((r) => `<li>${escapeHtml(r)}</li>`)
.join("")}
</ul>`
: ""
}
${
item.skills
? `<p class="!my-0 pt-2 text-sm"><strong>Skills:</strong> ${escapeHtml(
item.skills
)}</p>`
: ""
}
</div>
`
)
.join('<hr class="!my-6 border-slate-200 dark:border-slate-700" />');
};
// --- DYNAMIC CONTENT LOADING ---
document.addEventListener("DOMContentLoaded", () => {
// Load selected publications
fetch("content/publications.md")
.then((res) => {
if (!res.ok) throw new Error("Failed to load publications");
return res.text();
})
.then((md) => {
const publications = parsePublications(md);
const latestTwo = publications.slice(0, 2);
if (latestTwo.length > 0) {
document.getElementById(
"selected-publications-container"
).innerHTML = latestTwo
.map((pub, index) =>
createPublicationCard(pub, (index + 1) * 200)
)
.join("");
} else {
throw new Error("No publications found");
}
})
.catch((err) => {
console.error("Failed to load publications:", err);
document.getElementById(
"selected-publications-container"
).innerHTML =
'<p class="text-sm text-slate-500 dark:text-slate-400">Could not load publications.</p>';
})
.finally(() => lucide.createIcons());
// Function to create a section card
const createSectionCard = (id, icon, title) => {
const section = document.createElement("section");
section.id = `${id}-section`;
section.className =
"rounded-2xl bg-white/50 dark:bg-slate-800/50 backdrop-blur-lg shadow-lg border border-slate-200 dark:border-slate-700 p-6 flex flex-col transition-all duration-300 hover:shadow-xl hover:-translate-y-1";
section.innerHTML = `<div class="flex items-center gap-3 mb-4"><i data-lucide="${icon}" class="w-6 h-6 text-teal-500 dark:text-teal-400"></i><h2 class="text-xl font-semibold text-teal-600 dark:text-teal-400">${title}</h2></div><div id="${id}-md" class="prose prose-custom dark:prose-invert max-w-none prose-a:transition-colors prose-a:duration-200 hover:prose-a:text-teal-700 dark:hover:prose-a:text-teal-300"></div>`;
return section;
};
// Define sections to be loaded
const sections = [
{
id: "skills",
icon: "zap",
title: "Skills",
file: "content/skills.md",
},
{
id: "work",
icon: "briefcase",
title: "Work Experience",
file: "content/work_experience.md",
customParser: true,
},
{
id: "profdev",
icon: "award",
title: "Professional Development",
file: "content/professional_development.md",
customParser: true,
},
{
id: "cocurricular",
icon: "users",
title: "Co-curricular Activities",
file: "content/co_curricular.md",
customParser: true,
},
];
const container = document.getElementById("dynamic-content-container");
// Load and render content for each section
const promises = sections.map((sec) => {
const card = createSectionCard(sec.id, sec.icon, sec.title);
container.appendChild(card);
return fetch(sec.file)
.then((res) => {
if (!res.ok) throw new Error(`HTTP error! status: ${res.status}`);
return res.text();
})
.then((md) => {
let htmlContent;
if (sec.customParser) {
const parsedItems = parseCustomMarkdown(md);
htmlContent = createCustomHtml(parsedItems);
} else {
htmlContent = marked.parse(md);
}
document.getElementById(`${sec.id}-md`).innerHTML = htmlContent;
})
.catch((err) => console.error(`Failed to load ${sec.file}:`, err));
});
// After all content is loaded, render icons
Promise.all(promises).then(() => {
lucide.createIcons();
});
});
</script>
</body>
</html>