mirror of
https://github.com/svemagie/blog-eleventy-indiekit.git
synced 2026-04-02 16:44:56 +02:00
Interests are now grouped by category (matching skills pattern).
Updated cv-interests.njk to iterate categories, cv.js fallback to {},
and cv.njk hasCvData check to include interests.
32 lines
1.2 KiB
Plaintext
32 lines
1.2 KiB
Plaintext
{#
|
|
CV Interests Section - interests grouped by category
|
|
Data fetched from /cv/data.json via homepage plugin
|
|
#}
|
|
|
|
{% if cv and cv.interests and (cv.interests | dictsort | 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="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
|
{% for category, items in cv.interests | dictsort %}
|
|
{% if not filterType or (cv.interestTypes and cv.interestTypes[category] == filterType) or not cv.interestTypes or not cv.interestTypes[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 }}
|
|
</h3>
|
|
<div class="flex flex-wrap gap-1.5">
|
|
{% for interest 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">
|
|
{{ interest }}
|
|
</span>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</div>
|
|
</section>
|
|
{% endif %}
|