diff --git a/browse/build.sh b/browse/build.sh index 2d13692..2a14299 100755 --- a/browse/build.sh +++ b/browse/build.sh @@ -30,9 +30,11 @@ concat_files \ concat_files \ "../shared/zddc.js" \ "../shared/theme.js" \ + "../shared/preview-lib.js" \ "js/init.js" \ "js/loader.js" \ "js/tree.js" \ + "js/preview.js" \ "js/events.js" \ "js/app.js" \ > "$js_raw" diff --git a/browse/css/tree.css b/browse/css/tree.css index 617eb6b..b37b408 100644 --- a/browse/css/tree.css +++ b/browse/css/tree.css @@ -25,15 +25,55 @@ flex-wrap: wrap; } -.toolbar__path { +/* Breadcrumb path. The root node is a 🏠 link to "/" (online) or + the FS handle name (offline). Each segment is a clickable link in + server mode that re-navigates the browser; in FS-API mode they + render as plain spans because we don't keep ancestor handles. */ +.breadcrumbs { + flex: 1; + min-width: 0; + overflow-x: auto; + overflow-y: hidden; + white-space: nowrap; font-family: Consolas, Monaco, monospace; font-size: 0.9rem; color: var(--text-muted); - flex: 1; - min-width: 0; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + padding: 0.1rem 0; + /* Hide the scrollbar but keep horizontal scroll for very deep paths */ + scrollbar-width: thin; +} + +.breadcrumbs .bc-link { + color: var(--primary); + text-decoration: none; + padding: 0.1rem 0.25rem; + border-radius: 3px; +} + +.breadcrumbs .bc-link:hover { + background: var(--bg-hover, rgba(0,0,0,0.05)); + text-decoration: underline; +} + +.breadcrumbs .bc-link--current { + color: var(--text); + font-weight: 500; + cursor: default; +} + +.breadcrumbs .bc-link--current:hover { + background: transparent; + text-decoration: none; +} + +.breadcrumbs .bc-sep { + color: var(--text-muted); + margin: 0 0.05rem; +} + +.breadcrumbs .bc-root { + font-size: 1rem; /* the 🏠 emoji renders a hair bigger */ + line-height: 1; } .toolbar__filter { @@ -47,12 +87,45 @@ font-size: 0.9rem; } +.toolbar__ext { + /* Multi-select extension filter. Native