feat: add CV section partials for homepage builder
- cv-experience.njk: work history timeline with highlights - cv-skills.njk: skills grid grouped by category - cv-education.njk: education cards + language pills - cv-projects.njk: project cards with status badges and tech tags - cv-interests.njk: interest tag cloud - Update homepage-builder.njk to include cv-education and cv-interests Part of indiekit-endpoint-cv plugin integration (Phase 2). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -21,6 +21,10 @@
|
||||
{% include "components/sections/cv-projects.njk" ignore missing %}
|
||||
{% elif section.type == "cv-skills" %}
|
||||
{% include "components/sections/cv-skills.njk" ignore missing %}
|
||||
{% elif section.type == "cv-education" %}
|
||||
{% include "components/sections/cv-education.njk" ignore missing %}
|
||||
{% elif section.type == "cv-interests" %}
|
||||
{% include "components/sections/cv-interests.njk" ignore missing %}
|
||||
{% elif section.type == "blogroll" %}
|
||||
{% include "components/sections/blogroll.njk" ignore missing %}
|
||||
{% elif section.type == "podroll" %}
|
||||
|
||||
42
_includes/components/sections/cv-education.njk
Normal file
42
_includes/components/sections/cv-education.njk
Normal file
@@ -0,0 +1,42 @@
|
||||
{#
|
||||
CV Education & Languages Section
|
||||
Data fetched from /cv/data.json via homepage plugin
|
||||
#}
|
||||
|
||||
{% set hasEducation = cv and cv.education and cv.education.length %}
|
||||
{% set hasLanguages = cv and cv.languages and cv.languages.length %}
|
||||
|
||||
{% if hasEducation or hasLanguages %}
|
||||
<section class="mb-8 sm:mb-12" id="education">
|
||||
<h2 class="text-xl sm:text-2xl font-bold text-surface-900 dark:text-surface-100 mb-4 sm:mb-6">
|
||||
{{ section.config.title or "Education & Languages" }}
|
||||
</h2>
|
||||
|
||||
{% if hasEducation %}
|
||||
<div class="space-y-3 mb-6">
|
||||
{% for item in cv.education %}
|
||||
<div class="p-4 bg-white dark:bg-surface-800 rounded-lg border border-surface-200 dark:border-surface-700">
|
||||
<h3 class="font-semibold text-surface-900 dark:text-surface-100">{{ item.degree }}</h3>
|
||||
<p class="text-sm text-surface-600 dark:text-surface-400">
|
||||
{{ item.institution }}{% if item.location %} · {{ item.location }}{% endif %}{% if item.year %} · {{ item.year }}{% endif %}
|
||||
</p>
|
||||
{% if item.description %}
|
||||
<p class="text-sm text-surface-700 dark:text-surface-300 mt-1">{{ item.description }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if hasLanguages %}
|
||||
<div class="flex flex-wrap gap-3">
|
||||
{% for lang in cv.languages %}
|
||||
<div class="flex items-center gap-2 px-3 py-1.5 bg-white dark:bg-surface-800 rounded-full border border-surface-200 dark:border-surface-700">
|
||||
<span class="font-medium text-sm text-surface-900 dark:text-surface-100">{{ lang.name }}</span>
|
||||
<span class="text-xs text-surface-500 capitalize">{{ lang.level }}</span>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</section>
|
||||
{% endif %}
|
||||
47
_includes/components/sections/cv-experience.njk
Normal file
47
_includes/components/sections/cv-experience.njk
Normal file
@@ -0,0 +1,47 @@
|
||||
{#
|
||||
CV Experience Section - work experience timeline
|
||||
Data fetched from /cv/data.json via homepage plugin
|
||||
#}
|
||||
|
||||
{% set sectionConfig = section.config or {} %}
|
||||
{% set maxItems = sectionConfig.maxItems or 10 %}
|
||||
{% set showHighlights = sectionConfig.showHighlights if sectionConfig.showHighlights is defined else true %}
|
||||
|
||||
{% if cv and cv.experience and cv.experience.length %}
|
||||
<section class="mb-8 sm:mb-12" id="experience">
|
||||
<h2 class="text-xl sm:text-2xl font-bold text-surface-900 dark:text-surface-100 mb-4 sm:mb-6">
|
||||
{{ sectionConfig.title or "Experience" }}
|
||||
</h2>
|
||||
|
||||
<div class="space-y-4">
|
||||
{% for item in cv.experience | head(maxItems) %}
|
||||
<div class="relative pl-6 border-l-2 border-primary-300 dark:border-primary-700">
|
||||
<div class="absolute -left-[7px] top-1 w-3 h-3 rounded-full bg-primary-500"></div>
|
||||
<h3 class="font-semibold text-surface-900 dark:text-surface-100">{{ item.title }}</h3>
|
||||
<p class="text-sm text-surface-600 dark:text-surface-400">
|
||||
{{ item.company }}{% if item.location %} · {{ item.location }}{% endif %}
|
||||
{% if item.type %} · <span class="capitalize">{{ item.type }}</span>{% endif %}
|
||||
</p>
|
||||
{% if item.startDate %}
|
||||
<p class="text-xs text-surface-500 mt-0.5">
|
||||
{{ item.startDate }}{% if item.endDate %} – {{ item.endDate }}{% else %} – Present{% endif %}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if item.description %}
|
||||
<p class="text-sm text-surface-700 dark:text-surface-300 mt-2">{{ item.description }}</p>
|
||||
{% endif %}
|
||||
{% if showHighlights and item.highlights and item.highlights.length %}
|
||||
<ul class="mt-2 space-y-1">
|
||||
{% for h in item.highlights %}
|
||||
<li class="text-sm text-surface-600 dark:text-surface-400 flex items-start gap-1.5">
|
||||
<span class="text-primary-500 mt-1 shrink-0">•</span>
|
||||
{{ h }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</section>
|
||||
{% endif %}
|
||||
20
_includes/components/sections/cv-interests.njk
Normal file
20
_includes/components/sections/cv-interests.njk
Normal file
@@ -0,0 +1,20 @@
|
||||
{#
|
||||
CV Interests Section - interest tags
|
||||
Data fetched from /cv/data.json via homepage plugin
|
||||
#}
|
||||
|
||||
{% if cv and cv.interests and cv.interests.length %}
|
||||
<section class="mb-8 sm:mb-12" id="interests">
|
||||
<h2 class="text-xl sm:text-2xl font-bold text-surface-900 dark:text-surface-100 mb-4 sm:mb-6">
|
||||
{{ section.config.title or "Interests" }}
|
||||
</h2>
|
||||
|
||||
<div class="flex flex-wrap gap-2">
|
||||
{% for interest in cv.interests %}
|
||||
<span class="px-3 py-1.5 bg-white dark:bg-surface-800 border border-surface-200 dark:border-surface-700 rounded-full text-sm text-surface-700 dark:text-surface-300 hover:border-primary-400 dark:hover:border-primary-600 transition-colors">
|
||||
{{ interest }}
|
||||
</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</section>
|
||||
{% endif %}
|
||||
55
_includes/components/sections/cv-projects.njk
Normal file
55
_includes/components/sections/cv-projects.njk
Normal file
@@ -0,0 +1,55 @@
|
||||
{#
|
||||
CV Projects Section - project cards
|
||||
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 %}
|
||||
|
||||
{% if cv and cv.projects and cv.projects.length %}
|
||||
<section class="mb-8 sm:mb-12" id="projects">
|
||||
<h2 class="text-xl sm:text-2xl font-bold text-surface-900 dark:text-surface-100 mb-4 sm:mb-6">
|
||||
{{ sectionConfig.title or "Projects" }}
|
||||
</h2>
|
||||
|
||||
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
||||
{% for item in cv.projects | head(maxItems) %}
|
||||
<div class="p-4 bg-white dark:bg-surface-800 rounded-lg border border-surface-200 dark:border-surface-700 hover:border-primary-400 dark:hover:border-primary-600 transition-colors">
|
||||
<div class="flex items-start justify-between gap-2 mb-1">
|
||||
<h3 class="font-semibold text-surface-900 dark:text-surface-100">
|
||||
{% if item.url %}
|
||||
<a href="{{ item.url }}" class="hover:text-primary-600 dark:hover:text-primary-400">{{ item.name }}</a>
|
||||
{% else %}
|
||||
{{ item.name }}
|
||||
{% endif %}
|
||||
</h3>
|
||||
{% if item.status %}
|
||||
<span class="shrink-0 text-xs px-2 py-0.5 rounded-full capitalize
|
||||
{% if item.status == 'active' %}bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-300
|
||||
{% elif item.status == 'maintained' %}bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300
|
||||
{% elif item.status == 'archived' %}bg-surface-100 dark:bg-surface-700 text-surface-600 dark:text-surface-400
|
||||
{% else %}bg-surface-100 dark:bg-surface-700 text-surface-600 dark:text-surface-400{% endif %}">
|
||||
{{ item.status }}
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if item.description %}
|
||||
<p class="text-sm text-surface-600 dark:text-surface-400 mb-2">{{ item.description }}</p>
|
||||
{% endif %}
|
||||
|
||||
{% if showTechnologies and item.technologies and item.technologies.length %}
|
||||
<div class="flex flex-wrap gap-1">
|
||||
{% for tech in item.technologies %}
|
||||
<span class="text-xs px-2 py-0.5 bg-surface-100 dark:bg-surface-700 text-surface-600 dark:text-surface-400 rounded">
|
||||
{{ tech }}
|
||||
</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</section>
|
||||
{% endif %}
|
||||
29
_includes/components/sections/cv-skills.njk
Normal file
29
_includes/components/sections/cv-skills.njk
Normal file
@@ -0,0 +1,29 @@
|
||||
{#
|
||||
CV Skills Section - skills grouped by category
|
||||
Data fetched from /cv/data.json via homepage plugin
|
||||
#}
|
||||
|
||||
{% if cv and cv.skills and (cv.skills | dictsort | length) %}
|
||||
<section class="mb-8 sm:mb-12" id="skills">
|
||||
<h2 class="text-xl sm:text-2xl font-bold text-surface-900 dark:text-surface-100 mb-4 sm:mb-6">
|
||||
{{ section.config.title or "Skills" }}
|
||||
</h2>
|
||||
|
||||
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
||||
{% for category, items in cv.skills | dictsort %}
|
||||
<div class="p-4 bg-white dark:bg-surface-800 rounded-lg border border-surface-200 dark:border-surface-700">
|
||||
<h3 class="font-semibold text-sm uppercase tracking-wide text-surface-600 dark:text-surface-400 mb-2">
|
||||
{{ category }}
|
||||
</h3>
|
||||
<div class="flex flex-wrap gap-1.5">
|
||||
{% for skill in items %}
|
||||
<span class="text-xs px-2 py-1 bg-primary-50 dark:bg-primary-900/30 text-primary-700 dark:text-primary-300 rounded-full">
|
||||
{{ skill }}
|
||||
</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</section>
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user