From 9736d307f8e811b697b026d246bd4818e58fcb97 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Mon, 16 Sep 2024 20:08:53 +0000 Subject: [PATCH] Add new filters for events and blogs (#8209) (#8299) --- _layouts/search_layout.html | 38 ++++++++++++++++++++++--------------- assets/js/search.js | 2 +- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/_layouts/search_layout.html b/_layouts/search_layout.html index 47b8f25d1c..67e877fcb8 100644 --- a/_layouts/search_layout.html +++ b/_layouts/search_layout.html @@ -38,12 +38,16 @@

Filter results

- +
- - + + +
+
+ +
@@ -97,10 +101,7 @@

element.value).join(','); const urlPath = window.location.pathname; const versionMatch = urlPath.match(/(\d+\.\d+)/); const docsVersion = versionMatch ? versionMatch[1] : "latest"; @@ -139,11 +140,12 @@

{ + categoryBlog.addEventListener('change', () => { + updateAllCheckbox(); + triggerSearch(searchInput.value.trim()); + }); + categoryEvent.addEventListener('change', () => { updateAllCheckbox(); triggerSearch(searchInput.value.trim()); }); diff --git a/assets/js/search.js b/assets/js/search.js index 8d9cab2ec5..4d4fce62f3 100644 --- a/assets/js/search.js +++ b/assets/js/search.js @@ -319,7 +319,7 @@ window.doResultsPageSearch = async (query, type, version) => { searchResultsContainer.appendChild(resultElement); const breakline = document.createElement('hr'); - breakline.style.border = '.5px solid #ccc'; + breakline.style.borderTop = '.5px solid #ccc'; breakline.style.margin = 'auto'; searchResultsContainer.appendChild(breakline); });