configuration/strings/search.strings.ts

configuration/strings/search.strings.ts is a file in Bane's Lab Site. 66 lines of code and 8 definitions.

import type { DocumentMeta, Section } from "#types/document.types";
import { SEARCH_EMPTY_ICON, SEARCH_ORDER_ICON, SEARCH_USE_ICON } from "#configuration/icons/search.icons";
import { SEARCH_EMPTY_SECTION_ID, SEARCH_ORDER_SECTION_ID, SEARCH_USE_SECTION_ID } from "#core/ids/search.ids";

export const SEARCH_META: DocumentMeta = {
    closing: "Every result links back to the page that teaches it.",
    effectiveDate: "September 24, 2026",
    intro: "One field searches every page of the site. The results are the site's own content, each shown the way its own page shows it.",
    lastUpdated: "September 24, 2026",
    title: "Search",
    version: "1.0.0",
};

export const SEARCH_SECTIONS: readonly Section[] = [
    {
        icon: SEARCH_USE_ICON,
        id: SEARCH_USE_SECTION_ID,
        subsections: [
            {
                content:
                    "Open the search from the header and type. Every word you type has to appear in a result. A word also matches its longer forms, and a longer word still matches with one typo.",
                title: "Type a few words",
            },
            {
                content:
                    "A chapter result is its chapter section, a glossary result is its entry, and a source result is the definition itself, so nothing is summarized.",
                title: "Results are the content itself",
            },
        ],
        title: "How search works",
    },
    {
        icon: SEARCH_ORDER_ICON,
        id: SEARCH_ORDER_SECTION_ID,
        subsections: [
            {
                content:
                    "Results are not ranked by how well they match. They come in the order the learning path teaches them, so reading down the results walks the lesson in order.",
                title: "The order is the teaching order",
            },
            {
                content:
                    "A glossary entry sits where a chapter first links to it, and a source definition sits where a chapter first cites it as evidence. Anything the path never reaches follows at the end.",
                title: "Where the rest is placed",
            },
        ],
        title: "Results follow the teaching",
    },
];

export const SEARCH_EMPTY_SECTIONS: readonly Section[] = [
    {
        icon: SEARCH_EMPTY_ICON,
        id: SEARCH_EMPTY_SECTION_ID,
        subsections: [
            {
                content:
                    "Try fewer words, or a shorter form of one. Every word has to appear in a result for it to be shown.",
                title: "Nothing matched every word",
            },
        ],
        title: "No results",
    },
];

export const SEARCH_DEFINITIONS_TITLE = "Matching definitions";

export const SEARCH_FIELD_LABEL = "Search the site";

export const SEARCH_FIELD_PLACEHOLDER = "Search every page…";

export const SEARCH_OPEN_TITLE = "Search";

export const SEARCH_CLOSE_TITLE = "Close search";