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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user