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

Improve AdminDashboard Styling #14593

Merged
merged 1 commit into from
Oct 28, 2023
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -68,44 +68,23 @@

.dashboard-wrapper.ui-resizable {
overflow-y: hidden;
overflow-x: hidden;
}
}

.dashboard-meta {
padding-left: 20px;
padding-right: 20px;

&:first-child {
padding-top: 12px;
.dashboard-wrapper:not(.ui-resizable) {
scrollbar-width: thin;
overflow-y: auto;
overflow-x: hidden;
}
}

@include color-mode(light) {
& .dashboard-wrapper {
& .card {
& .card-header {
background-color: #fff !important;
}

& .card-footer {
background-color: #fff !important;
}
}
}
.dashboard-body-container {
scrollbar-width: thin;
overflow-y: auto;
}

@include color-mode(dark) {
& .dashboard-wrapper {
& .card {
& .card-header {
background-color: rgb(24, 26, 27) !important;
}

& .card-footer {
background-color: rgb(24, 26, 27) !important;
}
}
}
.dashboard-meta {
padding: 0.5rem !important;
}

.dashboard-handle {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@

@{
var dashboardPart = Model.Dashboard.As<DashboardPart>();
var position = dashboardPart.Position;
var width = dashboardPart.Width;
var height = dashboardPart.Height;
var contentItemId = Model.Dashboard.ContentItemId;
}
<div style="--dashboard-width: @(width); --dashboard-height:@(height)" class="dashboard-wrapper" id="@(contentItemId)" >

<div style="--dashboard-width: @(dashboardPart.Width); --dashboard-height: @(dashboardPart.Height);" class="dashboard-wrapper rounded" id="@(Model.Dashboard.ContentItemId)">
@await DisplayAsync(Model.Content)
</div>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="card h-100 @string.Join(" ", Model.Classes.ToArray())">
<div class="card h-100 @string.Join(' ', Model.Classes.ToArray())">
@if (Model.Header != null || Model.Leading != null || Model.ActionsMenu != null)
{
<div class="card-header">
Expand All @@ -17,14 +17,14 @@
}
</div>
}
@if (Model.Tags != null || Model.Meta != null)
{
<div class="dashboard-meta">
@await DisplayAsync(Model.Meta)
@await DisplayAsync(Model.Tags)
</div>
}
<div class="card-body p-0">
<div class="dashboard-body-container card-body p-0 h-100">
@if (Model.Tags != null || Model.Meta != null)
{
<div class="dashboard-meta">
@await DisplayAsync(Model.Meta)
@await DisplayAsync(Model.Tags)
</div>
}
@await DisplayAsync(Model.Content)
</div>
@if (Model.Footer != null)
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<h5 style="display:inline-block">@Model.ContentItem.DisplayText</h5>
<h5 class="d-inline mb-0">@Model.ContentItem.DisplayText</h5>
Original file line number Diff line number Diff line change
Expand Up @@ -48,28 +48,21 @@
}
.dashboard-container .dashboard-wrapper.ui-resizable {
overflow-y: hidden;
overflow-x: hidden;
}

.dashboard-meta {
padding-left: 20px;
padding-right: 20px;
}
.dashboard-meta:first-child {
padding-top: 12px;
.dashboard-container .dashboard-wrapper:not(.ui-resizable) {
scrollbar-width: thin;
overflow-y: auto;
overflow-x: hidden;
}

[data-bs-theme=light] .dashboard-wrapper .card .card-header {
background-color: #fff !important;
}
[data-bs-theme=light] .dashboard-wrapper .card .card-footer {
background-color: #fff !important;
.dashboard-body-container {
scrollbar-width: thin;
overflow-y: auto;
}

[data-bs-theme=dark] .dashboard-wrapper .card .card-header {
background-color: rgb(24, 26, 27) !important;
}
[data-bs-theme=dark] .dashboard-wrapper .card .card-footer {
background-color: rgb(24, 26, 27) !important;
.dashboard-meta {
padding: 0.5rem !important;
}

.dashboard-handle {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading