Skip to content

Commit

Permalink
Add support for CV (alshedivat#628)
Browse files Browse the repository at this point in the history
  • Loading branch information
rohandebsarkar authored and tigerjack committed Jun 27, 2022
1 parent 60abf33 commit 641b36e
Show file tree
Hide file tree
Showing 12 changed files with 265 additions and 16 deletions.
97 changes: 97 additions & 0 deletions _data/cv.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
- title: General Information
type: map
contents:
- name: Full Name
value: Albert Einstein
- name: Date of Birth
value: 14th March 1879
- name: Languages
value: English, German

- title: Education
type: time_table
contents:
- title: PhD
institution: University of Zurich, Zurich, Switzerland
year: 1905
description:
- Description 1.
- Description 2.
- title: Description 3.
contents:
- Sub-description 1.
- Sub-description 2.
- title: Federal teaching diploma
institution: Eidgenössische Technische Hochschule, Zurich, Switzerland
year: 1900
description:
- Description 1.
- Description 2.

- title: Experience
type: time_table
contents:
- title: Professor of Theoretical Physics
institution: Institute for Advanced Study, Princeton University
year: 1933 - 1955
description:
- Description 1.
- Description 2.
- title: Description 3.
contents:
- Sub-description 1.
- Sub-description 2.
- title: Visiting Professor
institution: California Institute of Technology, Pasadena, California, US
year: 1933
description:
- Description 1.
- Description 2.

- title: Director
institution: Kaiser Wilhelm Institute for Physics, Berlin, Germany.
year: 1917-1933

- title: Professor of Theoretical Physics
institution: Karl-Ferdinand University, Prague, Czechoslovakia
year: 1911 - 1917
description:

- title: Associate Professor of Theoretical Physics
institution: University of Zurich, Zurich, Switzerland
year: 1909 - 1911

- title: Open Source Projects
type: time_table
contents:
- title: <a href="https://github.com/alshedivat/al-folio">al-folio</a>
year: 2015-now
description: A beautiful, simple, clean, and responsive Jekyll theme for academics.

- title: Honors and Awards
type: time_table
contents:
- year: 1921
items:
- Nobel Prize in Physics
- Matteucci Medal
- year: 2029
items:
- Max Planck Medal

- title: Academic Interests
type: nested_list
contents:
- title: Topic 1.
items:
- Description 1.
- Description 2.
- title: Topic 2.
items:
- Description 1.
- Description 2.

- title: Other Interests
type: list
contents:
- <u>Hobbies:</u> Hobby 1, Hobby 2, etc.
5 changes: 5 additions & 0 deletions _includes/cv/list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<ul class="card-text font-weight-light list-group list-group-flush">
{% for content in entry.contents %}
<li class="list-group-item">{{ content }}</li>
{% endfor %}
</ul>
8 changes: 8 additions & 0 deletions _includes/cv/map.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<table class="table table-sm table-borderless table-responsive">
{% for content in entry.contents %}
<tr>
<td class="p-1 pr-2 font-weight-bold"><b>{{ content.name }}</b></td>
<td class="p-1 pl-2 font-weight-light text">{{ content.value }}</td>
</tr>
{% endfor %}
</table>
14 changes: 14 additions & 0 deletions _includes/cv/nested_list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<ul class="card-text font-weight-light list-group list-group-flush">
{% for content in entry.contents %}
<li class="list-group-item">
<h5 class="font-italic">{{ content.title }}</h5>
{% if content.items %}
<ul class="subitems">
{% for subitem in content.items %}
<li><span class="subitem">{{ subitem }}</span></li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
59 changes: 59 additions & 0 deletions _includes/cv/time_table.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<ul class="card-text font-weight-light list-group list-group-flush">
{% for content in entry.contents %}
<li class="list-group-item">
<div class="row">
{% if content.year %}
<div class="col-xs-2 cl-sm-2 col-md-2 text-center" style="width: 75px;">
<span class="badge font-weight-bold danger-color-dark text-uppercase align-middle" style="min-width: 75px;">
{{ content.year }}
</span>
</div>
{% endif %}
<div class="col-xs-10 cl-sm-10 col-md-10 mt-2 mt-md-0">
{% if content.title %}
<h6 class="title font-weight-bold ml-1 ml-md-4">{{content.title}}</h6>
{% endif %}
{% if content.institution %}
<h6 class="ml-1 ml-md-4" style="font-size: 0.95rem;">{{content.institution}}</h6>
{% endif %}
{% if content.description %}
<ul class="items">
{% for item in content.description %}
<li>
{% if item.contents %}
<span class="item-title">{{ item.title }}</span>
<ul class="subitems">
{% for subitem in item.contents %}
<li><span class="subitem">{{ subitem }}</span></li>
{% endfor %}
</ul>
{% else %}
<span class="item">{{ item }}</span>
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
{% if content.items %}
<ul class="items">
{% for item in content.items %}
<li>
{% if item.contents %}
<span class="item-title">{{ item.title }}</span>
<ul class="subitems">
{% for subitem in item.contents %}
<li><span class="subitem">{{ subitem }}</span></li>
{% endfor %}
</ul>
{% else %}
<span class="item">{{ item }}</span>
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
</div>
</div>
</li>
{% endfor %}
</ul>
35 changes: 35 additions & 0 deletions _layouts/cv.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
layout: default
---
<!-- _layouts/cv.html -->
<div class="post">

<header class="post-header">
<h1 class="post-title">{{ page.title }} {% if page.cv_pdf %}<a href="{{ page.cv_pdf | prepend: 'assets/pdf/' | relative_url}}" target="_blank" rel="noopener noreferrer" class="float-right"><i class="fas fa-file-pdf"></i></a>{% endif %}</h1>
<p class="post-description">{{ page.description }}</p>
</header>

<article>
<div class="cv">
{% for entry in site.data.cv %}
<div class="card mt-3 p-3">
<h3 class="card-title font-weight-medium">{{ entry.title }}</h3>
<div>
{% 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 %}
{% else %}
{{ entry.contents }}
{% endif %}
</div>
</div>
{% endfor %}
</div>
</article>

</div>
2 changes: 1 addition & 1 deletion _pages/_dropdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: page
title: submenus
nav: true
nav_order: 3
nav_order: 5
dropdown: true
children:
- title: publications
Expand Down
8 changes: 0 additions & 8 deletions _pages/_teaching.md

This file was deleted.

8 changes: 8 additions & 0 deletions _pages/cv.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
layout: cv
permalink: /cv/
title: cv
nav: true
nav_order: 3
cv_pdf: example_pdf.pdf
---
2 changes: 1 addition & 1 deletion _pages/publications.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: publications
description: publications by categories in reversed chronological order and grouped by type
years: [2021]
nav: true
nav_order: 2
nav_order: 1
---
<!-- _pages/publications.md -->
<div class="publications">
Expand Down
12 changes: 12 additions & 0 deletions _pages/teaching.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
layout: page
permalink: /teaching/
title: teaching
description: Materials for courses you taught. Replace this text with your description.
nav: true
nav_order: 4
---

For now, this page is assumed to be a static description of your courses. You can convert it to a collection similar to `_projects/` so that you can have a dedicated page for each course.

Organize your courses by years, topics, or universities, however you like!
31 changes: 25 additions & 6 deletions _sass/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ hr {
}

table {
td, th {
color: var(--global-text-color);
}
td {
font-size: 1rem;
}
td, th {
color: var(--global-text-color);
}
td {
font-size: 1rem;
}
}

a, table.table a {
Expand Down Expand Up @@ -282,6 +282,25 @@ footer.sticky-bottom {
font-size: 0.9rem;
}

// CV

.cv {
margin-bottom: 40px;

.card {
background-color: var(--global-card-bg-color);
border: 1px solid var(--global-divider-color);

.list-group-item {
background-color: inherit;

.badge {
color: var(--global-card-bg-color) !important;
background-color: var(--global-theme-color) !important;
}
}
}
}

// Blog

Expand Down

0 comments on commit 641b36e

Please sign in to comment.