style(electron): tool bar refactor to give two levels
This commit is contained in:
@@ -49,69 +49,241 @@ body {
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
width: var(--sidebar-width);
|
||||
/* Two-Tiered Sidebar System */
|
||||
|
||||
/* Primary Sidebar (Tier 1) - Category Bar */
|
||||
.primary-sidebar {
|
||||
width: 60px;
|
||||
background-color: var(--sidebar-bg);
|
||||
border-right: 1px solid var(--border-color);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
transition: background-color 0.2s;
|
||||
transition: width 0.3s ease, background-color 0.2s;
|
||||
overflow: hidden;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.sidebar-header {
|
||||
.primary-sidebar:hover {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.primary-sidebar-header {
|
||||
padding: 20px;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(147, 197, 253, 0.02) 100%);
|
||||
}
|
||||
|
||||
.brand-icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 6px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* Ensure proper centering in collapsed state */
|
||||
.primary-sidebar:not(:hover) .brand-icon {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.primary-sidebar:not(:hover) .app-title {
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.star-icon {
|
||||
font-size: 18px;
|
||||
color: #3b82f6;
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.brand-text {
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
color: #1f2937;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.app-title {
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
color: #1f2937;
|
||||
letter-spacing: 1px;
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.primary-sidebar:hover .app-title {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.category-nav {
|
||||
padding: 15px 0;
|
||||
flex-grow: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.category-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 12px 16px;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
white-space: nowrap;
|
||||
margin: 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.category-item:hover {
|
||||
background-color: var(--hover-color);
|
||||
}
|
||||
|
||||
.category-item.active {
|
||||
background-color: rgba(59, 130, 246, 0.1);
|
||||
border-left: 3px solid var(--primary-color);
|
||||
padding-left: 13px;
|
||||
}
|
||||
|
||||
.category-icon {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: white;
|
||||
font-weight: 600;
|
||||
font-size: 14px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.category-label {
|
||||
font-size: 0.9rem;
|
||||
font-weight: 500;
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
|
||||
.primary-sidebar:hover .category-label {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.primary-sidebar-footer {
|
||||
padding: 12px 16px 16px 16px;
|
||||
border-top: 1px solid var(--border-color);
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
min-height: 40px;
|
||||
}
|
||||
|
||||
.version-info {
|
||||
font-size: 0.8rem;
|
||||
color: var(--text-light);
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
|
||||
.primary-sidebar:hover .version-info {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* Secondary Sidebar (Tier 2) - Content Sidebar */
|
||||
.secondary-sidebar {
|
||||
width: var(--sidebar-width);
|
||||
background-color: #fafbfc;
|
||||
border-right: 1px solid #e5e7eb;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
transition: background-color 0.2s;
|
||||
box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.sidebar-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.sidebar-content.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.sidebar-header {
|
||||
padding: 24px 24px 20px 24px;
|
||||
border-bottom: 1px solid #e5e7eb;
|
||||
text-align: center;
|
||||
background: linear-gradient(135deg, rgba(59, 130, 246, 0.02) 0%, rgba(147, 197, 253, 0.01) 100%);
|
||||
}
|
||||
|
||||
.sidebar-header h3 {
|
||||
font-size: 1.2rem;
|
||||
font-weight: 600;
|
||||
font-size: 1.3rem;
|
||||
font-weight: 700;
|
||||
color: #1f2937;
|
||||
margin: 0;
|
||||
letter-spacing: -0.025em;
|
||||
}
|
||||
|
||||
.sidebar-nav {
|
||||
padding: 15px 10px;
|
||||
padding: 24px 20px;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.nav-button {
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: 12px 15px;
|
||||
padding: 14px 20px;
|
||||
margin-bottom: 8px;
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
background-color: transparent;
|
||||
color: var(--text-color);
|
||||
font-size: 0.95rem;
|
||||
background: white;
|
||||
border: 1px solid #e5e7eb;
|
||||
text-align: left;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.2s, color 0.2s;
|
||||
border-radius: 10px;
|
||||
transition: all 0.2s ease;
|
||||
font-size: 0.95rem;
|
||||
font-weight: 500;
|
||||
color: #374151;
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.nav-button:hover {
|
||||
background-color: var(--primary-color);
|
||||
color: white;
|
||||
background-color: #f8fafc;
|
||||
border-color: #d1d5db;
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.nav-button.active {
|
||||
background-color: var(--primary-color);
|
||||
background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
|
||||
border-color: #2563eb;
|
||||
color: white;
|
||||
font-weight: 600;
|
||||
box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
|
||||
}
|
||||
|
||||
.sidebar-footer {
|
||||
padding: 12px 16px 16px 16px;
|
||||
font-size: 0.8rem;
|
||||
color: var(--text-light);
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
.nav-button.active:hover {
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
|
||||
}
|
||||
|
||||
/* Info Button in Sidebar */
|
||||
.empty-state {
|
||||
padding: 60px 24px;
|
||||
text-align: center;
|
||||
color: #9ca3af;
|
||||
font-style: italic;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
/* Info Button Updates */
|
||||
.info-button {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -137,6 +309,15 @@ body {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.info-label {
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
|
||||
.primary-sidebar:hover .info-label {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* Content Area */
|
||||
.content-area {
|
||||
flex-grow: 1;
|
||||
|
||||
Reference in New Issue
Block a user