feat: add Notion-style breadcrumb navigation with dropdown menus
FlowDeck CI / test (push) Failing after 5s
FlowDeck CI / docker (push) Has been skipped

Backend:
- Added _nav_breadcrumb() to build page hierarchy chain (root → current)
- New /api/nav/menu endpoint returns workspace/folder children with has_children flag
- view_page() and view_page_root() now pass breadcrumb_items, nav_workspace_id, nav_page_id to template

Header template (_header.html):
- Replaced static breadcrumb with Alpine.js fdBreadcrumb() component
- Breadcrumb items now clickable with dropdown menus showing
This commit is contained in:
2026-07-17 23:30:59 -04:00
parent 6f1eabf91d
commit d751415308
14 changed files with 471 additions and 27 deletions
+107 -4
View File
@@ -843,13 +843,25 @@ input, select, textarea { font-family: inherit; color: inherit; }
.header-breadcrumb {
display: flex;
align-items: center;
gap: 4px;
gap: 2px;
font-size: 14px;
overflow: hidden;
overflow: visible;
flex: 1;
min-width: 0;
}
.crumb-cell {
display: inline-flex;
align-items: center;
min-width: 0;
}
.crumb-anchor {
position: relative;
display: inline-flex;
align-items: center;
}
.header-page-icon {
font-size: 16px;
flex-shrink: 0;
@@ -861,7 +873,16 @@ input, select, textarea { font-family: inherit; color: inherit; }
text-decoration: none;
white-space: nowrap;
flex-shrink: 0;
padding: 2px 4px;
max-width: 220px;
overflow: hidden;
text-overflow: ellipsis;
padding: 2px 6px;
border: none;
background: transparent;
font: inherit;
font-size: 14px;
line-height: 1.4;
cursor: pointer;
border-radius: 4px;
transition: background 100ms, color 100ms;
}
@@ -876,11 +897,17 @@ input, select, textarea { font-family: inherit; color: inherit; }
opacity: 0.6;
}
.crumb-ellipsis {
font-weight: 600;
letter-spacing: 1px;
}
.breadcrumb-sep {
color: var(--text-tertiary);
flex-shrink: 0;
font-size: 12px;
font-size: 13px;
margin: 0 1px;
user-select: none;
}
.breadcrumb-current {
@@ -891,6 +918,8 @@ input, select, textarea { font-family: inherit; color: inherit; }
text-overflow: ellipsis;
}
button.breadcrumb-current { max-width: 260px; }
.header-actions {
display: flex;
align-items: center;
@@ -898,6 +927,80 @@ input, select, textarea { font-family: inherit; color: inherit; }
flex-shrink: 0;
}
/* ── Breadcrumb navigation dropdown (Notion-style) ── */
.fd-nav-menu {
position: absolute;
top: calc(100% + 4px);
left: 0;
min-width: 240px;
max-width: 320px;
overflow: visible;
background: var(--bg-modal, #fff);
border: 1px solid var(--border);
border-radius: var(--radius-lg, 8px);
box-shadow: var(--shadow-popover, 0 6px 24px rgba(0,0,0,0.25));
z-index: 2000;
padding: 6px;
}
.fd-nav-submenu {
top: -6px;
left: calc(100% + 2px);
}
.fd-nav-section {
padding: 4px 8px 6px;
font-size: 11px;
font-weight: 600;
letter-spacing: 0.02em;
color: var(--text-tertiary);
text-transform: none;
}
.fd-nav-empty {
padding: 8px 10px;
font-size: 13px;
color: var(--text-tertiary);
}
.fd-nav-item {
position: relative;
display: flex;
align-items: center;
gap: 8px;
padding: 6px 8px;
border-radius: 6px;
font-size: 14px;
color: var(--text-primary);
cursor: pointer;
white-space: nowrap;
transition: background 100ms;
}
.fd-nav-item:hover {
background: var(--bg-hover);
}
.fd-nav-ico {
font-size: 16px;
width: 20px;
text-align: center;
flex-shrink: 0;
}
.fd-nav-label {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
}
.fd-nav-arrow {
color: var(--text-tertiary);
font-size: 16px;
flex-shrink: 0;
margin-left: 4px;
}
/* ── Dropdown panel (reusable) ── */
.dropdown-panel {
position: absolute;