From dd27c7bfb5932d8402b1f89984196f8566c14d5e Mon Sep 17 00:00:00 2001 From: BigCoke233 Date: Wed, 17 Dec 2025 12:02:49 +0800 Subject: feat: add webmention to action menu --- layouts/_partials/components/toggle-button.html | 53 +++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 layouts/_partials/components/toggle-button.html (limited to 'layouts/_partials/components/toggle-button.html') diff --git a/layouts/_partials/components/toggle-button.html b/layouts/_partials/components/toggle-button.html new file mode 100644 index 00000000..3aef1509 --- /dev/null +++ b/layouts/_partials/components/toggle-button.html @@ -0,0 +1,53 @@ +{{/* + 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". +*/}} +{{ $id := .id }} +{{ $buttonId := default (printf "%s-toggle" $id) .buttonId }} +{{ $sectionId := default (printf "%s-section" $id) .sectionId }} +{{ $countId := default (printf "%s-count" $id) .countId }} + + + + -- cgit v1.2.3