From 7514e97029bc9cdba7c4e0f60c0711e442cd718a 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 Former-commit-id: 385e36dbef14d6a3d24685dc032a70c3d0d16b8b --- layouts/_partials/components/toggle-button.html | 22 ++---- .../posts/action-menu/webmention-button.html | 17 ++--- .../posts/action-menu/webmention-section.html | 86 ++++++++++++++++++---- 3 files changed, 83 insertions(+), 42 deletions(-) (limited to 'layouts') diff --git a/layouts/_partials/components/toggle-button.html b/layouts/_partials/components/toggle-button.html index 2b1de2f9..29e3440e 100644 --- a/layouts/_partials/components/toggle-button.html +++ b/layouts/_partials/components/toggle-button.html @@ -1,20 +1,8 @@ -{{/* - Reusable Toggle Button Component - - Parameters: - - id: (string) Unique identifier for the button group (e.g. "comments"). - Used to generate IDs: {id}-toggle, {id}-section, {id}-count. - - title: (string) Tooltip title. - - icon: (string) Path to the icon image. - - countId: (string, optional) Override for count element ID. Defaults to "{id}-count". - - sectionId: (string, optional) Override for section element ID. Defaults to "{id}-section". - - buttonId: (string, optional) Override for button element ID. Defaults to "{id}-toggle". - - group: (string, optional) Mutual exclusion group name. If provided, opening this toggle will close others in the same group. -*/}} {{ $id := .id }} {{ $buttonId := default (printf "%s-toggle" $id) .buttonId }} {{ $sectionId := default (printf "%s-section" $id) .sectionId }} {{ $countId := default (printf "%s-count" $id) .countId }} +{{ $count := default "..." .count }} {{ $group := .group }} 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 @@