summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--layouts/_partials/posts/action-menu.html12
-rw-r--r--layouts/_partials/posts/webmention-summary.html (renamed from layouts/_partials/posts/webmention-likes.html)2
2 files changed, 8 insertions, 6 deletions
diff --git a/layouts/_partials/posts/action-menu.html b/layouts/_partials/posts/action-menu.html
index 9358ce0d..b5204bc2 100644
--- a/layouts/_partials/posts/action-menu.html
+++ b/layouts/_partials/posts/action-menu.html
@@ -14,17 +14,19 @@
{{ end }}
{{ end }}
-<div id="action-menu" class="my-4 mb-5">
- {{ partial "posts/webmention-likes" (dict
+<details class="my-4 mb-5">
+ <summary class="cursor-pointer">
+ {{ partial "posts/webmention-summary" (dict
"likes" $likes
"page" .
"othercount" (add (len $replies) (len $mentions))
- ) }}
- <div id="webmention-collapse" class="hidden">
+ ) }}
+ </summary>
+ <div id="webmention-details">
{{ partial "posts/webmention-replies" $replies }}
{{ partial "posts/webmention-mentions" $mentions }}
</div>
<!-- kept for legacy pages -->
{{ partial "posts/comment" . }}
-</div>
+</details>
diff --git a/layouts/_partials/posts/webmention-likes.html b/layouts/_partials/posts/webmention-summary.html
index 54fcef4a..65bd8b31 100644
--- a/layouts/_partials/posts/webmention-likes.html
+++ b/layouts/_partials/posts/webmention-summary.html
@@ -35,7 +35,7 @@
<div class="text-secondary m-0 text-sm inline ml-2">
{{ printf (T "webmention.likedBy") (len $likes ) }}
{{ if gt $othercount 0 }}
- <a id="toggle-webmentions" class="cursor-pointer" onclick="document.getElementById('webmention-collapse').classList.toggle('hidden')">{{ printf (T "webmention.repliedAndMentionedBy") $othercount }}</a>
+ {{ printf (T "webmention.repliedAndMentionedBy") $othercount }}
{{ end }}
</div>
<div class="clear-left"></div>