summaryrefslogtreecommitdiff
path: root/views
diff options
from:
to:
context:
space:
mode:
authorGravatar SayaAndy <saya.andy@posteo.com> 2025-08-27 19:11:16 +0700
committerGravatar SayaAndy <saya.andy@posteo.com> 2025-08-27 19:11:16 +0700
commit26c77e33356a519b3caaed44fd9d7f8722f41918 (patch)
tree467bc15626f59cf69846fe36c0e2786a30e383d2 /views
parentea8c6da9b8bafa1d4e5fe5a77fb306006db7d6f6 (diff)
downloadweb-26c77e33356a519b3caaed44fd9d7f8722f41918.tar.gz
web-26c77e33356a519b3caaed44fd9d7f8722f41918.zip
feat: add and show like count
feat: localize like button
Diffstat (limited to 'views')
-rw-r--r--views/partials/blog-page-like-button.html5
1 files changed, 3 insertions, 2 deletions
diff --git a/views/partials/blog-page-like-button.html b/views/partials/blog-page-like-button.html
index 50a9d7a..afc3027 100644
--- a/views/partials/blog-page-like-button.html
+++ b/views/partials/blog-page-like-button.html
@@ -1,6 +1,7 @@
<button
hx-put="/api/v1/like" hx-vals='{"like": {{ not .Liked }}}' hx-target="this" hx-swap="outerHTML" hx-trigger="click"
- class="text-[0.8vmax]/[0.9] font-spectral text-left px-[0.4vmax] py-[0.2vmax] {{ if .Liked }}bg-main-light hover:bg-main-medium{{ else }}bg-main-dark hover:bg-main-medium{{ end }} text-background-dark cursor-pointer {{ if .Liked }}border-inset{{ else }}border-outset{{ end }} border-[0.3vmax] border-background-dark">
+ class="text-[0.8vmax]/[0.9] font-spectral text-left px-[0.4vmax] py-[0.2vmax] {{ if .Liked }}bg-main-light hover:bg-main-medium text-background-dark border-inset{{ else }}bg-main-dark hover:bg-main-medium text-background-light border-outset{{ end }} cursor-pointer border-[0.2vmax] border-background-dark">
<i class="fas fa-thumbs-up w-[0.8vmax] h-[0.8vmax] mr-[0.4vmax]"></i>
- <span>Нраица!</span>
+ <span>{{ .L.LikeButton }}</span>
+ <span class="italic ml-[0.2vmax] text-background-light">({{ .LikedCount }})</span>
</button> \ No newline at end of file