Closed evanescente-ondine closed 3 months ago
@evanescente-ondine you can change the labels like this:
window.addEventListener('DOMContentLoaded', (event) => {
new PagefindUI(
{
element: "#search",
translations: {
clear_search: "X",
}
});
});
Other translatable strings are listed here: https://github.com/CloudCannon/pagefind/blob/main/pagefind_ui/translations/en.json
I don't think you can put an image there.
ok, I'm starting to understand the pattern now. Much thanks, what a great app.
Hi, I'm a bit bugged by the "Clear" content of the button element, I wish I could get a X instead, or an arbitrary nice character, or an svg. What do I need to write with "new PagefindUI(" to correct that ? I don't know javascript.
Thanks