added new icons

This commit is contained in:
Nuno Coração
2022-10-10 14:51:15 +01:00
parent 27412dbb1a
commit d6dcf1dcab
7 changed files with 22 additions and 4 deletions

View File

@@ -63,7 +63,7 @@
if (liked) {
liked_article = true
document.querySelectorAll("button[id='likes_button']")[0].innerText = "Remove Like"
document.querySelectorAll("button[id='likes_button']")[0].textContent = "Remove Like"
}
}
@@ -98,7 +98,7 @@
function remove_like_article(id_likes) {
console.log("remove")
liked_article = false
localStorage.setItem(id_likes, false);
localStorage.removeItem(id_likes);
document.querySelectorAll("button[id='likes_button']")[0].innerText = "Like"
auth.signInAnonymously()
.then(() => {

View File

@@ -1,6 +1,15 @@
<span>
<button id="likes_button" class="border rounded px-3" onclick="process_article()">
<!--button id="likes_button" class="border rounded px-3" onclick="process_article()">
Like
</button-->
<button id="likes_button"
style="height: 24px; padding-top: 0;"
class="!rounded-md bg-primary-600 px-4 py-2 !text-neutral !no-underline hover:!bg-primary-500 dark:bg-primary-800 dark:hover:!bg-primary-700"
onclick="process_article()">
{{ partial "icon.html" "like" }}
</button>
</span>
{{- /* Trim EOF */ -}}