--- /** * La búsqueda de Starlight 0.42.6, copiada para abrirla filtrada por la zona * de la página (ADR 0081). Lo único distinto es `triggerFilters` tras crear la * UI; el panel de filtros de Pagefind deja quitar el filtro y ver la otra zona. */ import { Icon } from '@astrojs/starlight/components'; import project from 'virtual:starlight/project-context'; const pagefindTranslations = { placeholder: Astro.locals.t('search.label'), ...Object.fromEntries( Object.entries(Astro.locals.t.all()) .filter(([key]) => key.startsWith('pagefind.')) .map(([key, value]) => [key.replace('pagefind.', ''), value]) ), }; const dataAttributes: DOMStringMap = { 'data-translations': JSON.stringify(pagefindTranslations) }; if (project.trailingSlash === 'never') dataAttributes['data-strip-trailing-slash'] = ''; ---
{ /* TODO: Make the layout of this button flexible to accommodate different word lengths. Currently hard-coded for English: “Cancel” */ } { import.meta.env.DEV ? (

{Astro.locals.t('search.devWarning')}

) : (
) }
{ /** * This is intentionally inlined to avoid briefly showing an invalid shortcut. * Purposely using the deprecated `navigator.platform` property to detect Apple devices, as the * user agent is spoofed by some browsers when opening the devtools. */ }