diff --git a/assets/css/v2/style.css b/assets/css/v2/style.css index 673b9356..7d7572a2 100644 --- a/assets/css/v2/style.css +++ b/assets/css/v2/style.css @@ -1380,7 +1380,7 @@ atomic-search-interface#search-v2 { } /* Search bar on header */ -atomic-search-box { +.header atomic-search-box { height: 2.25rem; width: 18.5rem; display: flex; diff --git a/assets/js/coveo.js b/assets/js/coveo.js index 261ef70a..6e0a8384 100644 --- a/assets/js/coveo.js +++ b/assets/js/coveo.js @@ -74,13 +74,7 @@ async function atomicCoveo() { await customElements.whenDefined('atomic-search-interface'); const credentials = await getValidSearchCredentials(); - const interfaces = [ - document.querySelector('#search-v2'), - document.querySelector('#search-standalone-header'), - document.querySelector('#search-standalone-sidebar'), - ].filter(Boolean); - - for (const el of interfaces) { + document.querySelectorAll('atomic-search-interface').forEach(async (el) => { await el.initialize({ ...credentials, analytics: { analyticsMode: 'legacy' }, @@ -92,7 +86,7 @@ async function atomicCoveo() { }, }); await el.executeFirstSearch(); - } + }); const headerSearchBar = document.querySelector('#search-standalone-header'); if (headerSearchBar?.shadowRoot) { diff --git a/layouts/partials/coveo-atomic.html b/layouts/partials/coveo-atomic.html index 624ae1ee..2fed7091 100644 --- a/layouts/partials/coveo-atomic.html +++ b/layouts/partials/coveo-atomic.html @@ -1,11 +1,11 @@ - {{ if .Params.searchOnPage }} +
+
- {{ end }}