Mobile bottom toolbar: explorer, search, palette, tab switcher — Obsidian-style
CI / lint (push) Failing after 5s
CI / test (push) Has been skipped
CI / build (push) Has been skipped
CI / security (push) Successful in 8s

This commit is contained in:
2026-06-03 12:04:22 -04:00
parent 60fad18351
commit 4206161def
4 changed files with 418 additions and 0 deletions
+222
View File
@@ -6547,3 +6547,225 @@ body.popup-mode .content-area {
font-size: 0.88rem;
}
}
/* ══════════════════════════════════════════
Mobile Bottom Toolbar (Obsidian-style)
══════════════════════════════════════════ */
.mobile-toolbar {
display: none;
}
@media (max-width: 768px) {
.mobile-toolbar {
display: flex;
position: fixed;
bottom: 0;
left: 0;
right: 0;
height: 56px;
background: var(--bg-secondary);
border-top: 1px solid var(--border);
z-index: 900;
align-items: center;
justify-content: space-around;
padding: 0 4px;
padding-bottom: env(safe-area-inset-bottom, 0);
-webkit-backdrop-filter: blur(12px);
backdrop-filter: blur(12px);
}
/* Push content up to avoid toolbar overlap */
.main-layout {
padding-bottom: 56px;
padding-bottom: calc(56px + env(safe-area-inset-bottom, 0));
}
.editor-modal.active ~ .main-layout {
padding-bottom: 0;
}
.mt-btn {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 2px;
flex: 1;
height: 48px;
padding: 2px 4px;
border: none;
border-radius: 8px;
background: transparent;
color: var(--text-muted);
cursor: pointer;
transition: color 0.15s, background 0.15s;
position: relative;
-webkit-tap-highlight-color: transparent;
}
.mt-btn:active {
background: rgba(255,255,255,0.06);
}
.mt-btn svg {
flex-shrink: 0;
}
.mt-label {
font-size: 10px;
font-weight: 500;
line-height: 1;
}
.mt-btn-primary {
color: var(--accent);
}
.mt-btn-primary .mt-label {
color: var(--accent);
}
/* Tab count badge */
.mt-badge {
position: absolute;
top: 2px;
right: 50%;
transform: translateX(18px);
background: var(--accent);
color: #fff;
font-size: 9px;
font-weight: 700;
min-width: 16px;
height: 16px;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
padding: 0 4px;
line-height: 1;
}
/* ── Tab Switcher Bottom Sheet ── */
.mt-overlay {
display: none;
position: fixed;
inset: 0;
background: rgba(0,0,0,0.5);
z-index: 950;
opacity: 0;
transition: opacity 0.25s;
}
.mt-overlay.visible {
display: block;
opacity: 1;
}
.mt-tab-switcher {
position: fixed;
bottom: 0;
left: 0;
right: 0;
max-height: 60vh;
background: var(--bg-secondary);
border-radius: 16px 16px 0 0;
z-index: 960;
transform: translateY(100%);
transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
display: flex;
flex-direction: column;
box-shadow: 0 -4px 24px rgba(0,0,0,0.4);
padding-bottom: env(safe-area-inset-bottom, 0);
}
.mt-tab-switcher.open {
transform: translateY(0);
}
.mt-sheet-handle {
width: 36px;
height: 4px;
background: var(--border);
border-radius: 2px;
margin: 10px auto 6px;
flex-shrink: 0;
}
.mt-sheet-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 8px 16px 12px;
flex-shrink: 0;
}
.mt-sheet-title {
font-family: "JetBrains Mono", monospace;
font-size: 0.8rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.05em;
color: var(--text-muted);
}
.mt-sheet-close {
width: 28px; height: 28px;
padding: 0;
border: 1px solid var(--border);
border-radius: 6px;
background: transparent;
color: var(--text-secondary);
cursor: pointer;
font-size: 12px;
display: flex;
align-items: center;
justify-content: center;
}
.mt-sheet-close:hover { color: var(--accent); border-color: var(--accent); }
.mt-sheet-list {
flex: 1;
overflow-y: auto;
padding: 0 12px 12px;
-webkit-overflow-scrolling: touch;
}
.mt-tab-item {
display: flex;
align-items: center;
gap: 10px;
padding: 10px 12px;
border-radius: 8px;
cursor: pointer;
color: var(--text-primary);
font-size: 0.85rem;
transition: background 0.1s;
margin-bottom: 2px;
}
.mt-tab-item:active {
background: rgba(255,255,255,0.06);
}
.mt-tab-item.active {
background: color-mix(in srgb, var(--accent) 12%, transparent);
color: var(--accent);
font-weight: 600;
}
.mt-tab-item-icon {
flex-shrink: 0;
opacity: 0.6;
}
.mt-tab-item-name {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.mt-tab-item-close {
width: 24px; height: 24px;
padding: 0;
border: none;
border-radius: 4px;
background: transparent;
color: var(--text-muted);
cursor: pointer;
font-size: 14px;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.mt-tab-item-close:hover {
color: var(--danger, #ef4444);
background: rgba(239,68,68,0.1);
}
}