Skip to content

Commit 8c6d3d3

Browse files
committed
Sidebar: Remove extra search from search page
1 parent d543860 commit 8c6d3d3

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

assets/css/v2/style.css

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -725,13 +725,6 @@ body:not(:has(.main-layout)) header atomic-search-interface {
725725
}
726726
}
727727

728-
@media (max-width: 1023px) {
729-
/* Show on search page with facet if it is hidden */
730-
body:has(atomic-search-layout) header atomic-search-interface {
731-
display: block;
732-
}
733-
}
734-
735728
/* MARK: Product Selector
736729
*/
737730

assets/js/sidebar-v2.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,19 @@ document.addEventListener('click', (e) => {
1616
}
1717
}
1818
});
19+
20+
document.addEventListener('DOMContentLoaded', () => {
21+
const sidebar = document.querySelector('.sidebar__ul');
22+
23+
if (!sidebar) return;
24+
25+
const activeLink = sidebar.querySelector('.sidebar__link--current');
26+
27+
if (activeLink) {
28+
activeLink.scrollIntoView({
29+
behavior: 'auto',
30+
block: 'center',
31+
inline: 'nearest',
32+
});
33+
}
34+
});

layouts/search/single.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@
121121

122122
<!-- Facet Section -->
123123
<atomic-layout-section section="facets">
124-
<atomic-search-box id="search-standalone-searchpage"></atomic-search-box>
125124
<atomic-facet field="f5_product" label="Show by product"></atomic-facet>
126125
<atomic-refine-toggle></atomic-refine-toggle>
127126
</atomic-layout-section>

0 commit comments

Comments
 (0)