diff --git a/Gemfile b/Gemfile index 058139a3614f..7c6104f08cf7 100644 --- a/Gemfile +++ b/Gemfile @@ -15,6 +15,7 @@ group :jekyll_plugins do gem 'jekyll-sitemap' gem 'jekyll-toc' gem 'jekyll-twitter-plugin' + gem 'jekyll-get-json' gem 'jemoji' gem 'mini_racer' gem 'unicode_utils' diff --git a/_config.yml b/_config.yml index bccb8a32f268..34d884da2ad4 100644 --- a/_config.yml +++ b/_config.yml @@ -229,6 +229,7 @@ plugins: - jekyll-sitemap - jekyll-toc - jekyll-twitter-plugin + - jekyll-get-json - jemoji # Sitemap settings @@ -402,3 +403,24 @@ mdb: medium_zoom: version: "1.0.8" integrity: "sha256-7PhEpEWEW0XXQ0k6kQrPKwuoIomz8R8IYyuU1Qew4P8=" + +# ----------------------------------------------------------------------------- +# Get external JSON data +# ----------------------------------------------------------------------------- + +jekyll_get_json: + - data: resume + json: "https://alshedivat.github.io/al-folio/assets/json/resume.json" +jsonresume: + - basics + - work + - education + - publications + - projects + - volunteer + - awards + - certificates + - skills + - languages + - interests + - references \ No newline at end of file diff --git a/_includes/resume/awards.html b/_includes/resume/awards.html new file mode 100644 index 000000000000..2bd912c93136 --- /dev/null +++ b/_includes/resume/awards.html @@ -0,0 +1,23 @@ + \ No newline at end of file diff --git a/_includes/resume/basics.html b/_includes/resume/basics.html new file mode 100644 index 000000000000..875af11df100 --- /dev/null +++ b/_includes/resume/basics.html @@ -0,0 +1,23 @@ + + {% assign skip_basics = "image,profiles,location" | split:"," %} + {% for content in data[1] %} + {% if (content[1] == "") or (skip_basics contains content[0]) %} + {% continue %} + {% endif %} + + + + + + {% endfor %} +
{{ content[0] | capitalize }} + {% if content[0] == "url" %} + {{ content[1] }} + {% elsif content[0] == "email" %} + {{ content[1] }} + {% elsif content[0] == "phone" %} + {{ content[1] }} + {% else %} + {{ content[1] }} + {% endif %} +
diff --git a/_includes/resume/certificates.html b/_includes/resume/certificates.html new file mode 100644 index 000000000000..cdd797894056 --- /dev/null +++ b/_includes/resume/certificates.html @@ -0,0 +1,31 @@ +
+ {% assign certificates = data[1] | sort: 'date' | reverse %} + {% for content in certificates %} +
+ + + + {% if content.icon %} + + {% else %} + + {% endif %} + + {% assign i = 1 %} + {% for item in content.items %} + {% assign i = i | plus:1 %} + {% endfor %} + + + + + + + + +
+ {{ content.name }} +
{{ content.issuer }}{{ content.date }}
+
+ {% endfor %} +
\ No newline at end of file diff --git a/_includes/resume/education.html b/_includes/resume/education.html new file mode 100644 index 000000000000..4dcfab56ac11 --- /dev/null +++ b/_includes/resume/education.html @@ -0,0 +1,47 @@ + \ No newline at end of file diff --git a/_includes/resume/interests.html b/_includes/resume/interests.html new file mode 100644 index 000000000000..3519179962d5 --- /dev/null +++ b/_includes/resume/interests.html @@ -0,0 +1,29 @@ +
+ {% for content in data[1] %} +
+ + + + {% if content.icon %} + + {% else %} + + {% endif %} + + {% assign i = 1 %} + {% for item in content.items %} + {% assign i = i | plus:1 %} + {% endfor %} + + + {% for item in content.keywords %} + + + + + {% endfor %} + +
{{ content.name }}
{{ item }}
+
+ {% endfor %} +
\ No newline at end of file diff --git a/_includes/resume/languages.html b/_includes/resume/languages.html new file mode 100644 index 000000000000..8b0fd2b018d1 --- /dev/null +++ b/_includes/resume/languages.html @@ -0,0 +1,27 @@ +
+ {% for content in data[1] %} +
+ + + + {% if content.icon %} + + {% else %} + + {% endif %} + + {% assign i = 1 %} + {% for item in content.items %} + {% assign i = i | plus:1 %} + {% endfor %} + + + + + + + +
{{ content.language }}
{{ content.fluency }}
+
+ {% endfor %} +
\ No newline at end of file diff --git a/_includes/resume/projects.html b/_includes/resume/projects.html new file mode 100644 index 000000000000..0436c80717e3 --- /dev/null +++ b/_includes/resume/projects.html @@ -0,0 +1,32 @@ + \ No newline at end of file diff --git a/_includes/resume/publications.html b/_includes/resume/publications.html new file mode 100644 index 000000000000..d77d715fce04 --- /dev/null +++ b/_includes/resume/publications.html @@ -0,0 +1,30 @@ + \ No newline at end of file diff --git a/_includes/resume/references.html b/_includes/resume/references.html new file mode 100644 index 000000000000..fef4d28db78f --- /dev/null +++ b/_includes/resume/references.html @@ -0,0 +1,27 @@ +
+ {% for content in data[1] %} +
+ + + + {% if content.icon %} + + {% else %} + + {% endif %} + + {% assign i = 1 %} + {% for item in content.items %} + {% assign i = i | plus:1 %} + {% endfor %} + + + + + + + +
{{ content.name }}
{{ content.reference }}
+
+ {% endfor %} +
\ No newline at end of file diff --git a/_includes/resume/skills.html b/_includes/resume/skills.html new file mode 100644 index 000000000000..69bb4e317831 --- /dev/null +++ b/_includes/resume/skills.html @@ -0,0 +1,29 @@ +
+ {% for content in data[1] %} +
+ + + + {% if content.icon %} + + {% else %} + + {% endif %} + + {% assign i = 1 %} + {% for item in content.items %} + {% assign i = i | plus:1 %} + {% endfor %} + + + {% for item in content.keywords %} + + + + + {% endfor %} + +
{{ content.name }}
{{ item }}
+
+ {% endfor %} +
\ No newline at end of file diff --git a/_includes/resume/volunteer.html b/_includes/resume/volunteer.html new file mode 100644 index 000000000000..fb68f7afc3c5 --- /dev/null +++ b/_includes/resume/volunteer.html @@ -0,0 +1,34 @@ + \ No newline at end of file diff --git a/_includes/resume/work.html b/_includes/resume/work.html new file mode 100644 index 000000000000..9f8e1852a226 --- /dev/null +++ b/_includes/resume/work.html @@ -0,0 +1,34 @@ + \ No newline at end of file diff --git a/_layouts/cv.html b/_layouts/cv.html index 09031078a605..f3410ebb5778 100644 --- a/_layouts/cv.html +++ b/_layouts/cv.html @@ -2,6 +2,8 @@ layout: default --- +{% unless site.data.resume %} +
@@ -42,4 +44,114 @@

{{ entry.title }}

+
+

{{ page.title }} {% if page.cv_pdf %}{% endif %}

+ {% if page.description %}

{{ page.description }}

{% endif %} +
+ +

Table of contents

+ + +
+
+ {% for entry in site.data.cv %} + +
+

{{ entry.title }}

+
+ {% if entry.type == "list" %} + {% include cv/list.html %} + {% elsif entry.type == "map" %} + {% include cv/map.html %} + {% elsif entry.type == "nested_list" %} + {% include cv/nested_list.html %} + {% elsif entry.type == "time_table" %} + {% include cv/time_table.html %} + {% elsif entry.type == "list_groups" %} + {% include cv/list_groups.html %} + {% else %} + {{ entry.contents }} + {% endif %} +
+
+ {% endfor %} +
+
+ +
+{% else %} +
+ +
+

{{ page.title }} {% if page.cv_pdf %}{% endif %}

+ {% if page.description %}

{{ page.description }}

{% endif %} +
+ +

Table of contents

+ + +
+
+ {% for data in site.data.resume %} + {% if site.jsonresume and site.jsonresume.size > 0 %} + {% unless site.jsonresume contains data[0] %} + {% continue %} + {% endunless %} + {% endif %} + {% if data[0] == "meta" or data[1].size == 0 %} + {% continue %} + {% endif %} + +
+

{{ data[0] | capitalize }}

+
+ {% case data[0] %} + {% when "basics" %} + {% include resume/basics.html %} + {% when "education" %} + {% include resume/education.html %} + {% when "work" %} + {% include resume/work.html %} + {% when "volunteer" %} + {% include resume/volunteer.html %} + {% when "projects" %} + {% include resume/projects.html %} + {% when "awards" %} + {% include resume/awards.html %} + {% when "skills" %} + {% include resume/skills.html %} + {% when "publications" %} + {% include resume/publications.html %} + {% when "languages" %} + {% include resume/languages.html %} + {% when "interests" %} + {% include resume/interests.html %} + {% when "certificates" %} + {% include resume/certificates.html %} + {% else %} + + {% endcase %} +
+ {% endfor %} +
+
+ +
+{% endunless %} \ No newline at end of file diff --git a/assets/json/resume.json b/assets/json/resume.json new file mode 100644 index 000000000000..dea0fc9f2d13 --- /dev/null +++ b/assets/json/resume.json @@ -0,0 +1,77 @@ +{ + "basics": { + "name": "Albert Einstein", + "label": "Scientist", + "image": "", + "email": "albert@einstein.de", + "phone": "(912) 123-4567", + "url": "https://alshedivat.github.io/al-folio/", + "summary": "A German-born theoretical physicist, widely ranked among the greatest and most influential scientists of all time", + "location": { + "address": "2712 Broadway St", + "postalCode": "CA 94115", + "city": "San Francisco", + "countryCode": "US", + "region": "California" + }, + "profiles": [ + { + "network": "Twitter", + "username": "AlbertEinstein", + "url": "https://twitter.com/AlbertEinstein" + } + ] + }, + "work": [ + { + "name": "Institute for Advanced Study, Princeton University", + "position": "Professor of Theoretical Physics", + "url": "https://example.com", + "startDate": "1933-01-01", + "endDate": "1955-01-01", + "summary": "Teaching at Palmer Physical Laboratory (now 302 Frist Campus Center). While not a professor at Princeton, I associated with the physics professors and continued to give lectures on campus.", + "highlights": [ + "Relativity" + ] + } + ], + "volunteer": [], + "education": [ + { + "institution": "University of Zurich, Zurich, Switzerland", + "url": "https://www.uzh.ch/", + "area": "Software Development", + "studyType": "PhD", + "startDate": "1905-01-01", + "endDate": "1905-01-01", + "score": "", + "courses": [ + "Theory of Relativity" + ] + } + ], + "awards": [ + { + "title": "Nobel Prize in Physics", + "date": "1921-11-01", + "awarder": "Royal Swedish Academy of Sciences", + "summary": "The Nobel Prizes are five separate prizes that, according to Alfred Nobel's will of 1895, are awarded to 'those who, during the preceding year, have conferred the greatest benefit to humankind.'" + } + ], + "certificates": [], + "publications": [], + "skills": [], + "languages": [ + { + "language": "German", + "fluency": "Native speaker" + }, + { + "language": "English", + "fluency": "Fluent" + } + ], + "interests": [], + "references": [], + "projects": [] +} \ No newline at end of file