From 0beb9bb5ff432fd1cd49d93304de9481c771da52 Mon Sep 17 00:00:00 2001 From: Eltrac Date: Sat, 27 Sep 2025 14:18:34 +0800 Subject: refactor: separate action menu into modules Former-commit-id: a6b8fe66a76f71757c71669db6337a007b2eab5d --- layouts/_partials/posts/action-menu.html | 61 ++-------------------- .../posts/action-menu/comment-button.html | 7 +++ .../_partials/posts/action-menu/info-links.html | 18 +++++++ .../_partials/posts/action-menu/like-button.html | 26 +++++++++ 4 files changed, 56 insertions(+), 56 deletions(-) create mode 100644 layouts/_partials/posts/action-menu/comment-button.html create mode 100644 layouts/_partials/posts/action-menu/info-links.html create mode 100644 layouts/_partials/posts/action-menu/like-button.html diff --git a/layouts/_partials/posts/action-menu.html b/layouts/_partials/posts/action-menu.html index d05a61d1..740d7902 100644 --- a/layouts/_partials/posts/action-menu.html +++ b/layouts/_partials/posts/action-menu.html @@ -1,67 +1,16 @@
- +
- - - -
- -
-
- - {{ if eq .Site.Language.Lang "zh" }} -
- - {{ T - - - {{ T - + {{ partial "posts/action-menu/comment-button" . }} + {{ partial "posts/action-menu/like-button" . }} + {{ partial "posts/action-menu/info-links" . }}
- {{ end }}
- - +
- - diff --git a/layouts/_partials/posts/action-menu/comment-button.html b/layouts/_partials/posts/action-menu/comment-button.html new file mode 100644 index 00000000..bc079a4f --- /dev/null +++ b/layouts/_partials/posts/action-menu/comment-button.html @@ -0,0 +1,7 @@ + diff --git a/layouts/_partials/posts/action-menu/info-links.html b/layouts/_partials/posts/action-menu/info-links.html new file mode 100644 index 00000000..f1547d81 --- /dev/null +++ b/layouts/_partials/posts/action-menu/info-links.html @@ -0,0 +1,18 @@ +{{ if eq .Site.Language.Lang "zh" }} +
+ + {{ T + + + {{ T + +
+{{ end }} diff --git a/layouts/_partials/posts/action-menu/like-button.html b/layouts/_partials/posts/action-menu/like-button.html new file mode 100644 index 00000000..c4c50c91 --- /dev/null +++ b/layouts/_partials/posts/action-menu/like-button.html @@ -0,0 +1,26 @@ + +
+ +
+ + -- cgit v1.2.3