diff --git a/_data/cv.js b/_data/cv.js index 1d48dc5..5c4f479 100644 --- a/_data/cv.js +++ b/_data/cv.js @@ -27,9 +27,11 @@ export default function () { experience: [], projects: [], skills: {}, + skillTypes: {}, languages: [], education: [], interests: [], + interestTypes: {}, }; } } diff --git a/_includes/components/homepage-section.njk b/_includes/components/homepage-section.njk index 21f4952..c6900e0 100644 --- a/_includes/components/homepage-section.njk +++ b/_includes/components/homepage-section.njk @@ -17,6 +17,24 @@ {% include "components/sections/cv-education.njk" ignore missing %} {% elif section.type == "cv-interests" %} {% include "components/sections/cv-interests.njk" ignore missing %} +{% elif section.type == "cv-experience-personal" %} + {% include "components/sections/cv-experience-personal.njk" ignore missing %} +{% elif section.type == "cv-experience-work" %} + {% include "components/sections/cv-experience-work.njk" ignore missing %} +{% elif section.type == "cv-education-personal" %} + {% include "components/sections/cv-education-personal.njk" ignore missing %} +{% elif section.type == "cv-education-work" %} + {% include "components/sections/cv-education-work.njk" ignore missing %} +{% elif section.type == "cv-skills-personal" %} + {% include "components/sections/cv-skills-personal.njk" ignore missing %} +{% elif section.type == "cv-skills-work" %} + {% include "components/sections/cv-skills-work.njk" ignore missing %} +{% elif section.type == "cv-interests-personal" %} + {% include "components/sections/cv-interests-personal.njk" ignore missing %} +{% elif section.type == "cv-interests-work" %} + {% include "components/sections/cv-interests-work.njk" ignore missing %} +{% elif section.type == "cv-languages" %} + {% include "components/sections/cv-languages.njk" ignore missing %} {% elif section.type == "blogroll" %} {% include "components/sections/blogroll.njk" ignore missing %} {% elif section.type == "podroll" %} diff --git a/_includes/components/sections/cv-education-personal.njk b/_includes/components/sections/cv-education-personal.njk new file mode 100644 index 0000000..fd937a7 --- /dev/null +++ b/_includes/components/sections/cv-education-personal.njk @@ -0,0 +1,2 @@ +{% set filterType = "personal" %} +{% include "components/sections/cv-education.njk" %} diff --git a/_includes/components/sections/cv-education-work.njk b/_includes/components/sections/cv-education-work.njk new file mode 100644 index 0000000..6d2e3ea --- /dev/null +++ b/_includes/components/sections/cv-education-work.njk @@ -0,0 +1,2 @@ +{% set filterType = "work" %} +{% include "components/sections/cv-education.njk" %} diff --git a/_includes/components/sections/cv-education.njk b/_includes/components/sections/cv-education.njk index ccc5a16..052fb21 100644 --- a/_includes/components/sections/cv-education.njk +++ b/_includes/components/sections/cv-education.njk @@ -15,6 +15,7 @@ {% if hasEducation %}
{% for item in cv.education %} + {% if not filterType or item.educationType == filterType or (filterType == "personal" and not item.educationType) %}

{{ item.degree }}

@@ -25,11 +26,12 @@

{{ item.description }}

{% endif %}
+ {% endif %} {% endfor %}
{% endif %} - {% if hasLanguages %} + {% if hasLanguages and not filterType %}
{% for lang in cv.languages %}
diff --git a/_includes/components/sections/cv-experience-personal.njk b/_includes/components/sections/cv-experience-personal.njk new file mode 100644 index 0000000..7d4c858 --- /dev/null +++ b/_includes/components/sections/cv-experience-personal.njk @@ -0,0 +1,2 @@ +{% set filterType = "personal" %} +{% include "components/sections/cv-experience.njk" %} diff --git a/_includes/components/sections/cv-experience-work.njk b/_includes/components/sections/cv-experience-work.njk new file mode 100644 index 0000000..57b91b3 --- /dev/null +++ b/_includes/components/sections/cv-experience-work.njk @@ -0,0 +1,2 @@ +{% set filterType = "work" %} +{% include "components/sections/cv-experience.njk" %} diff --git a/_includes/components/sections/cv-experience.njk b/_includes/components/sections/cv-experience.njk index 1d1fb8a..9d7bf3d 100644 --- a/_includes/components/sections/cv-experience.njk +++ b/_includes/components/sections/cv-experience.njk @@ -15,6 +15,7 @@
{% for item in cv.experience | head(maxItems) %} + {% if not filterType or item.experienceType == filterType or (filterType == "personal" and not item.experienceType) %}

{{ item.title }}

@@ -40,6 +41,7 @@
{% endif %}
+ {% endif %} {% endfor %}
diff --git a/_includes/components/sections/cv-interests-personal.njk b/_includes/components/sections/cv-interests-personal.njk new file mode 100644 index 0000000..0d053a3 --- /dev/null +++ b/_includes/components/sections/cv-interests-personal.njk @@ -0,0 +1,2 @@ +{% set filterType = "personal" %} +{% include "components/sections/cv-interests.njk" %} diff --git a/_includes/components/sections/cv-interests-work.njk b/_includes/components/sections/cv-interests-work.njk new file mode 100644 index 0000000..7cbe270 --- /dev/null +++ b/_includes/components/sections/cv-interests-work.njk @@ -0,0 +1,2 @@ +{% set filterType = "work" %} +{% include "components/sections/cv-interests.njk" %} diff --git a/_includes/components/sections/cv-interests.njk b/_includes/components/sections/cv-interests.njk index d6964dc..459e737 100644 --- a/_includes/components/sections/cv-interests.njk +++ b/_includes/components/sections/cv-interests.njk @@ -11,9 +11,11 @@
{% for interest in cv.interests %} + {% if not filterType or (cv.interestTypes and cv.interestTypes[interest] == filterType) or (filterType == "personal" and (not cv.interestTypes or not cv.interestTypes[interest])) %} {{ interest }} + {% endif %} {% endfor %}
diff --git a/_includes/components/sections/cv-languages.njk b/_includes/components/sections/cv-languages.njk new file mode 100644 index 0000000..ea9e9e5 --- /dev/null +++ b/_includes/components/sections/cv-languages.njk @@ -0,0 +1,21 @@ +{# + CV Languages Section + Data fetched from /cv/data.json via homepage plugin +#} + +{% if cv and cv.languages and cv.languages.length %} +
+

+ {{ section.config.title or "Languages" }} +

+ +
+ {% for lang in cv.languages %} +
+ {{ lang.name }} + {{ lang.level }} +
+ {% endfor %} +
+
+{% endif %} diff --git a/_includes/components/sections/cv-skills-personal.njk b/_includes/components/sections/cv-skills-personal.njk new file mode 100644 index 0000000..baa52be --- /dev/null +++ b/_includes/components/sections/cv-skills-personal.njk @@ -0,0 +1,2 @@ +{% set filterType = "personal" %} +{% include "components/sections/cv-skills.njk" %} diff --git a/_includes/components/sections/cv-skills-work.njk b/_includes/components/sections/cv-skills-work.njk new file mode 100644 index 0000000..cc1332a --- /dev/null +++ b/_includes/components/sections/cv-skills-work.njk @@ -0,0 +1,2 @@ +{% set filterType = "work" %} +{% include "components/sections/cv-skills.njk" %} diff --git a/_includes/components/sections/cv-skills.njk b/_includes/components/sections/cv-skills.njk index 2acea94..49712c7 100644 --- a/_includes/components/sections/cv-skills.njk +++ b/_includes/components/sections/cv-skills.njk @@ -11,6 +11,7 @@
{% for category, items in cv.skills | dictsort %} + {% if not filterType or (cv.skillTypes and cv.skillTypes[category] == filterType) or (filterType == "personal" and (not cv.skillTypes or not cv.skillTypes[category])) %}

{{ category }} @@ -23,6 +24,7 @@ {% endfor %}

+ {% endif %} {% endfor %}
diff --git a/cv.njk b/cv.njk index b63cee0..67065e0 100644 --- a/cv.njk +++ b/cv.njk @@ -53,25 +53,29 @@ pagefindIgnore: true -{# Experience — reuse the section partial #} -{% set section = { type: "cv-experience", config: {} } %} -{% include "components/sections/cv-experience.njk" ignore missing %} +{# Experience — work-only variant #} +{% set section = { type: "cv-experience-work", config: {} } %} +{% include "components/sections/cv-experience-work.njk" ignore missing %} -{# Skills #} -{% set section = { type: "cv-skills", config: {} } %} -{% include "components/sections/cv-skills.njk" ignore missing %} +{# Skills — work-only variant #} +{% set section = { type: "cv-skills-work", config: {} } %} +{% include "components/sections/cv-skills-work.njk" ignore missing %} {# Work Projects (only work-related projects on the CV page) #} {% set section = { type: "cv-projects-work", config: {} } %} {% include "components/sections/cv-projects-work.njk" ignore missing %} -{# Education & Languages #} -{% set section = { type: "cv-education", config: {} } %} -{% include "components/sections/cv-education.njk" ignore missing %} +{# Education — work-only variant #} +{% set section = { type: "cv-education-work", config: {} } %} +{% include "components/sections/cv-education-work.njk" ignore missing %} -{# Interests #} -{% set section = { type: "cv-interests", config: {} } %} -{% include "components/sections/cv-interests.njk" ignore missing %} +{# Languages — standalone section #} +{% set section = { type: "cv-languages", config: {} } %} +{% include "components/sections/cv-languages.njk" ignore missing %} + +{# Interests — work-only variant #} +{% set section = { type: "cv-interests-work", config: {} } %} +{% include "components/sections/cv-interests-work.njk" ignore missing %} {# Last Updated #} {% if cv.lastUpdated %}