mirror of
https://github.com/ivabus/www
synced 2024-11-25 14:15:06 +03:00
stars in navbar too
This commit is contained in:
parent
b2b32b0e82
commit
dec7fdc83c
3 changed files with 8 additions and 8 deletions
|
@ -11,12 +11,6 @@ title = 'Equitable Open-Source for Web3'
|
||||||
title = 'community'
|
title = 'community'
|
||||||
url = '../#community'
|
url = '../#community'
|
||||||
weight = 4
|
weight = 4
|
||||||
[[menu.main]]
|
|
||||||
identifier = 'github'
|
|
||||||
name = 'GitHub'
|
|
||||||
title = 'github'
|
|
||||||
url = 'https://github.com/teaxyz'
|
|
||||||
weight = 6
|
|
||||||
|
|
||||||
[security]
|
[security]
|
||||||
[security.exec]
|
[security.exec]
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<ul class="list-group list-group-flush">
|
<ul class="list-group list-group-flush">
|
||||||
<a class="list-group-item" role="button" href="https://twitter.com/teaxyz"><i class="icon-twitter social-icon"></i>Twitter</a>
|
<a class="list-group-item" role="button" href="https://twitter.com/teaxyz"><i class="icon-twitter social-icon"></i>Twitter</a>
|
||||||
<a class="list-group-item" role="button" href="https://discord.gg/KCZsXfJphn"><i class="icon-discord social-icon"></i>Discord</a>
|
<a class="list-group-item" role="button" href="https://discord.gg/KCZsXfJphn"><i class="icon-discord social-icon"></i>Discord</a>
|
||||||
<a class="list-group-item" role="button" href="https://github.com/teaxyz"><i class="icon-github social-icon"></i>GitHub <span style="font-size:16px;">(<span id="starcount"></span> stars)</span></a>
|
<a class="list-group-item" role="button" href="https://github.com/teaxyz"><i class="icon-github social-icon"></i>GitHub <span style="font-size:16px;">(☆<span id="starcount"></span>)</span></a>
|
||||||
<a class="list-group-item" role="button" href="https://t.me/tea_xyz"><i class="icon-telegram social-icon"></i>Telegram</a>
|
<a class="list-group-item" role="button" href="https://t.me/tea_xyz"><i class="icon-telegram social-icon"></i>Telegram</a>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -172,9 +172,13 @@ integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function getStarcount(repo, resultElement) {
|
function getStarcount(repo, resultElement) {
|
||||||
|
var repo = 'teaxyz/cli';
|
||||||
var url = 'https://api.github.com/repos/' + repo;
|
var url = 'https://api.github.com/repos/' + repo;
|
||||||
axios.get(url)
|
axios.get(url)
|
||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
|
console.log(response.data.stargazers_count);
|
||||||
|
document.getElementById('starcount').innerHTML=response.data.stargazers_count;
|
||||||
|
document.getElementById('starcount2').innerHTML=response.data.stargazers_count;
|
||||||
resultElement.innerHTML = response.data.stargazers_count;
|
resultElement.innerHTML = response.data.stargazers_count;
|
||||||
})
|
})
|
||||||
.catch(function (error) {
|
.catch(function (error) {
|
||||||
|
@ -184,7 +188,6 @@ integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+
|
||||||
|
|
||||||
function repo() {
|
function repo() {
|
||||||
var repo = 'teaxyz/cli';
|
var repo = 'teaxyz/cli';
|
||||||
var starcount = document.getElementById('starcount');
|
|
||||||
getStarcount(repo, starcount);
|
getStarcount(repo, starcount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,9 @@
|
||||||
<a class="nav-link{{ if $.IsMenuCurrent "main" . }} active" aria-current="page {{ end }}" href="{{ .URL }}">{{ .Name}}</a>
|
<a class="nav-link{{ if $.IsMenuCurrent "main" . }} active" aria-current="page {{ end }}" href="{{ .URL }}">{{ .Name}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
<li class="nav-item mt-lg-0 mt-md-0 mt-sm-3 mt-3">
|
||||||
|
<a class="nav-link" aria-current="page" href="https://github.com/teaxyz">GITHUB (☆<span id="starcount2"></span>)</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<!--
|
<!--
|
||||||
<a class="btn btn-primary auth-btn mt-lg-0 mt-md-0 mt-sm-4 mt-4" id="nav-cta" href="https://github.com/login/oauth/authorize?client_id=9d1f1a72f1300b6991df&state=teaxyz" role="button"><span id="cta-text">Authenticate with tea</span><span class="badge rounded-pill bg-primary ms-3"><span id="count1">287</span></span><span id="lp-text"></span></a>-->
|
<a class="btn btn-primary auth-btn mt-lg-0 mt-md-0 mt-sm-4 mt-4" id="nav-cta" href="https://github.com/login/oauth/authorize?client_id=9d1f1a72f1300b6991df&state=teaxyz" role="button"><span id="cta-text">Authenticate with tea</span><span class="badge rounded-pill bg-primary ms-3"><span id="count1">287</span></span><span id="lp-text"></span></a>-->
|
||||||
|
|
Loading…
Reference in a new issue