From 385e36dbef14d6a3d24685dc032a70c3d0d16b8b Mon Sep 17 00:00:00 2001 From: BigCoke233 Date: Tue, 6 Jan 2026 00:29:30 +0800 Subject: feat: new webmention section with better support for replies, likes and mentions --- .../posts/action-menu/webmention-button.html | 17 ++--- .../posts/action-menu/webmention-section.html | 86 ++++++++++++++++++---- 2 files changed, 78 insertions(+), 25 deletions(-) (limited to 'layouts/_partials/posts') diff --git a/layouts/_partials/posts/action-menu/webmention-button.html b/layouts/_partials/posts/action-menu/webmention-button.html index 190b0f8b..aba5891f 100644 --- a/layouts/_partials/posts/action-menu/webmention-button.html +++ b/layouts/_partials/posts/action-menu/webmention-button.html @@ -1,18 +1,13 @@ +{{ $webmentions := index .Site.Data.webmentions .RelPermalink }} +{{ $count := 0 }} +{{ with $webmentions }} + {{ $count = len $webmentions }} +{{ end }} {{ partial "components/toggle-button.html" (dict "id" "webmention" "title" (T "actionMenu.webmention") "icon" "/img/mention.svg" "countId" "mention-count" + "count" $count "group" "action-menu-section" ) }} - - diff --git a/layouts/_partials/posts/action-menu/webmention-section.html b/layouts/_partials/posts/action-menu/webmention-section.html index 55588444..441e2491 100644 --- a/layouts/_partials/posts/action-menu/webmention-section.html +++ b/layouts/_partials/posts/action-menu/webmention-section.html @@ -1,27 +1,85 @@