Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initial dashboard for teams #353

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions teams/css/home/dashboard.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.teams__welcome_hero {
border-radius: 8px;
min-height: 200px;
max-width: 1283px;
background-image: url(/teams/img/Desktop-gate-logo-w-bl3x_12.jpg);
background-size: cover;
background-repeat: no-repeat;
padding: 2rem;
display: flex;
align-items: flex-start;
justify-content: flex-start;
margin:0;
}

.teams__welcome_hero span{
align-self: flex-end;
position:absolute;
}
6 changes: 1 addition & 5 deletions teams/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,10 @@
}
.teams__page-inner {
display: flex;
}

.teams__sidebar-padding {
margin-left: calc(var(--sidebar-width) + 25px); /* padding */
transition: width 0.3s ease;
width: calc(var(--sidebar-width) + 25px); /* padding */
}


.teams__sidebar-hidden .teams__sidebar-padding {
width: 0px;
}
Expand Down
Binary file added teams/img/Desktop-gate-logo-w-bl3x_12.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added teams/img/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions teams/img/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion teams/js/routing.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function setNavBar() {
var navbar = document.getElementById("pages");
navbar.innerHTML = "";
for(let page of cur_page_parent['pages']) {
let item = Object.assign(document.createElement("p"), {"className": "osekai__tab-page-navigation-item", "innerText": page.name});
let item = Object.assign(document.createElement("p"), {"className": "osekai__tab-page-navigation-item", "innerText": page.display_name});
navbar.appendChild(item);
item.addEventListener("click", function() {
switchUrl(cur_url[0] + "/" + page.name)
Expand Down
2 changes: 1 addition & 1 deletion teams/pages.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function page($name, $displayname, $page) {
}

addDepthPage("home", "Home", [
page("dashboard", "Dashboard", "home/dashboard.php"),
page("dashboard", "Your Home", "home/dashboard.php"),
page("rankings", "Rankings", "home/rankings.php"),
page("settings", "User Settings", "home/settings.php")
]);
Expand Down
3 changes: 0 additions & 3 deletions teams/templates/tabbed_page.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@

</div>
<div class="teams__page-inner">
<div class="teams__sidebar-padding">

</div>
<div class="teams__page-content" id="teams_page">

</div>
Expand Down
8 changes: 4 additions & 4 deletions teams/views/home/dashboard.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Dashboard

<div class="osekai__button" onclick="toggleSidebarButton()">Toggle sidebar</div>
NOTE: sidebar toggle should only be done when switching page. shouldn't be user-initiated
<div class="teams__welcome_hero">
<img rel="preload" alt="Osekai Teams" src="/teams/img/logo.svg">
<span>Welcome back, <strong><?php ECHO $_SESSION["osu"]["username"] ?>.</strong></span>
</div>
1 change: 0 additions & 1 deletion teams/views/team/home.php
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
Team Home for <?= $team['Tag']; ?>