Skip to content

Commit

Permalink
Merge pull request #1098 from nunocoracao/dev
Browse files Browse the repository at this point in the history
🔖 v2.47.1 - Small bug fix
  • Loading branch information
nunocoracao authored Dec 6, 2023
2 parents 8f12677 + d613121 commit ea8ad8b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
9 changes: 7 additions & 2 deletions assets/js/process.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,24 @@ if (typeof auth !== 'undefined') {
viewsCollection.doc(id).onSnapshot(doc => {
var data = doc.data();
if (data) {
toggleLoaders(node)
node.innerText = numberWithCommas(data.views)
} else {
node.innerText = 0
}
toggleLoaders(node)
})
}

var update_likes = function (node, id) {
likesCollection.doc(id).onSnapshot(doc => {
var data = doc.data();
if (data) {
toggleLoaders(node)
node.innerText = numberWithCommas(data.likes)
} else {
node.innerText = 0
}
toggleLoaders(node)

})
}

Expand Down
8 changes: 4 additions & 4 deletions layouts/partials/meta/likes_button.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<span>
<button id="likes_button"
<button id="button_likes"
class="rounded-md border border-primary-400 px-1 py-[1px] text-xs font-normal text-primary-700 dark:border-primary-600 dark:text-primary-400"
onclick="process_article()">
<span id="likes_button_heart" style="display:none" class="inline-block align-text-bottom">{{ partial "icon.html" "heart" }} </span>
<span id="likes_button_emtpty_heart" class="inline-block align-text-bottom">{{ partial "icon.html" "heart-empty" }}</span>
<span id="likes_button_text">&nbsp;Like</span>
<span id="button_likes_heart" style="display:none" class="inline-block align-text-bottom">{{ partial "icon.html" "heart" }} </span>
<span id="button_likes_emtpty_heart" class="inline-block align-text-bottom">{{ partial "icon.html" "heart-empty" }}</span>
<span id="button_likes_text">&nbsp;Like</span>
</button>
</span>
{{- /* Trim EOF */ -}}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hugo-blowfish-theme",
"version": "2.47.0",
"version": "2.47.1",
"description": "Blowfish theme for Hugo",
"scripts": {
"fullinstall": "npm run preinstall && npm install && npm run postinstall",
Expand Down

0 comments on commit ea8ad8b

Please sign in to comment.