Files
plainpages/views/home.ejs
T
lilleman e22d24aa8a §10 - one menu everywhere (buildPluginChrome) + shell on every page; instructional starter dashboard; Kratos-native email docs
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.
2026-06-23 21:26:00 +02:00

22 lines
793 B
Plaintext

<%#
Public landing page (todo §10): the ungated "/", rendered inside the unified app shell so the menu
shows (role-filtered — anonymous ⇒ public items + Sign in). A brief intro + a prominent way in, or a
dashboard link when already signed in. A plugin may replace this via its `home` handler.
Data: chrome (PageChrome), user (or null).
%><%
const nav = include("partials/nav-tree", { nodes: chrome.nav });
const body = include("partials/landing-body", { brand: chrome.brand.name, signedIn: !!locals.user });
-%>
<%- include("partials/shell", {
body,
brand: chrome.brand,
csrfToken: chrome.csrfToken,
docTitle: chrome.brand.name,
nav,
signInHref: chrome.signInHref,
styles: ["/public/css/auth.css"],
theme: chrome.theme,
title: "",
user: chrome.user,
}) %>