From e7aaf73fba7ec3bd287f3204c0b0ae5bb4dff707 Mon Sep 17 00:00:00 2001 From: Ricardo Date: Fri, 6 Mar 2026 10:42:39 +0100 Subject: [PATCH] feat: consistent AP logo, Mastodon syndication detection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replace network-diagram SVG with official ActivityPub logo in post footer - Replace person-plus SVG with AP logo in fediverse follow widget - Replace Mastodon icon with AP logo in share widget, use #a730b8 purple - AP icon brand color: #f1027e → #a730b8 in social-icon macro - Detect Mastodon syndication URLs (/@username pattern) for proper logo pill Confab-Link: http://localhost:8080/sessions/c5b1471e-b046-44d9-b94f-ab5e68fae7cc --- _includes/components/social-icon.njk | 2 +- .../components/widgets/fediverse-follow.njk | 4 +-- _includes/components/widgets/share.njk | 6 ++-- _includes/layouts/post.njk | 36 +++++++++++++++++-- 4 files changed, 38 insertions(+), 10 deletions(-) diff --git a/_includes/components/social-icon.njk b/_includes/components/social-icon.njk index 54638b2..bdbe67c 100644 --- a/_includes/components/social-icon.njk +++ b/_includes/components/social-icon.njk @@ -11,7 +11,7 @@ {# Returns Tailwind color classes for an icon's brand color (light + dark) #} {% macro socialIconColorClass(name) %} -{%- if name == "activitypub" -%}text-[#f1027e] +{%- if name == "activitypub" -%}text-[#a730b8] {%- elif name == "github" -%}text-[#181717] dark:text-[#e6edf3] {%- elif name == "gitlab" -%}text-[#FC6D26] {%- elif name == "forgejo" -%}text-[#609926] diff --git a/_includes/components/widgets/fediverse-follow.njk b/_includes/components/widgets/fediverse-follow.njk index 10d081f..3a0d9c1 100644 --- a/_includes/components/widgets/fediverse-follow.njk +++ b/_includes/components/widgets/fediverse-follow.njk @@ -25,9 +25,7 @@ @click="handleClick($event)" class="inline-flex items-center gap-2 px-4 py-2 rounded-lg bg-[#a730b8]/10 text-[#a730b8] hover:bg-[#a730b8]/20 transition-colors text-sm font-medium cursor-pointer" title="Follow from your fediverse instance (Shift+click to change)"> - + Follow on the Fediverse {% set modalTitle = "Follow on the Fediverse" %} diff --git a/_includes/components/widgets/share.njk b/_includes/components/widgets/share.njk index 0c8d9b1..472f6b3 100644 --- a/_includes/components/widgets/share.njk +++ b/_includes/components/widgets/share.njk @@ -16,10 +16,10 @@ + class="w-full inline-flex items-center justify-center gap-2 px-3 py-2 rounded-lg bg-[#a730b8]/10 text-[#a730b8] hover:bg-[#a730b8]/20 transition-colors text-sm font-medium cursor-pointer" + title="Share on the Fediverse (Shift+click to change instance)"> {% set modalTitle = "Share on Mastodon / Fediverse" %} diff --git a/_includes/layouts/post.njk b/_includes/layouts/post.njk index 8e61378..92a22f2 100644 --- a/_includes/layouts/post.njk +++ b/_includes/layouts/post.njk @@ -125,9 +125,7 @@ withBlogSidebar: true rel="syndication" title="Interact from your fediverse instance (Shift+click to change)" @click="handleClick($event)"> - + Fediverse {% set modalTitle = "Fediverse Interaction" %} @@ -166,6 +164,16 @@ withBlogSidebar: true IndieNews + {% elif "/@" in url %} + {# Mastodon-compatible instance (any URL with /@username pattern) #} + {% set mastoHandle = url | replace("https://", "") | replace("http://", "") %} + {% set mastoHandle = mastoHandle.split("/")[0] + "/" + mastoHandle.split("/")[1] %} + + + {{ mastoHandle }} + {% else %} + {# Pagefind filter metadata — hidden elements for search filtering #} + + {# JSON-LD Structured Data for SEO #} {# Handle photo as potentially an array #} {% set postImage = photo %}