Parenthesis fade in with starcount

This commit is contained in:
Thomas Smith 2023-03-09 10:23:46 -05:00
parent eeae257c22
commit 6658ed377b
3 changed files with 10 additions and 9 deletions

View file

@ -141,15 +141,16 @@ integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+
<script>
$(document).ready(function() {
var repository = "teaxyz/cli";
var url = "https://api.github.com/repos/" + repository;
var repository = "teaxyz/cli";
var url = "https://api.github.com/repos/" + repository;
$.get(url, function(data) {
var stargazers = numeral(data.stargazers_count).format("0.0a");
$(".stargazers").html(stargazers).hide().fadeIn(400);
$.get(url, function(data) {
var stargazers = "(" + numeral(data.stargazers_count).format("0.0a") + ")";
$(".stargazers").html(stargazers).hide().fadeIn(400);
});
});
});
</script>
</script>
<script>

View file

@ -12,7 +12,7 @@
</li>
{{ end }}
<li class="nav-item mt-lg-0 mt-md-0 mt-sm-3 mt-3">
<a class="top-nav-link nav-link" aria-current="page" href="https://github.com/teaxyz/cli/stargazers"><i class="icon-github" style="position:relative;top:2px;"></i> (<span class="stargazers"></span>)</a>
<a class="top-nav-link nav-link" aria-current="page" href="https://github.com/teaxyz/cli/stargazers"><i class="icon-github" style="position:relative;top:2px;"></i> <span class="stargazers"></span></a>
</li>
</ul>

View file

@ -13,7 +13,7 @@
</li>
{{ end }}
<li class="nav-item mt-lg-0 mt-md-0 mt-sm-3 mt-3 top-nav-item">
<a class="nav-link" aria-current="page" href="https://github.com/teaxyz/cli/stargazers"><i class="icon-github" style="position:relative;top:2px;"></i> (<span class="stargazers"></span>)</a>
<a class="nav-link" aria-current="page" href="https://github.com/teaxyz/cli/stargazers"><i class="icon-github" style="position:relative;top:2px;"></i> <span class="stargazers"></span></a>
</li>
<style>