Compare commits

...

2 Commits

Author SHA1 Message Date
Jeff Emmett 06c095eb19 Merge branch 'dev'
CI/CD / deploy (push) Successful in 2m12s Details
2026-04-16 16:21:35 -04:00
Jeff Emmett 14ffee4101 fix(rpast): serve interactive viewer at space root
Adds `GET /` to rpast routes. Without it, /rpast on a space subdomain
404'd because the sub-app had no root handler. Now matches the rNotes
pattern: bare domain → marketing landing, in-space URL → app shell with
<rpast-viewer>.
2026-04-16 16:21:19 -04:00
1 changed files with 19 additions and 0 deletions

View File

@ -12,11 +12,30 @@ import {
enumerateCreations, listCreationEnumerators, renderMarkwhen,
} from '../../shared/markwhen';
import { renderMarkwhenHtml } from '../../shared/markwhen/html-render';
import { renderShell } from '../../server/shell';
import { getModuleInfoList } from '../../shared/module';
import { pastSchema } from './schemas';
import { renderLanding } from './landing';
const routes = new Hono();
// GET / — marketing landing on bare domain, interactive viewer in a space.
routes.get('/', c => {
const space = c.req.param('space') || 'demo';
if (!space || space === 'rpast.online') {
return c.html(renderLanding());
}
return c.html(renderShell({
title: `${space} — rPast | rSpace`,
moduleId: 'rpast',
spaceSlug: space,
modules: getModuleInfoList(),
theme: 'dark',
body: `<rpast-viewer space="${space}" style="height:calc(100vh - 52px);display:block"></rpast-viewer>`,
scripts: `<script type="module" src="/modules/rpast/rpast-viewer.js?v=1"></script>`,
}));
});
routes.get('/api/modules', c => {
return c.json(listCreationEnumerators().map(e => ({
module: e.module, label: e.label, icon: e.icon, color: e.color,