Merge pull request 'update(seo): update seo' (#2) from zelda.update-seo into main
Reviewed-on: #2
This commit is contained in:
commit
81b437d6b8
|
|
@ -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",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue