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:
Ricardo
2026-02-20 13:55:52 +01:00
parent f2cc855f3d
commit a54600b003
5 changed files with 5 additions and 5 deletions

View File

@@ -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 }}