Narrow screens: sidebar as a wrapping tab bar, wrapping navbar
Below the md breakpoint, where the sidebar column stacks above the
content, the sidebar becomes a row of tabs in the look of Bootstrap's
.nav-tabs (the active one underlined in the accent color) that wraps onto
further rows instead of scrolling sideways. The stacked row no longer
shares its extra height out to the tab bar (align-content: flex-start),
which left an empty band below the links, and the navbar's extras (a
config path, action buttons) wrap instead of widening the page past the
screen.
README: add yet ("yet serve") to the migration status.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
31af3819b4
commit
000bb42240
2 files changed
+48
-2
No files matched your search
@@ -112,7 +112,7 @@ module).
|
||||
|
||||
## Migration status
|
||||
|
||||
Six projects are migrated, on `v0.1.6`.
|
||||
Seven projects use it (`yet serve` on `v0.1.7`, the others on `v0.1.6`).
|
||||
|
||||
| Project | Meta-repo | Status |
|
||||
|---|---|---|
|
||||
@@ -122,6 +122,7 @@ Six projects are migrated, on `v0.1.6`.
|
||||
| `yakwui` | yak | migrated |
|
||||
| `yamase-web` | yamase | migrated |
|
||||
| `yamocir` | yetano | migrated |
|
||||
| `yet` (`yet serve`) | yetano | built on it (a server-rendered shell whose content area a small JS app fills) |
|
||||
|
||||
`yaais` was evaluated too and deliberately NOT migrated: it's a
|
||||
client-rendered SPA (static `index.html` + vanilla JS), not a
|
||||
|
||||
+46
-1
@@ -175,6 +175,51 @@ a.navbar-subtitle:hover {
|
||||
border-top: 1px solid var(--yw-chrome-border);
|
||||
}
|
||||
|
||||
/* Narrow screens (below Bootstrap's md breakpoint, where the sidebar
|
||||
column stacks above the content): the sidebar becomes a tab bar --
|
||||
the same look as a page's own Bootstrap .nav-tabs (e.g. a manual's
|
||||
topic tabs): one row of links that wraps onto further rows when they
|
||||
don't fit, never a sideways-scrolling strip, the active one
|
||||
underlined in the accent color. */
|
||||
@media (max-width: 767.98px) {
|
||||
.sidebar { border-right: none; border-bottom: 1px solid var(--yw-chrome-border); }
|
||||
.sidebar {
|
||||
border-right: none;
|
||||
border-bottom: 1px solid var(--yw-chrome-border);
|
||||
padding-top: 0;
|
||||
}
|
||||
/* !important: Bootstrap's .flex-column utility is !important itself. */
|
||||
.sidebar .nav.flex-column {
|
||||
flex-direction: row !important;
|
||||
flex-wrap: wrap;
|
||||
padding-top: 0 !important;
|
||||
}
|
||||
.sidebar .nav-link {
|
||||
padding: .55rem .85rem;
|
||||
border-bottom: 2px solid transparent;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.sidebar .nav-link.active {
|
||||
border-left: none;
|
||||
border-bottom: 2px solid var(--yw-accent);
|
||||
}
|
||||
/* The navbar's own extras (a project's config path, action buttons)
|
||||
wrap onto a second line instead of widening the page past the
|
||||
screen. */
|
||||
.navbar > .container-fluid {
|
||||
flex-wrap: wrap;
|
||||
row-gap: .4rem;
|
||||
}
|
||||
.navbar > .container-fluid > div {
|
||||
flex-wrap: wrap;
|
||||
min-width: 0;
|
||||
}
|
||||
.navbar-subtitle {
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
/* The stacked row still grows to fill the page (see above); without
|
||||
this, the extra height is shared out between its wrapped lines and
|
||||
the tab bar gets an empty band below its links. */
|
||||
body > .container-fluid > .row {
|
||||
align-content: flex-start;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user