diff options
| author | eltrac <hi@eltr.ac> | 2026-05-01 12:56:02 +0800 |
|---|---|---|
| committer | eltrac <hi@eltr.ac> | 2026-05-01 12:56:02 +0800 |
| commit | 300c4ec51a56079ef71fe5d7cb7062b3cbe01c44 (patch) | |
| tree | 243eac0434dc5370d745664c21d08ddcce1eb36f | |
| parent | c2e1756510310430115249c34f715e7215deeb50 (diff) | |
feat: show webmention below interaction area
| -rw-r--r-- | layouts/_partials/posts/interaction.html | 1 | ||||
| -rw-r--r-- | layouts/_partials/posts/webmention-replies.html | 2 | ||||
| -rw-r--r-- | layouts/_partials/posts/webmention-summary.html | 10 | ||||
| -rw-r--r-- | layouts/_partials/posts/webmention.html | 20 | ||||
| -rw-r--r-- | static/icons/mention.svg | 18 |
5 files changed, 28 insertions, 23 deletions
diff --git a/layouts/_partials/posts/interaction.html b/layouts/_partials/posts/interaction.html index b44063c..3081330 100644 --- a/layouts/_partials/posts/interaction.html +++ b/layouts/_partials/posts/interaction.html @@ -1,4 +1,5 @@ <hr /> {{ partial "posts/interaction-buttons" . }} {{ partial "posts/interaction-note" . }} +{{ partial "posts/webmention" . }} diff --git a/layouts/_partials/posts/webmention-replies.html b/layouts/_partials/posts/webmention-replies.html index 24ef4f0..dbd2e69 100644 --- a/layouts/_partials/posts/webmention-replies.html +++ b/layouts/_partials/posts/webmention-replies.html @@ -1,5 +1,5 @@ {{ with . }} -<section class="flex flex-col gap-4 bg-[var(--background-color)]"> +<section class="flex flex-col gap-4"> {{ range sort . ".microformats.published" }} {{ $mf := .microformats }} {{ $author := $mf.author }} diff --git a/layouts/_partials/posts/webmention-summary.html b/layouts/_partials/posts/webmention-summary.html index 3732284..6c330e3 100644 --- a/layouts/_partials/posts/webmention-summary.html +++ b/layouts/_partials/posts/webmention-summary.html @@ -4,15 +4,6 @@ <section class="md:flex md:justify-between w-full"> <section class="group relative mb-6 vertical-middle"> - <!-- Action Area Toggle --> - <button - popovertarget="action-area" - data-tooltip - title="{{ T "actionMenu.interact" }}" - class="m-0 p-0 bg-transparent hover:no-underline cursor-pointer float-left mr-2"> - <div class="w-5 h-5 bg-neutral-200 dark:bg-neutral-600 flex justify-center items-center rd-full font-800">+</div> - </button> - <!-- Likes --> {{ range $likes }} {{ $author := .microformats.author }} @@ -42,6 +33,5 @@ </div> <div class="clear-left"></div> </section> - {{ partial "posts/like" $page }} </section> diff --git a/layouts/_partials/posts/webmention.html b/layouts/_partials/posts/webmention.html index 21da22f..07e9454 100644 --- a/layouts/_partials/posts/webmention.html +++ b/layouts/_partials/posts/webmention.html @@ -48,26 +48,22 @@ {{ end }} - {{ partial "posts/action-area" $page }} - <details class="my-4 mb-5 no-mark"> - <summary class="cursor-pointer flex"> - {{ partial "posts/webmention-summary" (dict + <div class="px-6 py-2 rd-lg my-4" + style="background-color: oklch(from var(--block-background-color) l c h / calc(alpha - 0.5))"> + <h2 class="flex items-center gap-2 text-lg"> + <img src="/icons/mention.svg" width="18px" height="18px"> + <span>Webmention</span> + </h2> + {{ partial "posts/webmention-summary" (dict "likes" $likes "page" $page "othercount" (add (len $replies) (len $mentions)) ) }} - </summary> - {{ with $page.Params.toot }} - <p class="text-secondary text-sm"> - {{ $link := printf "<a href=\"%s\" target=\"_blank\">Eucalyptus</a>" . }} - *{{ printf (T "webmention.bridgyNotice") $link | safeHTML }} - </p> - {{ end }} <div id="webmention-details"> {{ partial "posts/webmention-replies" $replies }} {{ partial "posts/webmention-mentions" $mentions }} </div> - </details> + </div> {{ else }} <p>Unable to fetch webmentions. Please contact webmaster.</p> {{ end }} diff --git a/static/icons/mention.svg b/static/icons/mention.svg new file mode 100644 index 0000000..13d43ef --- /dev/null +++ b/static/icons/mention.svg @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg fill="#000000" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
+ width="800px" height="800px" viewBox="0 0 183.789 183.789"
+ xml:space="preserve">
+<g>
+ <path d="M76.474,1.237c-55.331,9.732-89.151,79.8-66.654,129.628c24.676,54.654,85.739,66.038,135.514,38.491
+ c6.099-3.375,0.642-12.727-5.456-9.335c-37.914,21.093-83.37,19.126-111.052-17.218C1.692,107.179,12.841,60.955,42.96,31.558
+ C79.738-4.34,137.34,9.013,161.517,52.055c11.809,21.023,11.911,51.583-5.22,69.643c-10.384,10.944-23.689,0.338-28.991-8.4
+ c-3.16-5.207-4.386-12.798-5.227-18.956c1.685-12.36,0.376-25.739-1.389-36.253c-1.036-6.17-10.616-4.504-10.641,1.439
+ c-0.018,4.02-0.072,8.181-0.077,12.39c-13.208-33.824-74.858-12.17-66.536,25.026c5.45,24.356,28.9,37.897,52.752,31.503
+ c9.396-2.52,15.697-7.979,19.808-15.018c3.413,7.917,8.697,14.865,16.978,20.015c24.626,15.311,42.583-16.203,46.531-35.745
+ C191.396,38.846,130.837-8.325,76.474,1.237z M103.152,111.667c-16.926,20.018-47.282,1.505-49.505-19.98
+ c-2.762-26.697,41.823-37.172,52.1-12.693c0.85,2.023,2.881,2.452,4.337,1.753c0.144,4.818,0.454,9.633,1.087,14.334
+ C109.848,101.022,107.387,106.661,103.152,111.667z"/>
+</g>
+</svg>
\ No newline at end of file |
