diff --git a/_includes/components/blog-sidebar.njk b/_includes/components/blog-sidebar.njk index 6efa989..3f90f5d 100644 --- a/_includes/components/blog-sidebar.njk +++ b/_includes/components/blog-sidebar.njk @@ -1,10 +1,28 @@ {# Blog Sidebar - Shown on individual post pages #} {# Contains: Author compact card, Related posts, Categories, Recent posts #} -{# Author Compact Card - includes h-card component #} +{# Author Compact Card - h-card microformat (compact version) #}
- {% set hcardVariant = "compact" %} - {% include "components/h-card.njk" %} +
+ + {{ site.author.name }} + +
+ + {{ site.author.name }} + +

{{ site.author.title }}

+ {% if site.author.locality %} +

{{ site.author.locality }}{% if site.author.country %}, {{ site.author.country }}{% endif %}

+ {% endif %} +
+
+
{# Post Navigation Widget - Previous/Next #} diff --git a/_includes/components/h-card.njk b/_includes/components/h-card.njk index e984ccc..73fccaf 100644 --- a/_includes/components/h-card.njk +++ b/_includes/components/h-card.njk @@ -1,109 +1,116 @@ -{# h-card - Single source of truth for IndieWeb identity microformat #} +{# h-card - IndieWeb identity microformat #} {# See: https://microformats.org/wiki/h-card #} -{# - Usage: - {% include "components/h-card.njk" %} {# defaults to full #} - {% set hcardVariant = "full" %}{% include "components/h-card.njk" %} - {% set hcardVariant = "compact" %}{% include "components/h-card.njk" %} -#} - -{% set variant = hcardVariant | default("full") %}
- {# Hidden u-photo for reliable microformat parsing (some parsers struggle with img inside links) #} - + {# Avatar - visible for h-card validation #} + + + {# Name #} + + {{ site.author.name }} + + + {# Pronouns #} + {% if site.author.pronoun %} + ({{ site.author.pronoun }}) + {% endif %} + + {# Job title #} + {% if site.author.title %} + + {{ site.author.title }} + + {% endif %} - {% if variant == "full" %} - {# ===== FULL VARIANT - Homepage sidebar ===== #} -
- - {{ site.author.name }} - -
- - {{ site.author.name }} - - {% if site.author.pronoun %} - ({{ site.author.pronoun }}) - {% endif %} -

{{ site.author.title }}

- {# Structured address #} -

- {% if site.author.locality %} - {{ site.author.locality }}{% if site.author.country %}, {% endif %} - {% endif %} - {% if site.author.country %} - {{ site.author.country }} - {% endif %} - {# Fallback to legacy location #} - {% if not site.author.locality and site.author.location %} - {{ site.author.location }} - {% endif %} -

-
-
- {# Bio #} -

{{ site.author.bio }}

{# Organization #} {% if site.author.org %} -

- {{ site.author.org }} + + @ {{ site.author.org }} + + {% endif %} + + {# Bio / Note #} + {% if site.author.bio %} +

+ {{ site.author.bio }}

{% endif %} - {# Email and PGP Key #} -
- {% if site.author.email %} - - {{ site.author.email }} - + + {# Location - structured address #} +
+ {% if site.author.locality %} + {{ site.author.locality }}{% if site.author.region or site.author.country %}, {% endif %} {% endif %} - {% if site.author.keyUrl %} - - PGP Key - + {% if site.author.region %} + {{ site.author.region }}{% if site.author.country %}, {% endif %} + {% endif %} + {% if site.author.country %} + {{ site.author.country }} + {% endif %} + {# Fallback to legacy location field if structured fields not set #} + {% if not site.author.locality and not site.author.region and not site.author.country and site.author.location %} + {{ site.author.location }} {% endif %}
+ + {# Email #} + {% if site.author.email %} + + {{ site.author.email }} + + {% endif %} + + {# PGP Key #} + {% if site.author.keyUrl %} + + 🔐 PGP Key + + {% endif %} + {# Categories / Skills #} {% if site.author.categories and site.author.categories.length %} -
+
{% for category in site.author.categories %} {{ category }} {% endfor %}
{% endif %} - {% else %} - {# ===== COMPACT VARIANT - Blog sidebar ===== #} -
- - {{ site.author.name }} - -
- - {{ site.author.name }} - -

{{ site.author.title }}

- {% if site.author.locality %} -

- {{ site.author.locality }}{% if site.author.country %}, {{ site.author.country }}{% endif %} -

+ {# Social links with rel="me" #} +
-
- {# Hidden but present for microformat completeness #} - - {% if site.author.email %}{% endif %} - {% if site.author.org %}{% endif %} - {% endif %} + + {% endfor %} +
diff --git a/_includes/components/sidebar.njk b/_includes/components/sidebar.njk index ff8b65b..f0818b2 100644 --- a/_includes/components/sidebar.njk +++ b/_includes/components/sidebar.njk @@ -1,10 +1,72 @@ {# Sidebar Components #} {# Contains: Author card, Bluesky feed, GitHub repos, RSS feed #} -{# Author Card Widget - includes h-card component #} +{# Author Card Widget - Full h-card microformat #}
- {% set hcardVariant = "full" %} - {% include "components/h-card.njk" %} +
+
+ + {{ site.author.name }} + +
+ + {{ site.author.name }} + + {% if site.author.pronoun %} + ({{ site.author.pronoun }}) + {% endif %} +

{{ site.author.title }}

+ {# Structured address #} +

+ {% if site.author.locality %} + {{ site.author.locality }}{% if site.author.country %}, {% endif %} + {% endif %} + {% if site.author.country %} + {{ site.author.country }} + {% endif %} + {# Fallback to legacy location #} + {% if not site.author.locality and site.author.location %} + {{ site.author.location }} + {% endif %} +

+
+
+ {# Bio #} +

{{ site.author.bio }}

+ {# Organization #} + {% if site.author.org %} +

+ {{ site.author.org }} +

+ {% endif %} + {# Email and PGP Key #} +
+ {% if site.author.email %} + + ✉️ {{ site.author.email }} + + {% endif %} + {% if site.author.keyUrl %} + + 🔐 PGP Key + + {% endif %} +
+ {# Categories / Skills #} + {% if site.author.categories and site.author.categories.length %} +
+ {% for category in site.author.categories %} + {{ category }} + {% endfor %} +
+ {% endif %} +
{# Social Feed Widget - Tabbed Bluesky/Mastodon #}