mirror of
https://github.com/TriliumNext/Trilium.git
synced 2026-10-12 02:09:59 +00:00
Clicking the current note, or another clone of it, in the tree keeps the page and moves the selection, so no new page loads to dismiss the narrow-screen drawer: it stayed open over the page with scrolling locked. The click handler now removes `menu-open` after selecting the entry. It does so inline, since `layout.ts` imports its stylesheet and `tree_state.ts` is bundled into the import-free `tree.js`. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Share theme
The default theme for shared notes and for the static HTML export. It started as the theme of trilium.rocks by Zerebos.
src/templates/— the EJS templates.packages/trilium-core/src/share/content_renderer.tsrenders them on the server; a note can replacepage.ejswith its own through~shareTemplate.src/page/— the parts of the page around the note (layout, header, navigation tree, search, table of contents, footer), andsrc/content/— the styles and enhancements for the note's own content (math, Mermaid, link embeds, adaptive colors). A script imports its own stylesheet, which shares its name and folder:toc.tsimports./toc.css.src/index.ts— the entry point. It sets every script up and imports the stylesheets that have no script; the order of its imports is the cascade order.
pnpm --filter share-theme build bundles them into dist/scripts.js and dist/scripts.css, which the server, desktop, standalone and static-export builds copy. pnpm install runs it, but no *:start script does, so rebuild after changing a script or style (or run pnpm --filter share-theme dev to watch).