Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f897fe2498 | ||
|
|
705a1c4c79 | ||
|
|
449f628144 | ||
|
|
8964cec3e2 | ||
|
|
3e99ada77b | ||
|
|
04ea1db1ab |
No files matched your search
@@ -239,19 +239,31 @@ h = httpsec.Headers(httpsec.Gate(http.NewCrossOriginProtection().Handler(h), hos
|
||||
|
||||
## Migration status
|
||||
|
||||
Eight projects use it, all on `v0.3.0` (2026-10-31): the built-in theme
|
||||
menu, `httpsec` and the flash helpers.
|
||||
Fourteen projects use it (as of 2026-11-29). From v0.5.0 on, a bump brings
|
||||
the modern style as the default; the consumer then gives its
|
||||
`NavItems` a `Group` and an `Icon` (yasta is the reference).
|
||||
|
||||
| Project | Meta-repo | Status |
|
||||
|---|---|---|
|
||||
| `yasta` | yetano | migrated (pilot) |
|
||||
| `yasl` | yetano | migrated |
|
||||
| `yaiam` | yetano | migrated (`yaiam-web` and the `yaiam-authd` login pages) |
|
||||
| `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) |
|
||||
| `yareco` | yetano | built on it (reference consumer for themes) |
|
||||
A new tag is not rolled out by rebuilding every consumer: each one gets
|
||||
an item in its `TODO-next-build.md` and bumps with its next release
|
||||
(`yetano/AGENTS.md`, "Pre-build tasks"). All fourteen have the item for
|
||||
v0.5.3 (the sidebar link flicker on page load).
|
||||
|
||||
| Project | Meta-repo | Version | Status |
|
||||
|---|---|---|---|
|
||||
| `yasta` | yetano | v0.5.2 | migrated (pilot); sidebar with groups and icons |
|
||||
| `yasl` | yetano | v0.5.1 | migrated; sidebar with groups and icons |
|
||||
| `yaiam` | yetano | v0.5.2 | migrated (`yaiam-web` and the `yaiam-authd` login pages); sidebar with groups and icons |
|
||||
| `yakwui` | yak | v0.5.2 | migrated; sidebar with groups and icons |
|
||||
| `yamase-web` | yamase | v0.5.2 | migrated; sidebar with groups and icons |
|
||||
| `yamocir` | yetano | v0.5.2 | migrated; sidebar with groups and icons |
|
||||
| `yet` (`yet serve`) | yetano | v0.5.2 | built on it (a server-rendered shell whose content area a small JS app fills) |
|
||||
| `yareco` | yetano | v0.5.1 | built on it (reference consumer for themes) |
|
||||
| `yashatra` | yetano | v0.5.2 | built on it (web UI over the YAPL bus, `busweb`) |
|
||||
| `yawehopa` | yetano | v0.5.2 | built on it; sidebar with groups and icons |
|
||||
| `yacota` | yetano | v0.4.0 | built on it (`yacota serve`, also over the YAPL bus via `busweb`); classic look until the bump |
|
||||
| `yanos` | yetano | v0.4.0 | built on it (also over the YAPL bus via `busweb`); classic look until the bump |
|
||||
| `yanks-registry` | yetano | v0.4.0 | built on it (the Yanks Directory's moderation UI); classic look until the bump |
|
||||
| `yastadi` | yetano | v0.1.7 | built on it (`internal/webui`); far behind, check every page when bumping |
|
||||
|
||||
`yaais` was evaluated too and deliberately NOT migrated: it's a
|
||||
client-rendered SPA (static `index.html` + vanilla JS), not a
|
||||
|
||||
@@ -531,11 +531,19 @@ a.navbar-subtitle:hover {
|
||||
padding-top: .5rem;
|
||||
}
|
||||
|
||||
/* transition: none -- Bootstrap's .nav-link fades color, background and
|
||||
border over .15s. The browser may compute styles once while only
|
||||
bootstrap.min.css has loaded; when style.css arrives, that fade ran
|
||||
from Bootstrap's blue link color to ours, so every sidebar link
|
||||
flickered blue on each page load (and the active link's border faded
|
||||
in). Whether a change animates depends on the new style, so turning
|
||||
the transition off here stops it. */
|
||||
.sidebar .nav-link {
|
||||
color: var(--yw-nav-link);
|
||||
font-size: .85rem;
|
||||
padding: .5rem 1rem;
|
||||
border-radius: 0;
|
||||
transition: none;
|
||||
}
|
||||
|
||||
.sidebar .nav-link:hover {
|
||||
@@ -695,6 +703,17 @@ body.no-sidebar main {
|
||||
padding: .35rem .8rem;
|
||||
}
|
||||
|
||||
/* Navbar buttons and the menu toggle stay on one line; a consumer's
|
||||
long left-hand extra (yasta's config path) wraps instead. */
|
||||
[data-style="modern"] .navbar .btn,
|
||||
[data-style="modern"] .yw-user {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
[data-style="modern"] .navbar > .container-fluid > div:first-child {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
[data-style="modern"] .navbar .btn-outline-secondary {
|
||||
--bs-btn-color: var(--yw-text);
|
||||
--bs-btn-border-color: var(--yw-border);
|
||||
|
||||
@@ -103,3 +103,19 @@ func TestSidebarGroupsAndIcons(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// A page without NavItems (a login page) renders no sidebar container:
|
||||
// the modern style draws it as a card, which would show up empty.
|
||||
func TestSidebarWithoutItems(t *testing.T) {
|
||||
r, err := NewRenderer(testPagesFS(), "pages", []string{"dashboard"}, ".html.tmpl", testFuncs())
|
||||
if err != nil {
|
||||
t.Fatalf("NewRenderer: %v", err)
|
||||
}
|
||||
var buf bytes.Buffer
|
||||
if err := r.Page(&buf, "dashboard", PageHeader{Title: "Log in"}); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if strings.Contains(buf.String(), `class="nav flex-column`) {
|
||||
t.Errorf("empty sidebar container rendered\n---\n%s", buf.String())
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
{{define "sidebar"}}
|
||||
<div class="nav flex-column pt-2">
|
||||
{{if .NavItems}}<div class="nav flex-column pt-2">
|
||||
{{range .SidebarEntries}}{{if .GroupHead}}<div class="yw-nav-group">{{.GroupHead}}</div>
|
||||
{{end}}<a class="nav-link{{if .Active}} active{{end}}" href="{{$.BasePath}}{{.Href}}"{{if .Active}} aria-current="page"{{end}}>{{if .IconSVG}}<span class="yw-nav-icon" aria-hidden="true">{{.IconSVG}}</span>{{end}}{{.Label}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>{{end}}
|
||||
{{end}}
|
||||
Reference in new issue
Block a user