From 240206a5eb6e1bae0705de607ce94da89a79e9f2 Mon Sep 17 00:00:00 2001 From: Eltrac Date: Mon, 13 Oct 2025 09:34:25 +0800 Subject: refactor: move all action menu js to individual modules Former-commit-id: 9b33cfcc8fd8cc52d09c599efd06108b1e35d0d7 --- .../posts/action-menu/comment-button.html | 86 +++++++---- .../_partials/posts/action-menu/like-button.html | 122 ++++++++++++++- layouts/_partials/scripts.html | 4 - layouts/_partials/scripts/action-menu-js.html | 170 --------------------- 4 files changed, 177 insertions(+), 205 deletions(-) delete mode 100644 layouts/_partials/scripts/action-menu-js.html diff --git a/layouts/_partials/posts/action-menu/comment-button.html b/layouts/_partials/posts/action-menu/comment-button.html index 563bf4bd..d646ca27 100644 --- a/layouts/_partials/posts/action-menu/comment-button.html +++ b/layouts/_partials/posts/action-menu/comment-button.html @@ -1,4 +1,3 @@ -{{ /* button html */}} -{{ /* button functionality */}} diff --git a/layouts/_partials/posts/action-menu/like-button.html b/layouts/_partials/posts/action-menu/like-button.html index c4c50c91..c9e793b8 100644 --- a/layouts/_partials/posts/action-menu/like-button.html +++ b/layouts/_partials/posts/action-menu/like-button.html @@ -1,17 +1,18 @@ +{{ $pageID := .File.UniqueID | urlize }} -
+
@@ -24,3 +25,114 @@ color: #8B0000 !important; } + + diff --git a/layouts/_partials/scripts.html b/layouts/_partials/scripts.html index 2b84ea3c..edfb51b3 100644 --- a/layouts/_partials/scripts.html +++ b/layouts/_partials/scripts.html @@ -14,7 +14,3 @@ {{ partial "scripts/littlefoot-js" . }} {{ partial "scripts/libra-js" . }} {{ partial "scripts/aplayer-js" . }} - -{{ if .File }} - {{ partial "scripts/action-menu-js" (.File.UniqueID | urlize) }} -{{ end }} diff --git a/layouts/_partials/scripts/action-menu-js.html b/layouts/_partials/scripts/action-menu-js.html deleted file mode 100644 index dca99369..00000000 --- a/layouts/_partials/scripts/action-menu-js.html +++ /dev/null @@ -1,170 +0,0 @@ -{{ $pageId := . }} - -- cgit v1.2.3