Skip to content

Commit 6d66ae8

Browse files
Add support for CV (alshedivat#628)
1 parent 4e460ee commit 6d66ae8

File tree

12 files changed

+255
-10
lines changed

12 files changed

+255
-10
lines changed

_data/cv.yml

+97
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
- title: General Information
2+
type: map
3+
contents:
4+
- name: Full Name
5+
value: Albert Einstein
6+
- name: Date of Birth
7+
value: 14th March 1879
8+
- name: Languages
9+
value: English, German
10+
11+
- title: Education
12+
type: time_table
13+
contents:
14+
- title: PhD
15+
institution: University of Zurich, Zurich, Switzerland
16+
year: 1905
17+
description:
18+
- Description 1.
19+
- Description 2.
20+
- title: Description 3.
21+
contents:
22+
- Sub-description 1.
23+
- Sub-description 2.
24+
- title: Federal teaching diploma
25+
institution: Eidgenössische Technische Hochschule, Zurich, Switzerland
26+
year: 1900
27+
description:
28+
- Description 1.
29+
- Description 2.
30+
31+
- title: Experience
32+
type: time_table
33+
contents:
34+
- title: Professor of Theoretical Physics
35+
institution: Institute for Advanced Study, Princeton University
36+
year: 1933 - 1955
37+
description:
38+
- Description 1.
39+
- Description 2.
40+
- title: Description 3.
41+
contents:
42+
- Sub-description 1.
43+
- Sub-description 2.
44+
- title: Visiting Professor
45+
institution: California Institute of Technology, Pasadena, California, US
46+
year: 1933
47+
description:
48+
- Description 1.
49+
- Description 2.
50+
51+
- title: Director
52+
institution: Kaiser Wilhelm Institute for Physics, Berlin, Germany.
53+
year: 1917-1933
54+
55+
- title: Professor of Theoretical Physics
56+
institution: Karl-Ferdinand University, Prague, Czechoslovakia
57+
year: 1911 - 1917
58+
description:
59+
60+
- title: Associate Professor of Theoretical Physics
61+
institution: University of Zurich, Zurich, Switzerland
62+
year: 1909 - 1911
63+
64+
- title: Open Source Projects
65+
type: time_table
66+
contents:
67+
- title: <a href="https://github.com/alshedivat/al-folio">al-folio</a>
68+
year: 2015-now
69+
description: A beautiful, simple, clean, and responsive Jekyll theme for academics.
70+
71+
- title: Honors and Awards
72+
type: time_table
73+
contents:
74+
- year: 1921
75+
items:
76+
- Nobel Prize in Physics
77+
- Matteucci Medal
78+
- year: 2029
79+
items:
80+
- Max Planck Medal
81+
82+
- title: Academic Interests
83+
type: nested_list
84+
contents:
85+
- title: Topic 1.
86+
items:
87+
- Description 1.
88+
- Description 2.
89+
- title: Topic 2.
90+
items:
91+
- Description 1.
92+
- Description 2.
93+
94+
- title: Other Interests
95+
type: list
96+
contents:
97+
- <u>Hobbies:</u> Hobby 1, Hobby 2, etc.

_includes/cv/list.html

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<ul class="card-text font-weight-light list-group list-group-flush">
2+
{% for content in entry.contents %}
3+
<li class="list-group-item">{{ content }}</li>
4+
{% endfor %}
5+
</ul>

_includes/cv/map.html

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<table class="table table-sm table-borderless table-responsive">
2+
{% for content in entry.contents %}
3+
<tr>
4+
<td class="p-1 pr-2 font-weight-bold"><b>{{ content.name }}</b></td>
5+
<td class="p-1 pl-2 font-weight-light text">{{ content.value }}</td>
6+
</tr>
7+
{% endfor %}
8+
</table>

_includes/cv/nested_list.html

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<ul class="card-text font-weight-light list-group list-group-flush">
2+
{% for content in entry.contents %}
3+
<li class="list-group-item">
4+
<h5 class="font-italic">{{ content.title }}</h5>
5+
{% if content.items %}
6+
<ul class="subitems">
7+
{% for subitem in content.items %}
8+
<li><span class="subitem">{{ subitem }}</span></li>
9+
{% endfor %}
10+
</ul>
11+
{% endif %}
12+
</li>
13+
{% endfor %}
14+
</ul>

_includes/cv/time_table.html

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<ul class="card-text font-weight-light list-group list-group-flush">
2+
{% for content in entry.contents %}
3+
<li class="list-group-item">
4+
<div class="row">
5+
{% if content.year %}
6+
<div class="col-xs-2 cl-sm-2 col-md-2 text-center" style="width: 75px;">
7+
<span class="badge font-weight-bold danger-color-dark text-uppercase align-middle" style="min-width: 75px;">
8+
{{ content.year }}
9+
</span>
10+
</div>
11+
{% endif %}
12+
<div class="col-xs-10 cl-sm-10 col-md-10 mt-2 mt-md-0">
13+
{% if content.title %}
14+
<h6 class="title font-weight-bold ml-1 ml-md-4">{{content.title}}</h6>
15+
{% endif %}
16+
{% if content.institution %}
17+
<h6 class="ml-1 ml-md-4" style="font-size: 0.95rem;">{{content.institution}}</h6>
18+
{% endif %}
19+
{% if content.description %}
20+
<ul class="items">
21+
{% for item in content.description %}
22+
<li>
23+
{% if item.contents %}
24+
<span class="item-title">{{ item.title }}</span>
25+
<ul class="subitems">
26+
{% for subitem in item.contents %}
27+
<li><span class="subitem">{{ subitem }}</span></li>
28+
{% endfor %}
29+
</ul>
30+
{% else %}
31+
<span class="item">{{ item }}</span>
32+
{% endif %}
33+
</li>
34+
{% endfor %}
35+
</ul>
36+
{% endif %}
37+
{% if content.items %}
38+
<ul class="items">
39+
{% for item in content.items %}
40+
<li>
41+
{% if item.contents %}
42+
<span class="item-title">{{ item.title }}</span>
43+
<ul class="subitems">
44+
{% for subitem in item.contents %}
45+
<li><span class="subitem">{{ subitem }}</span></li>
46+
{% endfor %}
47+
</ul>
48+
{% else %}
49+
<span class="item">{{ item }}</span>
50+
{% endif %}
51+
</li>
52+
{% endfor %}
53+
</ul>
54+
{% endif %}
55+
</div>
56+
</div>
57+
</li>
58+
{% endfor %}
59+
</ul>

_layouts/cv.html

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
layout: default
3+
---
4+
<!-- _layouts/cv.html -->
5+
<div class="post">
6+
7+
<header class="post-header">
8+
<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>
9+
<p class="post-description">{{ page.description }}</p>
10+
</header>
11+
12+
<article>
13+
<div class="cv">
14+
{% for entry in site.data.cv %}
15+
<div class="card mt-3 p-3">
16+
<h3 class="card-title font-weight-medium">{{ entry.title }}</h3>
17+
<div>
18+
{% if entry.type == "list" %}
19+
{% include cv/list.html %}
20+
{% elsif entry.type == "map" %}
21+
{% include cv/map.html %}
22+
{% elsif entry.type == "nested_list" %}
23+
{% include cv/nested_list.html %}
24+
{% elsif entry.type == "time_table" %}
25+
{% include cv/time_table.html %}
26+
{% else %}
27+
{{ entry.contents }}
28+
{% endif %}
29+
</div>
30+
</div>
31+
{% endfor %}
32+
</div>
33+
</article>
34+
35+
</div>

_pages/cv.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
layout: cv
3+
permalink: /cv/
4+
title: cv
5+
nav: true
6+
nav_order: 3
7+
cv_pdf: example_pdf.pdf
8+
---

_pages/dropdown.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
layout: page
33
title: submenus
44
nav: true
5-
nav_order: 3
5+
nav_order: 5
66
dropdown: true
77
children:
88
- title: publications

_pages/projects.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: projects
44
permalink: /projects/
55
description: A growing collection of your cool projects.
66
nav: true
7-
nav_order: 1
7+
nav_order: 2
88
display_categories: [work, fun]
99
horizontal: false
1010
---

_pages/publications.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: publications
55
description: publications by categories in reversed chronological order. generated by jekyll-scholar.
66
years: [1956, 1950, 1935, 1905]
77
nav: true
8-
nav_order: 2
8+
nav_order: 1
99
---
1010
<!-- _pages/publications.md -->
1111
<div class="publications">

_pages/teaching.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ permalink: /teaching/
44
title: teaching
55
description: Materials for courses you taught. Replace this text with your description.
66
nav: true
7-
nav_order: 2
7+
nav_order: 4
88
---
99

1010
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.

_sass/_base.scss

+25-6
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ hr {
1313
}
1414

1515
table {
16-
td, th {
17-
color: var(--global-text-color);
18-
}
19-
td {
20-
font-size: 1rem;
21-
}
16+
td, th {
17+
color: var(--global-text-color);
18+
}
19+
td {
20+
font-size: 1rem;
21+
}
2222
}
2323

2424
a, table.table a {
@@ -282,6 +282,25 @@ footer.sticky-bottom {
282282
font-size: 0.9rem;
283283
}
284284

285+
// CV
286+
287+
.cv {
288+
margin-bottom: 40px;
289+
290+
.card {
291+
background-color: var(--global-card-bg-color);
292+
border: 1px solid var(--global-divider-color);
293+
294+
.list-group-item {
295+
background-color: inherit;
296+
297+
.badge {
298+
color: var(--global-card-bg-color) !important;
299+
background-color: var(--global-theme-color) !important;
300+
}
301+
}
302+
}
303+
}
285304

286305
// Blog
287306

0 commit comments

Comments
 (0)