no-sidebar: hide the sidebar column on pages without one
A page without a sidebar (a login page) sets BodyAttrs to class="no-sidebar"; the layout always renders the sidebar column, so style.css now hides it and gives <main> the full width. yaiam-web had the rule in its own stylesheet, so yaiam-authd's login pages, which only load this one, showed an empty column. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e4f88485f2
commit
8774ef62ce
2 files changed
+18
-2
No files matched your search
@@ -154,7 +154,7 @@ concurrent-edit conflict during the initial rollout) and can produce a
|
|||||||
force-move an existing tag again for any future change — always cut a
|
force-move an existing tag again for any future change — always cut a
|
||||||
new one, even for a one-line fix.
|
new one, even for a one-line fix.
|
||||||
|
|
||||||
## PageHeader fields (current as of v0.2.4)
|
## PageHeader fields (current as of v0.2.5)
|
||||||
|
|
||||||
`Title`, `AppName` (lowercase product name for `<title>`/footer — not
|
`Title`, `AppName` (lowercase product name for `<title>`/footer — not
|
||||||
`Name`, which collides with a domain type's own `Name` field once
|
`Name`, which collides with a domain type's own `Name` field once
|
||||||
@@ -175,4 +175,7 @@ brand link, e.g. a mobile sidebar-toggle button),
|
|||||||
`ExtraHeadHTML`/`ExtraBodyHTML`, and `BodyAttrs`/`SidebarAttrs` —
|
`ExtraHeadHTML`/`ExtraBodyHTML`, and `BodyAttrs`/`SidebarAttrs` —
|
||||||
`template.HTMLAttr`, not `template.HTML` — raw extra attributes on
|
`template.HTMLAttr`, not `template.HTML` — raw extra attributes on
|
||||||
`<body>` and the sidebar `<nav>` for a consumer's own client-side
|
`<body>` and the sidebar `<nav>` for a consumer's own client-side
|
||||||
framework state (e.g. yakwui's Alpine.js collapsible sidebar).
|
framework state (e.g. yakwui's Alpine.js collapsible sidebar). A page
|
||||||
|
without a sidebar (a login page) sets `BodyAttrs` to
|
||||||
|
`` ` class="no-sidebar"` ``: since v0.2.5 `static/style.css` then hides
|
||||||
|
the sidebar column and gives `<main>` the full width.
|
||||||
@@ -508,6 +508,19 @@ a.navbar-subtitle:hover {
|
|||||||
border-left: 2px solid var(--yw-accent);
|
border-left: 2px solid var(--yw-accent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* A page without a sidebar (a login page): BodyAttrs ` class="no-sidebar"`.
|
||||||
|
The layout always renders the sidebar column; this hides it and gives
|
||||||
|
<main> the full width. !important: Bootstrap's d-md-block, column and
|
||||||
|
ms-sm-auto classes on those elements are !important or more specific. */
|
||||||
|
body.no-sidebar .sidebar {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
body.no-sidebar main {
|
||||||
|
width: 100% !important;
|
||||||
|
margin-left: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
/* --- Alerts (flash banners) ---------------------------------------- */
|
/* --- Alerts (flash banners) ---------------------------------------- */
|
||||||
.alert-success { background: var(--yw-success-bg); border-color: var(--yw-success-border); color: var(--yw-success-text); }
|
.alert-success { background: var(--yw-success-bg); border-color: var(--yw-success-border); color: var(--yw-success-text); }
|
||||||
.alert-danger { background: var(--yw-danger-bg); border-color: var(--yw-danger-border); color: var(--yw-danger-text); }
|
.alert-danger { background: var(--yw-danger-bg); border-color: var(--yw-danger-border); color: var(--yw-danger-text); }
|
||||||
|
|||||||
Reference in new issue
Block a user