Skip to content

Commit

Permalink
Merge pull request #275 from Moonlight-Panel/RedesignServerPage
Browse files Browse the repository at this point in the history
Redesign server page
  • Loading branch information
Masu-Baumgartner authored Aug 15, 2023
2 parents b8b2ae7 + b6e048e commit eca9b6e
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
20 changes: 17 additions & 3 deletions Moonlight/Shared/Views/Server/ServerNavigation.razor
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<div class="align-items-center">
<div class="row">
<div class="card card-body me-6">
<div class="card card-body me-6 pb-0">
<div class="row">
<div class="col-8">
<div class="d-flex align-items-center">
Expand Down Expand Up @@ -53,6 +53,18 @@
</div>
</div>
</div>
<div class="row">
<ul class="nav nav-stretch nav-line-tabs nav-line-tabs-2x border-transparent fs-5 fw-bold text-nowrap flex-nowrap hide-scrollbar" style="overflow-x: auto; overflow-y: hidden;">
@foreach (var tab in Context.Tabs)
{
<li class="nav-item mt-2 @(tab == Context.Tabs.First() ? "ms-5" : "")">
<a class="nav-link text-active-primary ms-0 me-10 py-5 @(Route == tab.Route ? "active" : "")" href="/server/@(CurrentServer.Uuid + tab.Route)">
<i class="bx bx-@(tab.Icon) bx-sm me-2"></i><TL>@(tab.Name)</TL>
</a>
</li>
}
</ul>
</div>
</div>
<div class="row mt-3">
<div class="card card-body">
Expand Down Expand Up @@ -125,7 +137,8 @@
</div>
<div class="mt-5 row">
<div class="d-flex flex-column flex-md-row card card-body p-5">
<ul class="nav nav-tabs nav-pills flex-row border-0 flex-md-column fs-6 pe-5 mb-5">
@*
<ul class="nav nav-tabs nav-pills flex-row border-0 flex-md-column fs-6 pe-5 mb-5">
@foreach (var tab in Context.Tabs)
{
<li class="nav-item w-100 me-0 mb-md-2">
Expand All @@ -140,6 +153,7 @@
</li>
}
</ul>
*@
<div class="tab-content w-100">
<div class="tab-pane fade show active">
@ChildContent
Expand All @@ -157,7 +171,7 @@

[CascadingParameter]
public WingsConsole Console { get; set; }

[CascadingParameter]
public ServerPageContext Context { get; set; }

Expand Down
2 changes: 1 addition & 1 deletion Moonlight/Shared/Views/Server/ServerNetwork.razor
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

@foreach (var allocation in CurrentServer.Allocations)
{
<div class="row align-items-center">
<div class="row align-items-center mb-3">
<div class="col-1 me-4">
<i class="text-primary bx bx-wifi bx-md"></i>
</div>
Expand Down
11 changes: 11 additions & 0 deletions Moonlight/wwwroot/assets/css/utils.css
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,14 @@ div.card-body
ul.pagination {
gap: 1.5rem;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.hide-scrollbar::-webkit-scrollbar {
display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.hide-scrollbar {
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */
}

0 comments on commit eca9b6e

Please sign in to comment.