feat(frontend): add complete CSS design system and HTML shell
Create the Nexus Terminal design system with dark charcoal palette, teal accent, and premium desktop application styling: - tokens.css: Design tokens (colours, spacing, typography, layout) - base.css: Modern reset, scrollbar, focus, and utility styles - components.css: Buttons, forms, badges, dropdowns, notifications, disclosure, search, empty state, tooltip, spinner - layout.css: App grid shell (sidebar, tab bar, workspace, status bar) - sidebar.css: Connection manager with sections, profile items, search - tabs.css: Compact session tabs with status dots, protocol badges - terminal.css: xterm.js container, RAW mode views, send bar, search - forms.css: Profile editor sections, tag input, jump hosts, validation - modals.css: Modal, drawer, confirmation, host key, settings dialogs - index.html: Complete HTML shell with sidebar, tabs, workspace, status
This commit is contained in:
@@ -0,0 +1,311 @@
|
||||
/* ==========================================================================
|
||||
Nexus Terminal — Sidebar
|
||||
Connection manager: logo, search, sections, profile list, footer.
|
||||
========================================================================== */
|
||||
|
||||
/* -----------------------------------------------------------------------
|
||||
Sidebar header (logo / title / drag region)
|
||||
----------------------------------------------------------------------- */
|
||||
.sidebar-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: var(--space-3) var(--space-4);
|
||||
min-height: var(--tab-bar-height);
|
||||
border-bottom: 1px solid var(--border-subtle);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.sidebar-logo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-2);
|
||||
}
|
||||
|
||||
.sidebar-logo svg {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
color: var(--accent);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.sidebar-title {
|
||||
font-size: var(--text-sm);
|
||||
font-weight: var(--weight-semibold);
|
||||
color: var(--text-primary);
|
||||
letter-spacing: 0.02em;
|
||||
}
|
||||
|
||||
/* -----------------------------------------------------------------------
|
||||
Sidebar search
|
||||
----------------------------------------------------------------------- */
|
||||
.sidebar-search {
|
||||
padding: var(--space-2) var(--space-3);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* -----------------------------------------------------------------------
|
||||
Sidebar navigation (scrollable area)
|
||||
----------------------------------------------------------------------- */
|
||||
.sidebar-nav {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
padding-bottom: var(--space-2);
|
||||
}
|
||||
|
||||
/* -----------------------------------------------------------------------
|
||||
Sections (Favourites, Recent, All Connections)
|
||||
----------------------------------------------------------------------- */
|
||||
.sidebar-section {
|
||||
/* Each section can be collapsed */
|
||||
}
|
||||
|
||||
.sidebar-section + .sidebar-section {
|
||||
border-top: 1px solid var(--border-subtle);
|
||||
}
|
||||
|
||||
.sidebar-section-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-2);
|
||||
width: 100%;
|
||||
padding: var(--space-2) var(--space-3);
|
||||
font-size: var(--text-xs);
|
||||
font-weight: var(--weight-semibold);
|
||||
color: var(--text-tertiary);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.06em;
|
||||
cursor: pointer;
|
||||
transition: color var(--transition-fast), background var(--transition-fast);
|
||||
user-select: none;
|
||||
text-align: left;
|
||||
background: none;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.sidebar-section-header:hover {
|
||||
color: var(--text-secondary);
|
||||
background: var(--bg-hover);
|
||||
}
|
||||
|
||||
.sidebar-section-header .section-icon {
|
||||
width: 14px;
|
||||
text-align: center;
|
||||
flex-shrink: 0;
|
||||
font-size: var(--text-sm);
|
||||
}
|
||||
|
||||
.sidebar-section-header .section-chevron {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
margin-right: var(--space-1);
|
||||
flex-shrink: 0;
|
||||
transition: transform var(--transition-normal);
|
||||
color: var(--text-disabled);
|
||||
}
|
||||
|
||||
.sidebar-section.is-collapsed .section-chevron {
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
|
||||
.section-count {
|
||||
margin-left: auto;
|
||||
font-size: 10px;
|
||||
font-weight: var(--weight-normal);
|
||||
color: var(--text-disabled);
|
||||
background: var(--bg-overlay);
|
||||
padding: 0 var(--space-1);
|
||||
border-radius: var(--radius-sm);
|
||||
min-width: 18px;
|
||||
text-align: center;
|
||||
line-height: 16px;
|
||||
}
|
||||
|
||||
/* -----------------------------------------------------------------------
|
||||
Sidebar list (container for items)
|
||||
----------------------------------------------------------------------- */
|
||||
.sidebar-list {
|
||||
padding: 0 var(--space-2);
|
||||
}
|
||||
|
||||
.sidebar-section.is-collapsed .sidebar-list {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* -----------------------------------------------------------------------
|
||||
Sidebar item (individual connection profile)
|
||||
----------------------------------------------------------------------- */
|
||||
.sidebar-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-2);
|
||||
padding: var(--space-2) var(--space-2);
|
||||
margin-bottom: 1px;
|
||||
border-radius: var(--radius-md);
|
||||
cursor: pointer;
|
||||
transition:
|
||||
background var(--transition-fast),
|
||||
box-shadow var(--transition-fast);
|
||||
user-select: none;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.sidebar-item:hover {
|
||||
background: var(--bg-hover);
|
||||
}
|
||||
|
||||
.sidebar-item:active {
|
||||
background: var(--bg-active);
|
||||
}
|
||||
|
||||
/* Active / selected state */
|
||||
.sidebar-item.active {
|
||||
background: var(--accent-muted);
|
||||
}
|
||||
.sidebar-item.active::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 4px;
|
||||
bottom: 4px;
|
||||
width: 2px;
|
||||
border-radius: var(--radius-full);
|
||||
background: var(--accent);
|
||||
}
|
||||
|
||||
/* Protocol colour indicator dot */
|
||||
.sidebar-item .protocol-indicator {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
flex-shrink: 0;
|
||||
background: var(--text-tertiary);
|
||||
}
|
||||
.sidebar-item .protocol-indicator.proto-ssh { background: var(--protocol-ssh); }
|
||||
.sidebar-item .protocol-indicator.proto-telnet { background: var(--protocol-telnet); }
|
||||
.sidebar-item .protocol-indicator.proto-raw { background: var(--protocol-raw); }
|
||||
|
||||
/* Text block (name + host) */
|
||||
.sidebar-item-text {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.sidebar-item-name {
|
||||
font-size: var(--text-sm);
|
||||
font-weight: var(--weight-medium);
|
||||
color: var(--text-primary);
|
||||
line-height: var(--leading-tight);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.sidebar-item-host {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--text-tertiary);
|
||||
font-family: var(--font-mono);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
line-height: var(--leading-tight);
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
/* Favourite star */
|
||||
.sidebar-item-star {
|
||||
flex-shrink: 0;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 11px;
|
||||
color: var(--text-disabled);
|
||||
border-radius: var(--radius-sm);
|
||||
opacity: 0;
|
||||
transition: opacity var(--transition-fast), color var(--transition-fast);
|
||||
}
|
||||
|
||||
.sidebar-item:hover .sidebar-item-star {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.sidebar-item-star.is-favourite {
|
||||
opacity: 1;
|
||||
color: var(--warning);
|
||||
}
|
||||
|
||||
.sidebar-item-star:hover {
|
||||
color: var(--warning);
|
||||
}
|
||||
|
||||
/* Inline status dot (right side, tiny) */
|
||||
.sidebar-item-status {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
border-radius: 50%;
|
||||
flex-shrink: 0;
|
||||
margin-right: var(--space-1);
|
||||
}
|
||||
.sidebar-item-status.is-connected { background: var(--success); }
|
||||
.sidebar-item-status.is-connecting { background: var(--warning); animation: pulse-dot 1.2s ease infinite; }
|
||||
.sidebar-item-status.is-error { background: var(--error); }
|
||||
|
||||
/* -----------------------------------------------------------------------
|
||||
Sidebar empty list placeholder
|
||||
----------------------------------------------------------------------- */
|
||||
.sidebar-list-empty {
|
||||
padding: var(--space-3) var(--space-2);
|
||||
font-size: var(--text-xs);
|
||||
color: var(--text-disabled);
|
||||
text-align: center;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* -----------------------------------------------------------------------
|
||||
Sidebar footer (actions)
|
||||
----------------------------------------------------------------------- */
|
||||
.sidebar-footer {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-1);
|
||||
padding: var(--space-2) var(--space-3);
|
||||
border-top: 1px solid var(--border-subtle);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.sidebar-footer .btn:first-child {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
/* -----------------------------------------------------------------------
|
||||
Sidebar collapsed state
|
||||
----------------------------------------------------------------------- */
|
||||
.sidebar-collapsed .sidebar-header {
|
||||
justify-content: center;
|
||||
padding: var(--space-3) var(--space-2);
|
||||
}
|
||||
.sidebar-collapsed .sidebar-title,
|
||||
.sidebar-collapsed .sidebar-search,
|
||||
.sidebar-collapsed .sidebar-section-header span:not(.section-icon),
|
||||
.sidebar-collapsed .sidebar-item-text,
|
||||
.sidebar-collapsed .sidebar-item-star,
|
||||
.sidebar-collapsed .section-count,
|
||||
.sidebar-collapsed .sidebar-footer .btn:first-child span {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.sidebar-collapsed .sidebar-item {
|
||||
justify-content: center;
|
||||
padding: var(--space-2);
|
||||
}
|
||||
|
||||
.sidebar-collapsed .sidebar-section-header {
|
||||
justify-content: center;
|
||||
padding: var(--space-2);
|
||||
}
|
||||
|
||||
.sidebar-collapsed .sidebar-footer {
|
||||
flex-direction: column;
|
||||
}
|
||||
Reference in New Issue
Block a user