feat: unified header across all pages (Notion-inspired breadcrumb + actions)
Created a shared _header.html template with: - Hamburger button (toggle sidebar) - Breadcrumb navigation with clickable segments and separators - Page icon + title display - Right-side action buttons (configurable per page) - Dropdown panel CSS for More/New menus Updated all pages to use the unified header: - workspaces.html: Home / Workspaces + login/settings - workspace.html: Workspace — Projects + login/settings - local_workspace.html: workspace name - gitea_workspace.html: Home / owner/repo + New/Upload/Refresh/Settings - page_editor.html: title + Edited/Share/Copy/Favorite/More dropdown - settings.html: Settings Added CSS for breadcrumb, dropdown panel components.
This commit is contained in:
@@ -807,6 +807,104 @@ input, select, textarea { font-family: inherit; color: inherit; }
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
/* ── Unified Header Breadcrumb ── */
|
||||
.header-breadcrumb {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
font-size: 14px;
|
||||
overflow: hidden;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.header-page-icon {
|
||||
font-size: 16px;
|
||||
flex-shrink: 0;
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
.breadcrumb-link {
|
||||
color: var(--text-secondary);
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
flex-shrink: 0;
|
||||
padding: 2px 4px;
|
||||
border-radius: 4px;
|
||||
transition: background 100ms, color 100ms;
|
||||
}
|
||||
|
||||
.breadcrumb-link:hover {
|
||||
background: var(--bg-hover);
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.breadcrumb-link.disabled {
|
||||
cursor: default;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.breadcrumb-sep {
|
||||
color: var(--text-tertiary);
|
||||
flex-shrink: 0;
|
||||
font-size: 12px;
|
||||
margin: 0 1px;
|
||||
}
|
||||
|
||||
.breadcrumb-current {
|
||||
color: var(--text-primary);
|
||||
font-weight: 500;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.header-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* ── Dropdown panel (reusable) ── */
|
||||
.dropdown-panel {
|
||||
position: absolute;
|
||||
display: none;
|
||||
background: var(--bg-secondary);
|
||||
border: 1px solid var(--border-strong);
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 8px 24px rgba(0,0,0,.4);
|
||||
z-index: 1000;
|
||||
padding: 4px;
|
||||
min-width: 160px;
|
||||
}
|
||||
|
||||
.dropdown-panel.visible {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.dropdown-option {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 6px 10px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-size: 13px;
|
||||
color: var(--text-primary);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.dropdown-option:hover {
|
||||
background: var(--bg-hover);
|
||||
}
|
||||
|
||||
.option-icon {
|
||||
font-size: 16px;
|
||||
width: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.topbar-breadcrumb a:hover {
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user