--- import HeaderProfile from './HeaderProfile.astro'; import HeaderUptime from './HeaderUptime.astro'; import PageTitle from '@ui/PageTitle.astro'; interface Props { /** page title; without it the whole block is not rendered */ title?: string | undefined; /** small text above the title */ pretitle?: string | undefined; /** text below the title */ description?: string | undefined; /** extra classes on .page-header */ class?: string; /** name of a layout/headers/ component rendered instead of the title block, e.g. "profile" */ file?: string | undefined; } const { title, pretitle, description, class: className, file } = Astro.props; const actionsSlot = ((await Astro.slots.render('actions')) ?? '').trim(); --- {file === 'profile' && } {file === 'uptime' && } { !file && title && (
{pretitle && (
{pretitle}
)} {title} {description &&
{description}
}
{actionsSlot && (
)}
) }