update(seo): update seo

This commit is contained in:
Admin 2026-05-14 10:04:52 +07:00
parent 0269339fe5
commit ce1e3791a1
1 changed files with 14 additions and 0 deletions

View File

@ -39,6 +39,20 @@ document.addEventListener("DOMContentLoaded", () => {
const heroInput = document.getElementById("hero-input"); const heroInput = document.getElementById("hero-input");
const typewriterEl = document.getElementById("typewriter-title"); const typewriterEl = document.getElementById("typewriter-title");
// Hero search: open store picker, then redirect to {STORE_URL}/catalogsearch/result/?q=...
const buySearchForm = document.querySelector("#buy-section .hero-search-form");
if (buySearchForm) {
buySearchForm.addEventListener("submit", (e) => {
e.preventDefault();
const q = (heroInput?.value || "").trim();
if (!q) return;
const slug = `catalogsearch/result/?q=${encodeURIComponent(q)}`;
if (typeof window.openStoreModal === "function") {
window.openStoreModal(slug);
}
});
}
// Multi-stage Typewriter Sequence // Multi-stage Typewriter Sequence
const typeStrings = [ const typeStrings = [
"Network hardware sourcing made simple", "Network hardware sourcing made simple",