How to add a page to Palatian, from the starter page
Duplicate starter.html, keep the partials and the content wrapper, add a link in the panel so the command bar finds it, and register page JavaScript if you need any. The same for the React edition, with a page component and a route.

The quickest way to a new page is starter.html: a blank page with the full shell, dock, panel, toolbar, footer and every automation loaded. Duplicate it, change the title and the content, and link it from the panel. How you do that depends on whether you use the build.
With the build (editing src/)
- Copy
src/starter.htmltosrc/reports-weekly.html. A page is a few partials around your content:
Keep the{{> head title="Weekly report"}} {{> nav page="reports-weekly"}} {{> toolbar section="Home" title="Weekly report"}} <main class="pl-content"> <div class="pl-page-header"> <div><h1>Weekly report</h1><p class="pl-page-lede">What this page is for.</p></div> <div class="pl-page-actions"><button class="btn btn-primary">Action</button></div> </div> <div class="row g-3"> … tiles … </div> </main> {{> footer}} {{> scripts}}<main class="pl-content">wrapper and the page header; everything inside inherits the theme, dark mode, the schemes and the user's preferences. - The
pagevalue of the nav partial becomes<body data-page="reports-weekly">, and thesectionof the toolbar partial decides which dock section is lit. - Add a link in
src/partials/nav.hbs, inside the.pl-panel-sectionof the section it belongs to:
The command bar reads the panel links, so the page appears in Ctrl/⌘ K with no extra work, and the active page's link is highlighted automatically.<a class="pl-panel-link" href="reports-weekly.html"><i class="palatian palatian-file-report"></i>Weekly report</a> - Run
npm run devto see it, ornpm run buildto write it todist/. Vite picks up everysrc/*.htmlfile by itself.
A new section in the dock
A section is one button in the dock and one block in the panel, both in nav.hbs:
<!-- dock -->
<button class="pl-dock-btn" data-section="reports" data-bs-toggle="tooltip" data-bs-placement="right" data-bs-title="Reports">
<i class="palatian palatian-file-report"></i>
</button>
<!-- panel -->
<div class="pl-panel-section" data-section="reports" data-title="Reports" data-sub="Weekly and monthly">
<a class="pl-panel-link" href="reports-weekly.html"><i class="palatian palatian-calendar"></i>Weekly</a>
</div>
JavaScript for the page
Most things need no script: toasts, confirms, filters, counters, data tables, sortable lists and the inspector are data-pl-* attributes, and charts can be declared with data-pl-chart or data-pl-sparkline on pages that load palatian-charts.js. If a page needs its own code, add a function to src/js/pages/ and register it in src/js/pages/index.js under the page's name; the engine calls it when body[data-page] matches, after the shell has initialised.
Without the build (editing dist/)
Copy any built page, for example dist/starter.html, rename it and change the content between the toolbar and the footer. Add its link to the panel in every page you want it reachable from, since the partials are already expanded into each file. Because the built pages carry a Content Security Policy, keep the small inline script in the head exactly as it is; see troubleshooting.
In the React edition
- Create
react/src/pages/ReportsWeekly.jsx. CallusePageEngine()at the top so thedata-pl-*automations, forms and declarative charts are scanned; pass{ init }for a chart init if you have one:import { usePageEngine } from '../hooks/usePageEngine.js' export const meta = { title: 'Weekly report', section: 'Home' } export default function ReportsWeekly() { usePageEngine() return ( <main className="pl-content"> …any markup from the HTML edition, with className / htmlFor / defaultValue… </main> ) } - Add the route to
src/routes.generated.jsand a link insrc/nav.generated.js. If you prefer to keep writing pages as HTML, add the page tosrc/, build, and runnpm run generateinreact/again: it regenerates the components, routes and nav fromdist/.
The shell's classes and the stat tile, inspector, command bar and toast markup are documented in documentation/index.html of your download, with a page on each component.