forked from daattali/beautiful-jekyll
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathresume.html
60 lines (55 loc) · 1.38 KB
/
resume.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
---
layout: page
title: Resume
---
<hr />
<div style="flex-direction: row; margin-bottom: 100px; margin-top: 30px">
<p>
I am open for Software Engineer roles. You can reach out to me in the
<a href="/aboutme">About Me</a> section. My resume can be found below:
</p>
<div id="resume-download-section">
<span
id="resume-pdf-icon"
class="far fa-file-pdf"
style="margin-right: 4px"
></span>
<a
id="resume-download-link"
target="_blank"
href="/static/Aryan_Singh_Resume.pdf"
>Download/View Resume</a
>
</div>
</div>
<script>
/* date formatting logic */
Date.prototype.toShortFormat = function () {
const monthNames = [
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec",
];
const day = this.getDate();
const monthIndex = this.getMonth();
const monthName = monthNames[monthIndex];
const year = this.getFullYear();
return `${day} ${monthName} ${year}`;
};
fetch("/static/Aryan_Singh_Resume.pdf").then((data) => {
let resumeLastModifiedDate = new Date(data.headers.get("Last-Modified"));
resumeLastModifiedDate = resumeLastModifiedDate.toShortFormat();
document.querySelector(
"#resume-download-link"
).innerHTML += ` (Last updated on ${resumeLastModifiedDate})`;
});
</script>