diff --git a/_includes/components/homepage-section.njk b/_includes/components/homepage-section.njk index c87d360..21f4952 100644 --- a/_includes/components/homepage-section.njk +++ b/_includes/components/homepage-section.njk @@ -7,6 +7,10 @@ {% include "components/sections/cv-experience.njk" ignore missing %} {% elif section.type == "cv-projects" %} {% include "components/sections/cv-projects.njk" ignore missing %} +{% elif section.type == "cv-projects-personal" %} + {% include "components/sections/cv-projects-personal.njk" ignore missing %} +{% elif section.type == "cv-projects-work" %} + {% include "components/sections/cv-projects-work.njk" ignore missing %} {% elif section.type == "cv-skills" %} {% include "components/sections/cv-skills.njk" ignore missing %} {% elif section.type == "cv-education" %} diff --git a/_includes/components/sections/cv-projects-personal.njk b/_includes/components/sections/cv-projects-personal.njk new file mode 100644 index 0000000..195414c --- /dev/null +++ b/_includes/components/sections/cv-projects-personal.njk @@ -0,0 +1,70 @@ +{# + CV Personal Projects Section - filters projects by projectType == "personal" (or unset) + Data fetched from /cv/data.json via homepage plugin +#} + +{% set sectionConfig = section.config or {} %} +{% set maxItems = sectionConfig.maxItems or 10 %} +{% set showTechnologies = sectionConfig.showTechnologies if sectionConfig.showTechnologies is defined else true %} + +{% set personalProjects = [] %} +{% if cv and cv.projects %} + {% for item in cv.projects %} + {% if item.projectType == "personal" or not item.projectType %} + {% set personalProjects = (personalProjects.push(item), personalProjects) %} + {% endif %} + {% endfor %} +{% endif %} + +{% if personalProjects.length %} +
+

+ {{ sectionConfig.title or "Personal Projects" }} +

+ +
+ {% for item in personalProjects | head(maxItems) %} +
+
+

+ {% if item.url %} + {{ item.name }} + {% else %} + {{ item.name }} + {% endif %} +

+ {% if item.status %} + + {{ item.status }} + + {% endif %} +
+ + {% if item.startDate %} +

+ {{ item.startDate }}{% if item.endDate %} – {{ item.endDate }}{% else %} – Present{% endif %} +

+ {% endif %} + + {% if item.description %} +

{{ item.description }}

+ {% endif %} + + {% if showTechnologies and item.technologies and item.technologies.length %} +
+ {% for tech in item.technologies %} + + {{ tech }} + + {% endfor %} +
+ {% endif %} +
+ {% endfor %} +
+
+{% endif %} diff --git a/_includes/components/sections/cv-projects-work.njk b/_includes/components/sections/cv-projects-work.njk new file mode 100644 index 0000000..054e575 --- /dev/null +++ b/_includes/components/sections/cv-projects-work.njk @@ -0,0 +1,70 @@ +{# + CV Work Projects Section - filters projects by projectType == "work" + Data fetched from /cv/data.json via homepage plugin +#} + +{% set sectionConfig = section.config or {} %} +{% set maxItems = sectionConfig.maxItems or 10 %} +{% set showTechnologies = sectionConfig.showTechnologies if sectionConfig.showTechnologies is defined else true %} + +{% set workProjects = [] %} +{% if cv and cv.projects %} + {% for item in cv.projects %} + {% if item.projectType == "work" %} + {% set workProjects = (workProjects.push(item), workProjects) %} + {% endif %} + {% endfor %} +{% endif %} + +{% if workProjects.length %} +
+

+ {{ sectionConfig.title or "Work Projects" }} +

+ +
+ {% for item in workProjects | head(maxItems) %} +
+
+

+ {% if item.url %} + {{ item.name }} + {% else %} + {{ item.name }} + {% endif %} +

+ {% if item.status %} + + {{ item.status }} + + {% endif %} +
+ + {% if item.startDate %} +

+ {{ item.startDate }}{% if item.endDate %} – {{ item.endDate }}{% else %} – Present{% endif %} +

+ {% endif %} + + {% if item.description %} +

{{ item.description }}

+ {% endif %} + + {% if showTechnologies and item.technologies and item.technologies.length %} +
+ {% for tech in item.technologies %} + + {{ tech }} + + {% endfor %} +
+ {% endif %} +
+ {% endfor %} +
+
+{% endif %} diff --git a/cv.njk b/cv.njk index 5ea7afe..b63cee0 100644 --- a/cv.njk +++ b/cv.njk @@ -61,9 +61,9 @@ pagefindIgnore: true {% set section = { type: "cv-skills", config: {} } %} {% include "components/sections/cv-skills.njk" ignore missing %} -{# Projects #} -{% set section = { type: "cv-projects", config: {} } %} -{% include "components/sections/cv-projects.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: {} } %}