1
0
mirror of https://github.com/garraflavatra/rolens.git synced 2025-01-18 21:17:59 +00:00

Fixed star count on website

This commit is contained in:
Romein van Buren 2023-06-23 18:42:03 +02:00
parent 77ce1ab842
commit 58dd9de4ba
Signed by: romein
GPG Key ID: 0EFF8478ADDF6C49
3 changed files with 3 additions and 6 deletions

View File

@ -2,7 +2,7 @@ const { default: fetch } = require("node-fetch")
module.exports = async function() { module.exports = async function() {
try { try {
const res = await fetch('https://api.github.com/repos/garraflavatra/alphabets'); const res = await fetch('https://api.github.com/repos/garraflavatra/rolens');
const json = await res.json(); const json = await res.json();
return { stars: json.stargazers_count || 0 }; return { stars: json.stargazers_count || 0 };
} }

View File

@ -3,9 +3,6 @@
<svg class="icon" viewBox="0 0 16 16"><path d="M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z"/></svg> <svg class="icon" viewBox="0 0 16 16"><path d="M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z"/></svg>
</span> </span>
{% if github.stars %} <span class="count">{{ stars }}</span>
<span class="count">{{ github.stars }}</span>
{% endif %}
Star on GitHub! Star on GitHub!
</a> </a>

View File

@ -56,7 +56,7 @@ navigationOptions:
on GitHub. on GitHub.
</p> </p>
<p> <p>
{% render "githubstars" %} {% render "githubstars", stars: github.stars %}
{% # render "mastodon" %} {% # render "mastodon" %}
</p> </p>
<p> <p>