e22d24aa8a
Collapse the three nav builders into buildPluginChrome: chrome.bestHref does longest-prefix matching so deep admin routes mark their leaf. Delete adminNav; buildConfirmModel and the admin model builders take the resolved nav. The same role-filtered sidebar now renders signed in or out, collapsing to a burger on narrow screens. shell.ejs gains menu (default true; menu:false -> single-column .app-bare), docTitle (separate <title> from the topbar, so the body keeps the single <h1>), and hideSignIn (suppress the footer Sign-in on auth pages to avoid a login loop). auth/home/landing now render inside the shell. Dashboard is a replaceable instructional starter (definePlugin snippet, no mock data). Email stays delegated to Kratos: documented its built-in courier.template_override_path instead of adding web-side SMTP.
34 lines
1.2 KiB
Plaintext
34 lines
1.2 KiB
Plaintext
<%#
|
|
Themed Kratos self-service page (todo §4) inside the unified app shell (§10): sign-in / register /
|
|
reset / verify / settings. Renders a FlowView (src/flow-view.ts) into the shell content, reusing the
|
|
auth-card + field partials. The form posts straight to flow.ui.action — Kratos owns its CSRF. The
|
|
shell's menu is role-filtered (anonymous ⇒ public items + Sign in); the topbar carries no heading,
|
|
so the card's own <h1> is the page's single heading. Data: chrome (PageChrome), flow (FlowView).
|
|
%><%
|
|
const nav = include("partials/nav-tree", { nodes: chrome.nav });
|
|
const card = include("partials/auth-card", {
|
|
action: flow.action,
|
|
alt: flow.alt,
|
|
back: flow.back,
|
|
body: include("partials/flow-body", { flow }),
|
|
method: flow.method,
|
|
sso: { providers: flow.sso },
|
|
sub: flow.sub,
|
|
title: flow.title,
|
|
});
|
|
const body = `<div class="shell-auth"><div class="auth">${card}</div></div>`;
|
|
-%>
|
|
<%- include("partials/shell", {
|
|
body,
|
|
brand: chrome.brand,
|
|
csrfToken: chrome.csrfToken,
|
|
docTitle: flow.title,
|
|
hideSignIn: true,
|
|
nav,
|
|
signInHref: chrome.signInHref,
|
|
styles: ["/public/css/auth.css"],
|
|
theme: chrome.theme,
|
|
title: "",
|
|
user: chrome.user,
|
|
}) %>
|