diff options
| author | 2025-08-26 23:41:00 +0700 | |
|---|---|---|
| committer | 2025-08-26 23:41:00 +0700 | |
| commit | b0ab2ed92870d8c651267db10d68eb695da2ec62 (patch) | |
| tree | 880b194c4d0953e486be60eca45fd7aac17ee5d8 /views/partials | |
| parent | bbe41e5b06ab540a38c8c6b4e0cf719ab31b8e55 (diff) | |
| download | web-b0ab2ed92870d8c651267db10d68eb695da2ec62.tar.gz web-b0ab2ed92870d8c651267db10d68eb695da2ec62.zip | |
feat: like button (only inmem-cache for now)
Diffstat (limited to 'views/partials')
| -rw-r--r-- | views/partials/blog-page-like-button.html | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/views/partials/blog-page-like-button.html b/views/partials/blog-page-like-button.html new file mode 100644 index 0000000..50a9d7a --- /dev/null +++ b/views/partials/blog-page-like-button.html @@ -0,0 +1,6 @@ +<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"> + <i class="fas fa-thumbs-up w-[0.8vmax] h-[0.8vmax] mr-[0.4vmax]"></i> + <span>Нраица!</span> +</button>
\ No newline at end of file |