From 230f3210cf7d0e85b2faf2e5d1251a3148d22e15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Mon, 17 Oct 2022 10:44:20 +0100 Subject: [PATCH] changed likes and views to icons --- assets/icons/eye.svg | 2 ++ assets/js/process.js | 4 ++-- exampleSite/content/samples/icons/index.md | 1 + layouts/partials/meta/likes.html | 3 ++- layouts/partials/meta/views.html | 5 +++-- 5 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 assets/icons/eye.svg diff --git a/assets/icons/eye.svg b/assets/icons/eye.svg new file mode 100644 index 00000000..c54e9962 --- /dev/null +++ b/assets/icons/eye.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/assets/js/process.js b/assets/js/process.js index 15f14c3e..eb811015 100644 --- a/assets/js/process.js +++ b/assets/js/process.js @@ -12,7 +12,7 @@ if (typeof auth !== 'undefined') { var data = doc.data(); if (data) { var label = document.querySelectorAll("span[id='" + oid + "']")[0].innerText.split(' ')[1] - document.querySelectorAll("span[id='" + oid + "']")[0].innerText = numberWithCommas(data.views) + " " + label + document.querySelectorAll("span[id='" + oid + "']")[0].innerText = numberWithCommas(data.views) } }) } @@ -22,7 +22,7 @@ if (typeof auth !== 'undefined') { var data = doc.data(); if (data) { var label = document.querySelectorAll("span[id='" + oid + "']")[0].innerText.split(' ')[1] - document.querySelectorAll("span[id='" + oid + "']")[0].innerText = numberWithCommas(data.likes) + " " + label + document.querySelectorAll("span[id='" + oid + "']")[0].innerText = numberWithCommas(data.likes) } }) } diff --git a/exampleSite/content/samples/icons/index.md b/exampleSite/content/samples/icons/index.md index f8c36270..3ec61ca7 100644 --- a/exampleSite/content/samples/icons/index.md +++ b/exampleSite/content/samples/icons/index.md @@ -35,6 +35,7 @@ The full list of built-in icons and their corresponding names can referenced bel | dribbble | {{< icon dribbble >}} | | edit | {{< icon edit >}} | | email | {{< icon email >}} | +| eye | {{< icon eye >}} | | facebook | {{< icon facebook >}} | | fire | {{< icon fire >}} | | flickr | {{< icon flickr >}} | diff --git a/layouts/partials/meta/likes.html b/layouts/partials/meta/likes.html index 6e6dadb2..bef1078a 100644 --- a/layouts/partials/meta/likes.html +++ b/layouts/partials/meta/likes.html @@ -1,4 +1,5 @@ - {{- i18n "article.likes" 0 | markdownify | emojify -}} + 0 + {{ partial "icon.html" "heart" }} {{- /* Trim EOF */ -}} \ No newline at end of file diff --git a/layouts/partials/meta/views.html b/layouts/partials/meta/views.html index 9743affc..2b633b8c 100644 --- a/layouts/partials/meta/views.html +++ b/layouts/partials/meta/views.html @@ -1,4 +1,5 @@ - - {{- i18n "article.views" 0 | markdownify | emojify -}} + + 0 + {{ partial "icon.html" "eye" }} {{- /* Trim EOF */ -}}