mirror of
https://github.com/ivabus/www
synced 2024-11-28 00:55:05 +03:00
Merge pull request #371 from teaxyz/auth-number-fix
No LocalSorage Logic for Auth Number
This commit is contained in:
commit
4f90c67e4d
3 changed files with 34 additions and 84 deletions
|
@ -1,38 +1,36 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// Add a 400px tall placeholder
|
// Add a 400px tall placeholder
|
||||||
$('#count').html('<div style="height: 400px"></div>');
|
$('#count').html('<div style="height: 400px"></div>');
|
||||||
$('#count1').html('<div style="height: 400px"></div>');
|
$('#count1').html('<div style="height: 400px"></div>');
|
||||||
$('#count2').html('<div style="height: 400px"></div>');
|
$('#count2').html('<div style="height: 400px"></div>');
|
||||||
$('#count3').html('<div style="height: 400px"></div>');
|
$('#count3').html('<div style="height: 400px"></div>');
|
||||||
$('#count4').html('<div style="height: 400px"></div>');
|
$('#count4').html('<div style="height: 400px"></div>');
|
||||||
$('#count5').html('<div style="height: 400px"></div>');
|
$('#count5').html('<div style="height: 400px"></div>');
|
||||||
$('#count6').html('<div style="height: 400px"></div>');
|
$('#count6').html('<div style="height: 400px"></div>');
|
||||||
$('#count7').html('<div style="height: 400px"></div>');
|
$('#count7').html('<div style="height: 400px"></div>');
|
||||||
$('#stat-one').html('<div style="height: 400px"></div>');
|
$('#stat-one').html('<div style="height: 400px"></div>');
|
||||||
$('#stat-one-small').html('<div style="height: 400px"></div>');
|
$('#stat-one-small').html('<div style="height: 400px"></div>');
|
||||||
$('#stat-two').html('<div style="height: 400px"></div>');
|
$('#stat-two').html('<div style="height: 400px"></div>');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
fetch('https://app.tea.xyz/api/signups')
|
fetch('https://app.tea.xyz/api/signups')
|
||||||
.then(res => res.json())
|
.then(res => res.json())
|
||||||
.then(res => {
|
.then(res => {
|
||||||
const signups = res.signups ? res.signups.toLocaleString() : ""
|
const signups = res.signups ? res.signups.toLocaleString() : "";
|
||||||
if (!(localStorage['signup'] || '').match(/:::/)) {
|
$('#count').html(signups);
|
||||||
$('#count').html(signups)
|
$('#count1').html(signups);
|
||||||
}
|
$('#count2').html(signups);
|
||||||
$('#count1').html(signups)
|
$('#count3').html(signups);
|
||||||
$('#count2').html(signups)
|
$('#count4').html(signups);
|
||||||
$('#count3').html(signups)
|
$('#count5').html(signups);
|
||||||
$('#count4').html(signups)
|
$('#count6').html(signups);
|
||||||
$('#count5').html(signups)
|
$('#count7').html(signups);
|
||||||
$('#count6').html(signups)
|
$('#stat-one').html(res.repos ? res.repos.toLocaleString() : "");
|
||||||
$('#count7').html(signups)
|
$('#stat-one-small').html(res.repos ? res.repos.toLocaleString() : "");
|
||||||
$('#stat-one').html(res.repos ? res.repos.toLocaleString() : "")
|
$('#stat-two').html(res.maintainers ? res.maintainers.toLocaleString() : "");
|
||||||
$('#stat-one-small').html(res.repos ? res.repos.toLocaleString() : "")
|
});
|
||||||
$('#stat-two').html(res.maintainers ? res.maintainers.toLocaleString() : "")
|
} catch (e) {
|
||||||
})
|
console.error(e);
|
||||||
} catch (e) {
|
}
|
||||||
console.error(e)
|
</script>
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
|
@ -95,30 +95,6 @@ integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+
|
||||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"
|
<script src="https://code.jquery.com/jquery-3.6.0.min.js"
|
||||||
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
|
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
|
||||||
|
|
||||||
<script>
|
|
||||||
$(window).scroll(function () {
|
|
||||||
$('nav').toggleClass('scrolled', $(this).scrollTop() > 100);
|
|
||||||
});
|
|
||||||
|
|
||||||
if (localStorage['signup'].match(/:::/)) {
|
|
||||||
const [username, serial_] = localStorage.signup.split(':::');
|
|
||||||
const serial = (+serial_).toLocaleString()
|
|
||||||
$('.box-auth-true').show();
|
|
||||||
$('.box-auth-false').hide();
|
|
||||||
$('#auth-username').html(username);
|
|
||||||
$('#count').html(`${serial} / <span id='count3'></span>`);
|
|
||||||
$('#count-sub-text').html('YOUR AUTHENTICATION NUMBER');
|
|
||||||
$('#communitea').html('Thanks for joining our communi'<span style="color:#54BAAB;">tea</span>');
|
|
||||||
$('#revolution-text').html(
|
|
||||||
'Now stay tuned! As an early authenticator, you’ll be entitled to a variety of exciting rewards, including minted NFT certificates.'
|
|
||||||
);
|
|
||||||
$('#auth-body-text').hide();
|
|
||||||
$('.rounded-pill').hide();
|
|
||||||
$('.auth-btn').html('Configure GitHub App');
|
|
||||||
$('.auth-btn').attr('href', 'https://github.com/apps/tea-xyz')
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
(function(c,l,a,r,i,t,y){
|
(function(c,l,a,r,i,t,y){
|
||||||
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
|
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
|
||||||
|
|
|
@ -18,30 +18,6 @@ integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+
|
||||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"
|
<script src="https://code.jquery.com/jquery-3.6.0.min.js"
|
||||||
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
|
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
|
||||||
|
|
||||||
<script>
|
|
||||||
$(window).scroll(function () {
|
|
||||||
$('nav').toggleClass('scrolled', $(this).scrollTop() > 100);
|
|
||||||
});
|
|
||||||
|
|
||||||
if (localStorage['signup'].match(/:::/)) {
|
|
||||||
const [username, serial_] = localStorage.signup.split(':::');
|
|
||||||
const serial = (+serial_).toLocaleString()
|
|
||||||
$('.box-auth-true').show();
|
|
||||||
$('.box-auth-false').hide();
|
|
||||||
$('#auth-username').html(username);
|
|
||||||
$('#count').html(`${serial} / <span id='count3'></span>`);
|
|
||||||
$('#count-sub-text').html('YOUR AUTHENTICATION NUMBER');
|
|
||||||
$('#communitea').html('Thanks for joining our communi'<span style="color:#54BAAB;">tea</span>');
|
|
||||||
$('#revolution-text').html(
|
|
||||||
'Now stay tuned! As an early authenticator, you’ll be entitled to a variety of exciting rewards, including minted NFT certificates.'
|
|
||||||
);
|
|
||||||
$('#auth-body-text').hide();
|
|
||||||
$('.rounded-pill').hide();
|
|
||||||
$('.auth-btn').html('Configure GitHub App');
|
|
||||||
$('.auth-btn').attr('href', 'https://github.com/apps/tea-xyz')
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
(function(c,l,a,r,i,t,y){
|
(function(c,l,a,r,i,t,y){
|
||||||
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
|
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
|
||||||
|
|
Loading…
Reference in a new issue