Split pages and commands into editable modules

This commit is contained in:
2026-07-27 09:44:56 +09:00
parent ae0f6bc970
commit eac572dcaf
18 changed files with 112 additions and 37 deletions
+11
View File
@@ -0,0 +1,11 @@
import { color, wrap } from '../terminal.js';
export const name = 'home';
export const title = 'Home';
// Edit this function to customize the landing page.
export function render({ config, ownerOnline }) {
const p = config.persona || {};
const status = ownerOnline() ? color('green', 'Owner is online') : color(config.theme?.muted || 'brightBlack', 'Owner is offline');
return `${color(config.theme?.accent || 'yellow', `Welcome to ${p.name || 'my portfolio'}`)}\n\n${wrap(p.bio || 'You are exploring a portfolio over SSH. Type “help” to get started.').join('\n')}\n\n${status}\n\nCommands: home · pages · open <page> · chat · contact · clear · quit`;
}