Files
Cli-Proxy-API-Management-Ce…/src/styles/layout.scss
T
Supra4E8C 0095933238 Enhance Dashboard and Layout Styles
- Updated opacity and blur effects for background elements in DashboardPage.
- Adjusted radial gradient color mixes for visual consistency.
- Increased font sizes and modified letter spacing for improved readability in hero sections.
- Implemented a new glassmorphism effect with backdrop filters in various components.
- Refined sidebar styles, including width adjustments and hover effects.
- Enhanced header styles for better responsiveness and visual hierarchy.
- Introduced new gradient backgrounds and box shadows for a modern look.
- Improved mobile responsiveness with adjusted dimensions and layout properties.
2026-04-25 01:05:08 +08:00

722 lines
16 KiB
SCSS

@use './variables.scss' as *;
:root {
--header-height: 80px;
--shell-gutter: 24px;
--sidebar-panel-width: 240px;
--sidebar-collapsed-width: 68px;
--sidebar-active-width: var(--sidebar-panel-width);
--sidebar-gap: 32px;
--floating-control-size: 38px;
}
.app-shell {
--sidebar-active-width: var(--sidebar-panel-width);
position: relative;
display: flex;
flex-direction: column;
min-height: 100vh;
height: 100vh;
overflow: hidden;
background: linear-gradient(180deg, var(--bg-secondary), var(--bg-quinary, var(--bg-secondary)));
color: var(--text-primary);
&.sidebar-is-collapsed {
--sidebar-active-width: var(--sidebar-collapsed-width);
}
@media (max-width: $breakpoint-mobile) {
height: auto;
min-height: 100vh;
overflow: visible;
overflow-y: auto;
}
}
.top-gradient-blur {
position: fixed;
top: 0;
right: 0;
left: 0;
z-index: $z-dropdown - 2;
height: 188px;
pointer-events: none;
background: linear-gradient(
180deg,
color-mix(in srgb, var(--bg-secondary) 88%, #0d0c0a) 0%,
color-mix(in srgb, var(--bg-secondary) 54%, transparent) 36%,
color-mix(in srgb, var(--bg-secondary) 22%, transparent) 66%,
transparent 100%
);
--glass-blur: 22px;
backdrop-filter: var(--glass-backdrop-filter);
-webkit-backdrop-filter: var(--glass-backdrop-filter);
mask-image: linear-gradient(
to bottom,
#000 0%,
rgb(0 0 0 / 0.9) 24%,
rgb(0 0 0 / 0.58) 48%,
rgb(0 0 0 / 0.22) 72%,
transparent 100%
);
-webkit-mask-image: linear-gradient(
to bottom,
#000 0%,
rgb(0 0 0 / 0.9) 24%,
rgb(0 0 0 / 0.58) 48%,
rgb(0 0 0 / 0.22) 72%,
transparent 100%
);
}
.main-header {
position: fixed;
top: 0;
right: 0;
left: 0;
z-index: $z-dropdown + 1;
height: var(--header-height);
pointer-events: none;
background: transparent;
border: 0;
.sidebar-toggle-floating {
position: absolute;
top: var(--shell-gutter);
left: calc(var(--shell-gutter) + var(--sidebar-active-width) + 22px);
width: 44px;
height: 44px;
padding: 0;
border: 1px solid color-mix(in srgb, var(--border-color) 68%, transparent);
border-radius: 12px;
background: color-mix(in srgb, var(--bg-primary) 70%, transparent);
color: var(--text-secondary);
box-shadow:
0 16px 38px rgb(0 0 0 / 0.16),
inset 0 1px 0 rgb(255 255 255 / 0.04);
--glass-blur: 14px;
backdrop-filter: var(--glass-backdrop-filter);
-webkit-backdrop-filter: var(--glass-backdrop-filter);
cursor: pointer;
pointer-events: auto;
display: inline-flex;
align-items: center;
justify-content: center;
transition:
background $transition-fast,
border-color $transition-fast,
color $transition-fast,
transform $transition-fast,
left $transition-normal;
&:hover {
background: color-mix(in srgb, var(--bg-primary) 86%, transparent);
border-color: color-mix(in srgb, var(--border-hover) 80%, transparent);
color: var(--text-primary);
transform: translateY(-1px);
}
&:active {
transform: translateY(0);
}
&:focus-visible {
outline: none;
box-shadow:
0 0 0 2px color-mix(in srgb, var(--primary-color) 24%, transparent),
0 16px 38px rgb(0 0 0 / 0.16);
}
}
.header-actions {
position: absolute;
top: var(--shell-gutter);
right: var(--shell-gutter);
display: inline-flex;
align-items: center;
gap: 4px;
padding: 6px;
border: 1px solid color-mix(in srgb, var(--border-color) 68%, transparent);
border-radius: 16px;
background: color-mix(in srgb, var(--bg-primary) 68%, transparent);
color: var(--text-secondary);
box-shadow:
0 18px 44px rgb(0 0 0 / 0.17),
inset 0 1px 0 rgb(255 255 255 / 0.04);
--glass-blur: 16px;
backdrop-filter: var(--glass-backdrop-filter);
-webkit-backdrop-filter: var(--glass-backdrop-filter);
pointer-events: auto;
}
.header-actions .btn {
width: var(--floating-control-size);
height: var(--floating-control-size);
min-width: var(--floating-control-size);
padding: 0;
border-radius: 11px;
background: transparent;
color: var(--text-secondary);
border-color: transparent;
> span {
display: inline-flex;
align-items: center;
justify-content: center;
line-height: 0;
}
&:hover {
background: color-mix(in srgb, var(--text-primary) 8%, transparent);
color: var(--text-primary);
border-color: transparent;
}
&:focus-visible {
outline: none;
box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary-color) 26%, transparent);
}
}
.mobile-menu-btn {
display: none;
flex-shrink: 0;
}
.language-menu,
.theme-menu {
position: relative;
display: inline-flex;
align-items: center;
}
.language-menu-popover,
.theme-menu-popover {
position: absolute;
top: calc(100% + 12px);
right: 0;
z-index: $z-dropdown + 2;
border: 1px solid color-mix(in srgb, var(--border-color) 74%, transparent);
background: color-mix(in srgb, var(--bg-primary) 88%, transparent);
box-shadow: 0 20px 48px rgb(0 0 0 / 0.22);
--glass-blur: 16px;
backdrop-filter: var(--glass-backdrop-filter);
-webkit-backdrop-filter: var(--glass-backdrop-filter);
}
.language-menu-popover {
min-width: 164px;
padding: $spacing-xs;
display: flex;
flex-direction: column;
gap: 2px;
}
.language-menu-option {
width: 100%;
border: none;
border-radius: $radius-sm;
background: transparent;
color: var(--text-primary);
cursor: pointer;
padding: 8px 10px;
font-size: 14px;
font-weight: 500;
display: flex;
align-items: center;
justify-content: space-between;
transition:
background-color $transition-fast,
color $transition-fast;
&:hover {
background: color-mix(in srgb, var(--text-primary) 8%, transparent);
}
&:focus-visible {
outline: none;
background: color-mix(in srgb, var(--text-primary) 8%, transparent);
box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary-color) 22%, transparent);
}
&.active {
color: var(--primary-color);
font-weight: 600;
}
}
.language-menu-check {
font-size: 13px;
line-height: 1;
}
.theme-menu-popover {
padding: $spacing-sm $spacing-sm $spacing-xs;
display: flex;
gap: $spacing-xs;
width: max-content;
max-width: calc(100vw - 16px);
}
.theme-card {
border: 2px solid transparent;
border-radius: $radius-md;
background: transparent;
cursor: pointer;
padding: 6px 6px 4px;
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
transition:
border-color $transition-fast,
background-color $transition-fast;
&:hover {
background: color-mix(in srgb, var(--text-primary) 8%, transparent);
}
&:focus-visible {
outline: none;
box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary-color) 22%, transparent);
}
&.active {
border-color: var(--primary-color);
}
}
.theme-card-preview {
width: 72px;
height: 52px;
border-radius: $radius-sm;
overflow: hidden;
display: flex;
flex-direction: column;
}
.theme-card-header {
height: 10px;
flex-shrink: 0;
}
.theme-card-body {
flex: 1;
display: flex;
min-height: 0;
}
.theme-card-sidebar {
width: 16px;
flex-shrink: 0;
}
.theme-card-content {
flex: 1;
padding: 5px 8px;
display: flex;
flex-direction: column;
gap: 4px;
justify-content: center;
}
.theme-card-line {
height: 3px;
border-radius: 1px;
&.short {
width: 60%;
}
}
.theme-card-label {
font-size: 11px;
color: var(--text-primary);
font-weight: 500;
white-space: nowrap;
}
svg {
display: block;
}
}
.main-body {
position: relative;
display: flex;
flex: 1;
gap: var(--sidebar-gap);
min-height: 0;
height: 100vh;
padding: var(--shell-gutter);
overflow: hidden;
@supports (height: 100dvh) {
height: 100dvh;
}
}
.sidebar-backdrop {
display: none;
border: 0;
padding: 0;
margin: 0;
background: rgb(8 8 8 / 0.34);
opacity: 0;
pointer-events: none;
transition: opacity $transition-fast;
backdrop-filter: blur(4px);
-webkit-backdrop-filter: blur(4px);
}
.sidebar {
position: relative;
z-index: $z-dropdown - 1;
width: var(--sidebar-panel-width);
height: calc(100vh - var(--shell-gutter) - var(--shell-gutter));
padding: 18px 14px;
display: flex;
flex-direction: column;
gap: $spacing-md;
flex-shrink: 0;
overflow-y: auto;
background:
linear-gradient(180deg, rgb(255 255 255 / 0.035), rgb(255 255 255 / 0)),
color-mix(in srgb, var(--bg-primary) 72%, transparent);
border: 1px solid color-mix(in srgb, var(--border-color) 72%, transparent);
border-radius: 18px;
box-shadow:
0 26px 58px rgb(0 0 0 / 0.22),
inset 0 1px 0 rgb(255 255 255 / 0.04);
--glass-blur: 18px;
backdrop-filter: var(--glass-backdrop-filter);
-webkit-backdrop-filter: var(--glass-backdrop-filter);
scrollbar-width: none;
transition:
width $transition-normal,
transform $transition-normal,
padding $transition-normal;
@supports (height: 100dvh) {
height: calc(100dvh - var(--shell-gutter) - var(--shell-gutter));
}
&::-webkit-scrollbar {
display: none;
}
&.collapsed {
width: var(--sidebar-collapsed-width);
padding: 18px 10px;
.sidebar-brand {
justify-content: center;
padding-right: 0;
padding-left: 0;
}
.nav-item {
justify-content: center;
padding: 10px;
}
}
.sidebar-brand {
display: flex;
align-items: center;
gap: 10px;
min-height: 42px;
padding: 0 10px 12px;
color: var(--text-primary);
flex-shrink: 0;
}
.sidebar-brand-logo {
width: 34px;
height: 34px;
object-fit: contain;
border-radius: 8px;
box-shadow: 0 8px 18px rgb(0 0 0 / 0.18);
flex-shrink: 0;
}
.sidebar-brand-title {
min-width: 0;
overflow: hidden;
color: var(--text-primary);
font-size: 18px;
font-weight: 800;
letter-spacing: 0;
white-space: nowrap;
}
.nav-section {
display: flex;
flex-direction: column;
gap: $spacing-sm;
flex: 1;
}
.nav-item {
padding: 10px 12px;
border-radius: 11px;
border: 1px solid transparent;
color: var(--text-primary);
font-weight: 650;
text-decoration: none;
display: flex;
align-items: center;
gap: $spacing-sm;
cursor: pointer;
transition:
background $transition-fast,
border-color $transition-fast,
color $transition-fast,
transform $transition-fast;
.nav-icon {
width: 28px;
height: 28px;
display: inline-flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
color: currentColor;
opacity: 0.96;
border-radius: 8px;
background:
linear-gradient(180deg, rgb(255 255 255 / 0.12), rgb(255 255 255 / 0)),
color-mix(in srgb, var(--bg-secondary) 84%, transparent);
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--border-primary) 82%, transparent);
transition:
background $transition-fast,
box-shadow $transition-fast,
color $transition-fast;
svg {
width: 18px;
height: 18px;
display: block;
}
}
.nav-label {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
&:hover {
background: color-mix(in srgb, var(--text-primary) 7%, transparent);
border-color: color-mix(in srgb, var(--border-color) 58%, transparent);
transform: translateX(1px);
.nav-icon {
background:
linear-gradient(180deg, rgb(255 255 255 / 0.16), rgb(255 255 255 / 0)),
color-mix(in srgb, var(--bg-primary) 88%, transparent);
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--border-hover) 86%, transparent);
}
}
&.active {
background: color-mix(in srgb, var(--text-primary) 10%, transparent);
color: var(--text-primary);
border-color: color-mix(in srgb, var(--border-hover) 70%, transparent);
box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.04);
.nav-icon {
color: var(--primary-active);
background:
linear-gradient(180deg, rgb(255 255 255 / 0.18), rgb(255 255 255 / 0)),
color-mix(in srgb, var(--primary-color) 14%, var(--bg-primary));
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary-color) 24%, transparent);
}
}
}
}
.content {
flex: 1;
display: flex;
flex-direction: column;
min-width: 0;
height: calc(100vh - var(--shell-gutter) - var(--shell-gutter));
overflow-y: auto;
scrollbar-gutter: stable;
@supports (height: 100dvh) {
height: calc(100dvh - var(--shell-gutter) - var(--shell-gutter));
}
&.content-logs {
overflow: hidden;
}
}
.main-content {
flex: 1 0 auto;
min-height: 100%;
padding: 70px clamp(20px, 3vw, 48px) 40px;
display: flex;
flex-direction: column;
gap: $spacing-lg;
overflow-x: hidden;
&.main-content-logs {
flex: 1 1 auto;
min-height: 0;
overflow: hidden;
}
}
.grid {
display: grid;
gap: $spacing-lg;
}
@media (min-width: $breakpoint-tablet) {
.grid.cols-2 {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
@media (max-width: $breakpoint-mobile) {
:root {
--header-height: 74px;
--shell-gutter: 12px;
--sidebar-panel-width: min(280px, calc(100vw - 24px));
--floating-control-size: 36px;
}
.top-gradient-blur {
height: 152px;
}
.main-header {
.sidebar-toggle-floating {
display: none;
}
.header-actions {
top: var(--shell-gutter);
right: var(--shell-gutter);
max-width: calc(100vw - var(--shell-gutter) - var(--shell-gutter));
padding: 5px;
gap: 2px;
border-radius: 14px;
}
.mobile-menu-btn {
display: inline-flex;
}
.language-menu-popover {
right: auto;
left: 0;
}
.theme-menu-popover {
right: 0;
left: auto;
transform: none;
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
justify-content: stretch;
width: min(188px, calc(100vw - 16px));
}
.theme-card {
width: 100%;
min-width: 0;
}
.theme-card-label {
white-space: normal;
text-align: center;
line-height: 1.2;
}
}
.main-body {
height: auto;
min-height: 100vh;
padding: 0;
overflow: visible;
@supports (min-height: 100dvh) {
min-height: 100dvh;
}
}
.sidebar-backdrop {
display: block;
position: fixed;
inset: 0;
z-index: $z-dropdown - 1;
background: rgb(8 8 8 / 0.46);
&.visible {
opacity: 1;
pointer-events: auto;
}
}
.sidebar {
position: fixed;
top: calc(var(--header-height) + 4px);
bottom: var(--shell-gutter);
left: var(--shell-gutter);
z-index: $z-dropdown;
width: var(--sidebar-panel-width);
height: auto;
transform: translateX(calc(-100% - 24px));
background:
linear-gradient(180deg, rgb(255 255 255 / 0.045), rgb(255 255 255 / 0)),
color-mix(in srgb, var(--bg-primary) 94%, #0f0e0c);
border-color: color-mix(in srgb, var(--border-color) 88%, transparent);
box-shadow:
0 28px 62px rgb(0 0 0 / 0.34),
inset 0 1px 0 rgb(255 255 255 / 0.04);
&.open {
transform: translateX(0);
}
&.collapsed {
width: var(--sidebar-panel-width);
padding: 18px 14px;
.sidebar-brand,
.nav-item {
justify-content: flex-start;
}
}
}
.content {
height: auto;
min-height: 100vh;
overflow: visible;
overflow-y: auto;
&.content-logs {
overflow: visible;
overflow-y: auto;
height: auto;
}
}
.main-content {
padding: calc(var(--header-height) + 16px) $spacing-md $spacing-lg;
&.main-content-logs {
flex: 0 0 auto;
min-height: auto;
overflow: visible;
}
}
}