--- import Icon from '@ui/Icon.astro'; import Logo from './Logo.astro'; import NavbarToggler from './NavbarToggler.astro'; import NavbarSide from './NavbarSide.astro'; import NavbarMenu from './NavbarMenu.astro'; import NavbarSearch from './NavbarSearch.astro'; interface Props { hideSearch?: boolean; /** active menu entry, e.g. "dashboards.default" */ pageMenu?: string | undefined; condensed?: boolean | undefined; dark?: boolean | undefined; transparent?: boolean; hideBrand?: boolean | undefined; /** use the sample menu (menu-sample.json) instead of the real one */ sample?: boolean; /** 1-based index into people.json for the user menu avatar */ personId?: number; hideLogo?: boolean; smallLogo?: boolean; showTitle?: boolean; hideIcons?: boolean; hideUsername?: boolean; /** bg-{background} class on the header (ignored when transparent) */ background?: string; /** inline `background:` style on the header */ backgroundColor?: string; /** extra classes on the header */ class?: string | undefined; /** id of the collapsible menu; pass a unique one when a page renders several navbars */ menuId?: string; } // When a page passes no pageMenu, nothing in the menu is active. const { hideSearch = false, pageMenu, condensed = false, dark = false, transparent = false, hideBrand = false, sample = false, personId, hideLogo = false, smallLogo = false, showTitle = false, hideIcons = false, hideUsername = false, background, backgroundColor, class: className, menuId = 'navbar-menu', } = Astro.props; const breakpoint = 'md'; const headerClass = [ `navbar navbar-expand-${breakpoint}`, transparent ? 'navbar-transparent' : background && `bg-${background}`, className, 'd-print-none', ] ---
{ !hideBrand && ( ) } { condensed && ( ) }
{ !condensed && (
) }