feat(ui): breadcrumb (Space › parent › page) + export menu (md/txt/html/pdf) on pages & spaces

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
root
2026-06-04 23:12:57 +10:00
parent 8ed3c5deb4
commit 261ca6ba9e
5 changed files with 141 additions and 2 deletions

View File

@@ -3,6 +3,8 @@ import { api } from '../api.js';
import { el, mount } from '../dom.js';
import { markdownEditor } from '../components/markdown_editor.js';
import { backButton } from '../components/backbtn.js';
import { breadcrumb } from '../components/breadcrumb.js';
import { exportMenu } from '../components/export_menu.js';
export async function render(main, ctx) {
const id = ctx.params.id;
@@ -29,7 +31,10 @@ export async function render(main, ctx) {
);
mount(main,
backButton(),
el('div', { class: 'doc-head' },
el('div', { class: 'doc-head-left' }, backButton(), breadcrumb(page)),
exportMenu({ filenameBase: page.slug, getContent: async () => ({ title: page.title, md: page.body_md || '' }) })
),
el('h1', { class: 'view-h1' }, page.title),
el('p', { class: 'view-sub muted' }, '/' + page.slug),
editor,