mirror of
https://github.com/svemagie/blog-eleventy-indiekit.git
synced 2026-04-02 16:44:56 +02:00
fix: show untyped CV items in both work and personal views
Items without a type field (existing data before type feature was added) were only appearing in "personal" filtered views. Since the /cv/ page uses work-only variants, all existing untyped data was hidden. Changed filtering so untyped items appear in both work and personal views. Also guard cv.skills dictsort in cv.njk against undefined.
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
{% if hasEducation %}
|
||||
<div class="space-y-3 mb-6">
|
||||
{% for item in cv.education %}
|
||||
{% if not filterType or item.educationType == filterType or (filterType == "personal" and not item.educationType) %}
|
||||
{% if not filterType or item.educationType == filterType or not item.educationType %}
|
||||
<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">
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
<div class="space-y-4">
|
||||
{% for item in cv.experience | head(maxItems) %}
|
||||
{% if not filterType or item.experienceType == filterType or (filterType == "personal" and not item.experienceType) %}
|
||||
{% if not filterType or item.experienceType == filterType or not item.experienceType %}
|
||||
<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>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
<div class="flex flex-wrap gap-2">
|
||||
{% 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])) %}
|
||||
{% if not filterType or (cv.interestTypes and cv.interestTypes[interest] == filterType) or not cv.interestTypes or not cv.interestTypes[interest] %}
|
||||
<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>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
||||
{% 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])) %}
|
||||
{% if not filterType or (cv.skillTypes and cv.skillTypes[category] == filterType) or not cv.skillTypes or not cv.skillTypes[category] %}
|
||||
<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 }}
|
||||
|
||||
Reference in New Issue
Block a user