From d6dcf1dcab3e130d709a56ef8e854f8b16879e80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Mon, 10 Oct 2022 14:51:15 +0100 Subject: [PATCH] added new icons --- assets/icons/docker.svg | 2 +- assets/icons/heart-empty.svg | 2 ++ assets/icons/heart.svg | 2 ++ assets/icons/poo.svg | 1 + exampleSite/content/samples/icons/index.md | 4 ++++ layouts/_default/single.html | 4 ++-- layouts/partials/meta/likes_button.html | 11 ++++++++++- 7 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 assets/icons/heart-empty.svg create mode 100644 assets/icons/heart.svg create mode 100644 assets/icons/poo.svg diff --git a/assets/icons/docker.svg b/assets/icons/docker.svg index 80ab465e..9a82fb03 100644 --- a/assets/icons/docker.svg +++ b/assets/icons/docker.svg @@ -1,2 +1,2 @@ - + \ No newline at end of file diff --git a/assets/icons/heart-empty.svg b/assets/icons/heart-empty.svg new file mode 100644 index 00000000..b9476efe --- /dev/null +++ b/assets/icons/heart-empty.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/assets/icons/heart.svg b/assets/icons/heart.svg new file mode 100644 index 00000000..ed7e8c8c --- /dev/null +++ b/assets/icons/heart.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/assets/icons/poo.svg b/assets/icons/poo.svg new file mode 100644 index 00000000..5489fb43 --- /dev/null +++ b/assets/icons/poo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/exampleSite/content/samples/icons/index.md b/exampleSite/content/samples/icons/index.md index 4b0487df..ad930d4b 100644 --- a/exampleSite/content/samples/icons/index.md +++ b/exampleSite/content/samples/icons/index.md @@ -27,6 +27,7 @@ The full list of built-in icons and their corresponding names can referenced bel | comment | {{< icon comment >}} | | dev | {{< icon dev >}} | | discourse | {{< icon discourse >}} | +| docker | {{< icon docker >}} | | dribbble | {{< icon dribbble >}} | | edit | {{< icon edit >}} | | email | {{< icon email >}} | @@ -39,6 +40,8 @@ The full list of built-in icons and their corresponding names can referenced bel | google | {{< icon google >}} | | hackernews | {{< icon hackernews >}} | | hashnode | {{< icon hashnode >}} | +| heart-empty | {{< icon heart-empty >}} | +| heart | {{< icon heart >}} | | instagram | {{< icon instagram >}} | | keybase | {{< icon keybase >}} | | kickstarter | {{< icon kickstarter >}} | @@ -57,6 +60,7 @@ The full list of built-in icons and their corresponding names can referenced bel | pencil | {{< icon pencil >}} | | pgpkey | {{< icon pgpkey >}} | | pinterest | {{< icon pinterest >}} | +| poo | {{< icon poo >}} | | reddit | {{< icon reddit >}} | | researchgate | {{< icon researchgate >}} | | search | {{< icon search >}} | diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 9694c9ae..16b0fa4b 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -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(() => { diff --git a/layouts/partials/meta/likes_button.html b/layouts/partials/meta/likes_button.html index 28e6d82e..bfdc264d 100644 --- a/layouts/partials/meta/likes_button.html +++ b/layouts/partials/meta/likes_button.html @@ -1,6 +1,15 @@ - + {{- /* Trim EOF */ -}} \ No newline at end of file