Files
George Cushen f4280ddb1c refactor: rename modules and update migration docs
BREAKING CHANGE
Module paths moved to `github.com/HugoBlox/kit` with new names:
- core `blox-tailwind` → `blox`
- analytics → `analytics`
- netlify → `integrations/netlify`
- slides (reveal) → `slides`
Update go.mod, module.yaml/params, scripts, tests, and v0.11 migration guide accordingly.
2026-01-02 20:59:48 +00:00

33 lines
1.1 KiB
JavaScript

// Hugo Blox Search - Custom Pagefind API Implementation
// Search is handled by Alpine.js component in search-modal.html
// Additional keyboard shortcuts and utilities
document.addEventListener("DOMContentLoaded", () => {
console.log("✓ Hugo Blox Search initialized (Pagefind Headless API)");
// Handle search toggle buttons
const searchButtons = document.querySelectorAll("[data-search-toggle]");
searchButtons.forEach((button) => {
button.addEventListener("click", () => {
const prefilledQuery = button.dataset.searchQuery;
if (window.Alpine && Alpine.store("search")) {
Alpine.store("search").open = true;
// Pre-fill query if specified
if (prefilledQuery) {
setTimeout(() => {
const searchInput = document.querySelector('[x-ref="searchInput"]');
if (searchInput) {
searchInput.value = prefilledQuery;
searchInput.dispatchEvent(new Event("input"));
}
}, 100);
}
}
});
});
// Note: Keyboard navigation (arrow keys, Enter) is handled by Alpine.js in search-modal.html
});