import { html } from 'hono/html'; import type { Child, FC } from 'hono/jsx'; import type { Ctx, User } from '../env'; import { VERSION } from '../env'; import { brandMark, icon, spot } from './art'; import { Avatar } from './components'; type PageProps = { title?: string; description?: string; image?: string; noindex?: boolean; active?: string; narrow?: boolean; bare?: boolean; children?: Child; }; const DEFAULT_DESC = 'Skillfarm is a curated list of agent skills for every major coding agent. Every shared skill is reviewed by a person before it goes live. Free to browse and share, and you earn Seeds as you grow.'; const NAV = [ { href: '/skills', label: 'Skills', key: 'skills' }, { href: '/prompts', label: 'Prompts', key: 'prompts' }, { href: '/growers', label: 'Growers', key: 'growers' }, { href: '/leaderboard', label: 'Leaderboard', key: 'leaderboard' }, { href: '/seeds', label: 'Seeds', key: 'seeds' }, { href: '/connect', label: 'MCP', key: 'connect' }, { href: '/help', label: 'Help', key: 'help' }, ]; const Header: FC<{ user: User | null; active?: string; path: string }> = ({ user, active, path }) => ( ); const Footer: FC<{ path: string }> = ({ path }) => ( ); export const Page: FC = ({ c, title, description, image, noindex, active, narrow, bare, children }) => { const user = c.get('user'); const flash = c.get('flash'); const url = new URL(c.req.url); const site = c.env.SITE_URL; const fullTitle = title ? `${title} | Skillfarm` : 'Skillfarm: a curated list of agent skills'; const desc = description ?? DEFAULT_DESC; const og = image ?? `${site}/img/og.png`; return ( {fullTitle} {noindex ? : null} {bare ? null :
} {flash ? (
{flash.text}
) : null}
{children}
{bare ? null :