From 8086ee5af283fc2736f417d31f90b8910991c9ab Mon Sep 17 00:00:00 2001 From: eltrac Date: Fri, 1 May 2026 12:05:25 +0800 Subject: feat: new interaction area --- layouts/_partials/posts/interaction.html | 41 +++++++++++++++++++++++++++++++ layouts/_partials/posts/like.html | 2 +- layouts/_partials/scripts.html | 6 +++++ layouts/_partials/template/post-page.html | 2 +- layouts/fiction/page.html | 2 +- layouts/library/page.html | 2 +- static/icons/mail.svg | 29 ++++++++++++++++++++++ 7 files changed, 80 insertions(+), 4 deletions(-) create mode 100644 layouts/_partials/posts/interaction.html create mode 100644 static/icons/mail.svg diff --git a/layouts/_partials/posts/interaction.html b/layouts/_partials/posts/interaction.html new file mode 100644 index 0000000..610a26d --- /dev/null +++ b/layouts/_partials/posts/interaction.html @@ -0,0 +1,41 @@ +{{ $itemClasses := "font-mono" }} +{{ $itemLinkClasses := "inline-flex items-center gap-2 hover:no-underline opactiy-50" }} + +
+ +
+
+ {{ partial "posts/like" . }} +
+
+ +
+ {{ $fedipost := or .Params.toot .Params.fedi }} + {{ with $fedipost }} + + ⁂ Fediverse + + {{ end }} +
+
+
+ +
+

「極客死亡計劃」没有评论区,你可以前往联邦宇宙参与讨论,或者给我发邮件。本站也支持 Webmention 规范,如果你写了一篇文章回应此文,可以去这里用表单提交。目前只有 Webmention 会显示在网站上。

+ +
+ diff --git a/layouts/_partials/posts/like.html b/layouts/_partials/posts/like.html index a1874b3..32b7355 100644 --- a/layouts/_partials/posts/like.html +++ b/layouts/_partials/posts/like.html @@ -2,7 +2,7 @@ diff --git a/layouts/_partials/scripts.html b/layouts/_partials/scripts.html index b21a88f..145076f 100644 --- a/layouts/_partials/scripts.html +++ b/layouts/_partials/scripts.html @@ -9,6 +9,12 @@ document.addEventListener("DOMContentLoaded", () => { }) + + {{ $commonJS := slice (resources.Get "js/tooltip.js") diff --git a/layouts/_partials/template/post-page.html b/layouts/_partials/template/post-page.html index 0b55d48..144c64d 100644 --- a/layouts/_partials/template/post-page.html +++ b/layouts/_partials/template/post-page.html @@ -36,7 +36,7 @@ {{ partial "content" . }} - {{ partial "posts/webmention" . }} + {{ partial "posts/interaction" . }} {{ partial "posts/comment" . }} diff --git a/layouts/fiction/page.html b/layouts/fiction/page.html index 37e91c8..490f106 100644 --- a/layouts/fiction/page.html +++ b/layouts/fiction/page.html @@ -17,7 +17,7 @@ {{ partial "content" . }} - {{ partial "posts/webmention" . }} + {{ partial "posts/interaction" . }} {{ partial "components/back-to-top" . }} {{ partial "components/microformats" . }} diff --git a/layouts/library/page.html b/layouts/library/page.html index dd7c220..00bb94f 100644 --- a/layouts/library/page.html +++ b/layouts/library/page.html @@ -30,7 +30,7 @@ {{ partial "components/backlinks" (dict "filename" .File.BaseFileName "type" "library" "context" .) }} - {{ partial "posts/webmention" . }} + {{ partial "posts/interaction" . }} {{ partial "components/back-to-top.html" . }} {{ partial "components/microformats" . }} diff --git a/static/icons/mail.svg b/static/icons/mail.svg new file mode 100644 index 0000000..c3367a9 --- /dev/null +++ b/static/icons/mail.svg @@ -0,0 +1,29 @@ + + + + + + + + + + + \ No newline at end of file -- cgit v1.2.3