refactor: replace Fomantic search module with first-party code (#37443)

- Replace fomantic `search` code with minimal first-party code
- Added a small fix to vertically align search box and search button
- Manually tested all search forms.
- Add `errorName` helper, similar to `errorMessage`.

Signed-off-by: silverwind <me@silverwind.io>
Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com>
This commit is contained in:
silverwind
2026-05-11 07:25:26 +02:00
committed by GitHub
parent a603f89fce
commit 5dc9d621fd
15 changed files with 232 additions and 1663 deletions
+6
View File
@@ -2,10 +2,16 @@
import {html} from '../utils/html.ts';
import type {Intent} from '../types.ts';
/** Extract a message string from an unknown caught value. */
export function errorMessage(err: unknown): string {
return (err as Error)?.message || String(err);
}
/** Extract a name string from an unknown caught value. */
export function errorName(err: unknown): string {
return (err as Error)?.name ?? '';
}
export function showGlobalErrorMessage(msg: string, msgType: Intent = 'error', details?: string) {
const parentContainer = document.querySelector('.page-content') ?? document.body;
if (!parentContainer) {