mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-01-22 22:45:42 -06:00
Merge pull request #135 from nunocoracao/134-make-views-and-likes-into-icons-vs-text
changed likes and views to icons
This commit is contained in:
commit
4bafe76e72
5 changed files with 10 additions and 5 deletions
2
assets/icons/eye.svg
Normal file
2
assets/icons/eye.svg
Normal file
|
@ -0,0 +1,2 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512">
|
||||
<path fill="currentColor" d="M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM432 256c0 79.5-64.5 144-144 144s-144-64.5-144-144s64.5-144 144-144s144 64.5 144 144zM288 192c0 35.3-28.7 64-64 64c-11.5 0-22.3-3-31.6-8.4c-.2 2.8-.4 5.5-.4 8.4c0 53 43 96 96 96s96-43 96-96s-43-96-96-96c-2.8 0-5.6 .1-8.4 .4c5.3 9.3 8.4 20.1 8.4 31.6z"/></svg>
|
After Width: | Height: | Size: 633 B |
|
@ -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)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
@ -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 >}} |
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<span>
|
||||
<span id="likes_{{ .File.Path }}" title="likes">{{- i18n "article.likes" 0 | markdownify | emojify -}}</span>
|
||||
<span id="likes_{{ .File.Path }}" title="likes">0</span>
|
||||
<span>{{ partial "icon.html" "heart" }}</span>
|
||||
</span>
|
||||
{{- /* Trim EOF */ -}}
|
|
@ -1,4 +1,5 @@
|
|||
<span id="views_{{ .File.Path }}" title="views">
|
||||
{{- i18n "article.views" 0 | markdownify | emojify -}}
|
||||
<span>
|
||||
<span id="views_{{ .File.Path }}" title="views">0</span>
|
||||
<span>{{ partial "icon.html" "eye" }}</span>
|
||||
</span>
|
||||
{{- /* Trim EOF */ -}}
|
||||
|
|
Loading…
Reference in a new issue