summaryrefslogtreecommitdiff
path: root/views/partials
diff options
from:
to:
context:
space:
mode:
authorGravatar Saya Andy <145215889+SayaAndy@users.noreply.github.com> 2025-08-30 16:04:50 +0700
committerGravatar GitHub <noreply@github.com> 2025-08-30 16:04:50 +0700
commitd695dc09f44236be33fecc7a5ab9a326823170d9 (patch)
treec71c2c8f37a7609d6c8a7b558b71a1a1b4c9ec1c /views/partials
parenta3d04476daa507cf941a5b82355c744c6622246c (diff)
parent1c14a4088b068fefe425cad1acdde2d603bd27a9 (diff)
downloadweb-0.7.0.tar.gz
web-0.7.0.zip
v0.7.0 (#6)v0.7.0
feat: like button with persistent storage and like count feat: show like count on blog search feat: update galleries on resize (with smooth animations) feat: add decor for night & ram themes feat: show search buttons in catalogue separately without overflow feat: add overflow to search tags in catalogue in mobile mode feat: update go (1.24.5 > 1.24.6) feat: add favicon refactor: shorten logs of blog search
Diffstat (limited to 'views/partials')
-rw-r--r--views/partials/blog-page-like-button.html7
-rw-r--r--views/partials/catalogue-blog-cards.html3
2 files changed, 10 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..afc3027
--- /dev/null
+++ b/views/partials/blog-page-like-button.html
@@ -0,0 +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 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>{{ .L.LikeButton }}</span>
+ <span class="italic ml-[0.2vmax] text-background-light">({{ .LikedCount }})</span>
+</button> \ No newline at end of file
diff --git a/views/partials/catalogue-blog-cards.html b/views/partials/catalogue-blog-cards.html
index 62e931a..35c7ad7 100644
--- a/views/partials/catalogue-blog-cards.html
+++ b/views/partials/catalogue-blog-cards.html
@@ -8,6 +8,9 @@
<span class="font-extrabold">{{ .Title }}</span>
<span class="font-extrabold select-none text-secondary">//</span>
<span class="italic text-secondary">{{ .ActionDate }}</span>
+ <span class="font-extrabold select-none text-secondary">//</span>
+ <i class="fas fa-thumbs-up w-[1vmax] h-[1vmax]"></i>
+ <span class="italic text-secondary">{{ .LikeCount }}</span>
</a>
<p class="flex-3/12 grow-0 text-[1vmax] italic text-secondary text-right">{{ .PublishedTime }}</p>
</div>