removed leaderboards route for now

This commit is contained in:
Miodec 2022-06-25 12:31:31 +02:00
parent 390bb89af0
commit 31cfeef2a9
3 changed files with 19 additions and 14 deletions

View file

@ -7,7 +7,7 @@ import * as PageLogin from "../pages/login";
import * as Page404 from "../pages/404";
import * as PageProfile from "../pages/profile";
import * as Leaderboards from "../elements/leaderboards";
import * as ActivePage from "../states/active-page";
// import * as ActivePage from "../states/active-page";
import { Auth } from "../firebase";
//source: https://www.youtube.com/watch?v=OstALBk-jTc
@ -48,15 +48,15 @@ const routes: Route[] = [
PageController.change(PageTest.page);
},
},
{
path: "/leaderboards",
load: (): void => {
if (ActivePage.get() === "loading") {
PageController.change(PageTest.page);
}
Leaderboards.show();
},
},
// {
// path: "/leaderboards",
// load: (): void => {
// if (ActivePage.get() === "loading") {
// PageController.change(PageTest.page);
// }
// Leaderboards.show();
// },
// },
{
path: "/about",
load: (): void => {

View file

@ -789,3 +789,10 @@ $(document).on("keydown", (event) => {
event.preventDefault();
}
});
$(document).on("click", "#top #menu .text-button", (e) => {
if ($(e.currentTarget).hasClass("leaderboards")) {
show();
}
return false;
});

View file

@ -56,17 +56,15 @@
<i class="fas fa-fw fa-keyboard"></i>
</div>
</a>
<a
<div
class="text-button leaderboards view-leaderboards"
tabindex="2"
onclick="this.blur();"
href="/leaderboards"
data-link
>
<div class="icon">
<i class="fas fa-fw fa-crown"></i>
</div>
</a>
</div>
<a
class="text-button view-about"
tabindex="2"