mirror of
https://github.com/shuaiplus/nodewarden.git
synced 2026-06-20 13:00:39 +00:00
Add new styles for app shell, tokens, and vault components
- Introduced `shell.css` for the main application layout, including styles for the app shell, top bar, and user interactions. - Created `tokens.css` to define CSS variables for theming, including colors, shadows, and transition durations for light and dark modes. - Developed `vault.css` for the vault component, implementing grid layouts, sidebar styles, search inputs, and list item designs.
This commit is contained in:
@@ -0,0 +1,321 @@
|
||||
.app-page {
|
||||
min-height: 100%;
|
||||
padding: 20px;
|
||||
position: relative;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.app-shell {
|
||||
height: calc(100vh - 40px);
|
||||
max-width: 1600px;
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
background: var(--panel-soft);
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 28px;
|
||||
box-shadow: var(--shadow-lg);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
animation: shell-enter 560ms var(--ease-out-strong) both;
|
||||
}
|
||||
|
||||
.topbar {
|
||||
height: 58px;
|
||||
border-bottom: 1px solid var(--line-soft);
|
||||
color: #0f172a;
|
||||
background: rgba(244, 248, 255, 0.72);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 18px;
|
||||
transition: background-color var(--dur-fast) var(--ease-smooth), border-color var(--dur-fast) var(--ease-smooth);
|
||||
}
|
||||
|
||||
.brand {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
font-size: 34px;
|
||||
font-weight: 800;
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.brand-wordmark {
|
||||
display: block;
|
||||
height: auto;
|
||||
width: clamp(210px, 20vw, 290px);
|
||||
max-width: 100%;
|
||||
filter: drop-shadow(0 12px 24px rgba(43, 102, 217, 0.12));
|
||||
}
|
||||
|
||||
.mobile-page-title {
|
||||
display: none;
|
||||
min-width: 0;
|
||||
max-width: min(58vw, 240px);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 19px;
|
||||
line-height: 1.2;
|
||||
font-weight: 800;
|
||||
color: #0f172a;
|
||||
}
|
||||
|
||||
.brand-logo {
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
object-fit: contain;
|
||||
filter: drop-shadow(0 10px 22px rgba(43, 102, 217, 0.22));
|
||||
transition: transform var(--dur-medium) var(--ease-out-soft), filter var(--dur-medium) var(--ease-out-soft);
|
||||
}
|
||||
|
||||
.topbar-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.mobile-tabbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.mobile-sidebar-toggle {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.mobile-lock-btn {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.mobile-theme-btn {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.theme-switch-wrap {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.theme-switch {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 56px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.theme-switch-input {
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.theme-switch-slider {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: linear-gradient(180deg, #dceaff, #c8dcff);
|
||||
border: 1px solid #9dbbec;
|
||||
transition:
|
||||
background var(--dur-medium) var(--ease-out-soft),
|
||||
border-color var(--dur-medium) var(--ease-smooth),
|
||||
box-shadow var(--dur-fast) var(--ease-out-soft),
|
||||
transform var(--dur-fast) var(--ease-out-soft);
|
||||
border-radius: 999px;
|
||||
}
|
||||
|
||||
.theme-switch-slider::before {
|
||||
position: absolute;
|
||||
content: '';
|
||||
height: 26px;
|
||||
width: 26px;
|
||||
border-radius: 999px;
|
||||
left: 2px;
|
||||
bottom: 2px;
|
||||
z-index: 2;
|
||||
background: linear-gradient(180deg, #ffffff, #edf4ff);
|
||||
box-shadow: 0 2px 8px rgba(15, 23, 42, 0.14);
|
||||
transition:
|
||||
transform var(--dur-medium) var(--ease-out-strong),
|
||||
box-shadow var(--dur-fast) var(--ease-out-soft),
|
||||
background var(--dur-fast) var(--ease-smooth);
|
||||
}
|
||||
|
||||
.theme-switch .sun svg {
|
||||
position: absolute;
|
||||
top: 6px;
|
||||
left: 32px;
|
||||
z-index: 1;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
opacity: 0.95;
|
||||
transition: transform var(--dur-medium) var(--ease-out-soft), opacity var(--dur-fast) var(--ease-smooth);
|
||||
}
|
||||
|
||||
.theme-switch .moon svg {
|
||||
fill: #5b86d6;
|
||||
position: absolute;
|
||||
top: 7px;
|
||||
left: 7px;
|
||||
z-index: 1;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
opacity: 0.88;
|
||||
transition: transform var(--dur-medium) var(--ease-out-soft), opacity var(--dur-fast) var(--ease-smooth);
|
||||
}
|
||||
|
||||
.theme-switch-input:checked + .theme-switch-slider {
|
||||
background: linear-gradient(180deg, #173150, #122742);
|
||||
border-color: #35527a;
|
||||
}
|
||||
|
||||
.theme-switch-input:focus + .theme-switch-slider {
|
||||
box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.22);
|
||||
}
|
||||
|
||||
.theme-switch-input:checked + .theme-switch-slider::before {
|
||||
transform: translateX(24px);
|
||||
}
|
||||
|
||||
.theme-switch:hover .theme-switch-slider {
|
||||
transform: scale(1.02);
|
||||
}
|
||||
|
||||
.theme-switch:hover .sun svg,
|
||||
.theme-switch:hover .moon svg {
|
||||
transform: scale(1.08);
|
||||
}
|
||||
|
||||
.topbar-actions .btn {
|
||||
height: 34px;
|
||||
border-radius: 12px;
|
||||
padding: 0 12px;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
transform: translate3d(var(--mag-x), var(--mag-y), 0);
|
||||
transition-duration: 220ms;
|
||||
}
|
||||
|
||||
.topbar-actions .btn:hover:not(:disabled) {
|
||||
transform: translate3d(var(--mag-x), calc(var(--mag-y) - 2px), 0) scale(1.02);
|
||||
}
|
||||
|
||||
.user-chip {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
height: 34px;
|
||||
border-radius: 999px;
|
||||
padding: 0 12px;
|
||||
border: 1px solid rgba(148, 163, 184, 0.3);
|
||||
background: rgba(249, 251, 255, 0.92);
|
||||
color: var(--muted-strong);
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
box-shadow: 0 10px 18px rgba(13, 31, 68, 0.05);
|
||||
transform: translate3d(var(--mag-x), var(--mag-y), 0);
|
||||
transition:
|
||||
transform 220ms var(--ease-out-soft),
|
||||
box-shadow var(--dur-fast) var(--ease-out-soft),
|
||||
border-color var(--dur-fast) var(--ease-smooth),
|
||||
background-color var(--dur-fast) var(--ease-smooth);
|
||||
}
|
||||
|
||||
.user-chip:hover {
|
||||
transform: translate3d(var(--mag-x), calc(var(--mag-y) - 1px), 0);
|
||||
box-shadow: 0 16px 28px rgba(15, 23, 42, 0.08);
|
||||
}
|
||||
|
||||
.app-main {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
display: grid;
|
||||
grid-template-columns: 200px 1fr;
|
||||
}
|
||||
|
||||
.app-side {
|
||||
border-right: 1px solid var(--line-soft);
|
||||
padding: 16px 12px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.side-link {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 11px 12px;
|
||||
border-radius: 14px;
|
||||
color: var(--muted-strong);
|
||||
text-decoration: none;
|
||||
border: 1px solid transparent;
|
||||
font-weight: 600;
|
||||
font-size: 14px;
|
||||
transition:
|
||||
background-color var(--dur-fast) var(--ease-smooth),
|
||||
border-color var(--dur-fast) var(--ease-smooth),
|
||||
color var(--dur-fast) var(--ease-smooth),
|
||||
transform var(--dur-fast) var(--ease-out-soft),
|
||||
box-shadow var(--dur-fast) var(--ease-out-soft);
|
||||
}
|
||||
|
||||
.side-link:hover {
|
||||
background: #ffffff;
|
||||
border-color: rgba(128, 152, 192, 0.18);
|
||||
color: var(--text);
|
||||
transform: translate3d(calc(var(--mag-x) + 3px), var(--mag-y), 0);
|
||||
box-shadow: 0 14px 24px rgba(15, 23, 42, 0.05);
|
||||
}
|
||||
|
||||
.side-link.active {
|
||||
background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(59, 130, 246, 0.08));
|
||||
border-color: rgba(37, 99, 235, 0.28);
|
||||
color: var(--primary-strong);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.64), 0 10px 18px rgba(37, 99, 235, 0.1);
|
||||
}
|
||||
|
||||
.content {
|
||||
min-height: 0;
|
||||
padding: 14px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.route-stage {
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
@media (min-width: 901px) {
|
||||
.route-stage {
|
||||
animation: route-stage-in 240ms var(--ease-out-soft) both;
|
||||
}
|
||||
}
|
||||
|
||||
.mobile-sidebar-mask {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: rgba(15, 23, 42, 0.36);
|
||||
z-index: 54;
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
pointer-events: none;
|
||||
transition:
|
||||
opacity 220ms var(--ease-smooth),
|
||||
visibility 220ms var(--ease-smooth);
|
||||
}
|
||||
|
||||
.mobile-sidebar-mask.open {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.mobile-sidebar-head {
|
||||
display: none;
|
||||
}
|
||||
Reference in New Issue
Block a user