From 116ac63f5faebb7097e92a9aa7bd0048d10e02b9 Mon Sep 17 00:00:00 2001 From: Ricardo Date: Wed, 25 Feb 2026 12:26:03 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20CV=20page=20hero=20issues=20=E2=80=94=20?= =?UTF-8?q?avatar=20404,=20collapsible=20description,=20interest=20filter,?= =?UTF-8?q?=20contact=20info?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add eleventy:ignore to avatar img to prevent image transform rewriting URL to broken relative path - Wrap authorDescription in details/summary for collapsible "More about me" toggle - Fix interest filter logic: untyped interests no longer bypass work/personal filter - Display location, org, website, email, PGP key from CV identity in hero section --- _includes/components/cv-builder.njk | 38 +++++++++++++++++-- .../components/sections/cv-interests.njk | 3 +- cv.njk | 27 +++++++++++++ 3 files changed, 64 insertions(+), 4 deletions(-) diff --git a/_includes/components/cv-builder.njk b/_includes/components/cv-builder.njk index bb0b608..3d61361 100644 --- a/_includes/components/cv-builder.njk +++ b/_includes/components/cv-builder.njk @@ -14,6 +14,12 @@ {% set authorBio = cvId.bio or site.author.bio %} {% set authorDescription = cvId.description or '' %} {% set socialLinks = cvId.social if (cvId.social and cvId.social.length) else site.social %} +{% set cvLocality = cvId.locality or site.author.locality %} +{% set cvCountry = cvId.country or site.author.country %} +{% set cvOrg = cvId.org or site.author.org %} +{% set cvUrl = cvId.url or '' %} +{% set cvEmail = cvId.email or site.author.email %} +{% set cvKeyUrl = cvId.keyUrl or site.author.keyUrl %} {# Hero — rendered at top when enabled (default: true) #} {% if cvPageConfig.hero.enabled != false %} @@ -24,6 +30,7 @@ alt="{{ authorName }}" class="w-24 h-24 sm:w-32 sm:h-32 rounded-full object-cover shadow-lg flex-shrink-0" loading="eager" + eleventy:ignore >

@@ -40,9 +47,14 @@

{% endif %} {% if authorDescription %} -

- {{ authorDescription }} -

+
+ + More about me ↓ + +

+ {{ authorDescription }} +

+
{% endif %} {% from "components/social-icon.njk" import socialIcon %} {% if cvPageConfig.hero.showSocial != false and socialLinks %} @@ -60,6 +72,26 @@ {% endfor %}

{% endif %} + {# Contact details — location, organization, website, email, PGP #} + {% if cvLocality or cvCountry or cvOrg or cvUrl or cvEmail or cvKeyUrl %} +
+ {% if cvLocality or cvCountry %} + {% if cvLocality %}{{ cvLocality }}{% endif %}{% if cvLocality and cvCountry %}, {% endif %}{% if cvCountry %}{{ cvCountry }}{% endif %} + {% endif %} + {% if cvOrg %} + {{ cvOrg }} + {% endif %} + {% if cvUrl %} + {{ cvUrl | replace("https://", "") | replace("http://", "") }} + {% endif %} + {% if cvEmail %} + {{ cvEmail }} + {% endif %} + {% if cvKeyUrl %} + PGP Key + {% endif %} +
+ {% endif %} diff --git a/_includes/components/sections/cv-interests.njk b/_includes/components/sections/cv-interests.njk index 84467e5..681504a 100644 --- a/_includes/components/sections/cv-interests.njk +++ b/_includes/components/sections/cv-interests.njk @@ -9,9 +9,10 @@ {{ section.config.title or "Interests" }} + {% set hasTypeData = cv.interestTypes and (cv.interestTypes | dictsort | length > 0) %}
{% for interest in cv.interests %} - {% if not filterType or (cv.interestTypes and cv.interestTypes[interest] == filterType) or not cv.interestTypes or not cv.interestTypes[interest] %} + {% if not filterType or (hasTypeData and cv.interestTypes[interest] == filterType) or not hasTypeData %} {{ interest }} diff --git a/cv.njk b/cv.njk index 2e2f9d8..ead9112 100644 --- a/cv.njk +++ b/cv.njk @@ -28,6 +28,12 @@ pagefindIgnore: true {% set authorTitle = cvId.title or site.author.title %} {% set authorBio = cvId.bio or site.author.bio %} {% set socialLinks = cvId.social if (cvId.social and cvId.social.length) else site.social %} + {% set cvLocality = cvId.locality or site.author.locality %} + {% set cvCountry = cvId.country or site.author.country %} + {% set cvOrg = cvId.org or site.author.org %} + {% set cvUrl = cvId.url or '' %} + {% set cvEmail = cvId.email or site.author.email %} + {% set cvKeyUrl = cvId.keyUrl or site.author.keyUrl %} {# Hero / intro #}
@@ -37,6 +43,7 @@ pagefindIgnore: true alt="{{ authorName }}" class="w-24 h-24 sm:w-32 sm:h-32 rounded-full object-cover shadow-lg flex-shrink-0" loading="eager" + eleventy:ignore >

@@ -68,6 +75,26 @@ pagefindIgnore: true {% endfor %}

{% endif %} + {# Contact details #} + {% if cvLocality or cvCountry or cvOrg or cvUrl or cvEmail or cvKeyUrl %} +
+ {% if cvLocality or cvCountry %} + {% if cvLocality %}{{ cvLocality }}{% endif %}{% if cvLocality and cvCountry %}, {% endif %}{% if cvCountry %}{{ cvCountry }}{% endif %} + {% endif %} + {% if cvOrg %} + {{ cvOrg }} + {% endif %} + {% if cvUrl %} + {{ cvUrl | replace("https://", "") | replace("http://", "") }} + {% endif %} + {% if cvEmail %} + {{ cvEmail }} + {% endif %} + {% if cvKeyUrl %} + PGP Key + {% endif %} +
+ {% endif %}