Skip to content

Commit 7aae0e1

Browse files
committed
Search result page: change result item layout
1 parent 202f3a6 commit 7aae0e1

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

docs/css/instantsearch.css

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ footer.md-footer {
4848
.md-content .ais-InstantSearch .ais-Hits-item + .ais-Hits-item {
4949
border-top: 1px solid #E0E0E8;
5050
margin-top: 16px;
51+
padding-top: 16px;
5152
}
5253

5354
.md-content .ais-InstantSearch .ais-Highlight-highlighted {
@@ -78,7 +79,7 @@ footer.md-footer {
7879
font-size: 18px;
7980
line-height: 20px;
8081
letter-spacing: 0.12px;
81-
margin: 24px 0 4px;
82+
margin: 4px 0;
8283
}
8384

8485
.md-content .ais-InstantSearch .instantsearch__entry-header .ais-Highlight-highlighted {
@@ -107,14 +108,10 @@ footer.md-footer {
107108
letter-spacing: 0.12px;
108109
}
109110

110-
.md-content .ais-InstantSearch .instantsearch__entry-breadcrumbs-item + .instantsearch__entry-breadcrumbs-item {
111-
margin-left: 12px;
112-
}
113-
114-
.md-content .ais-InstantSearch .instantsearch__entry-breadcrumbs-item:before {
115-
content: '<';
111+
.md-content .ais-InstantSearch .instantsearch__entry-breadcrumbs-item:after {
112+
content: '>';
116113
display: inline-block;
117-
padding-right: 12px;
114+
padding: 0 10px;
118115
}
119116

120117
.md-content .ais-InstantSearch .ais-Pagination .ais-Pagination-list:not([hidden]) {

docs/js/instantsearch.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
</div>`;
8585
}
8686

87-
breadcrumbsKeys?.toReversed().forEach((breadcrumbKey) => {
87+
breadcrumbsKeys?.forEach((breadcrumbKey) => {
8888
breadcrumbsHTML += `<span class="instantsearch__entry-breadcrumbs-item">
8989
${instantsearch.highlight({
9090
attribute: `hierarchy.${breadcrumbKey}`,
@@ -95,10 +95,10 @@
9595
});
9696

9797
return resultHTML = `<a class="instantsearch__entry" href="${hit.url}">
98-
${headerHTML}
9998
<div class="instantsearch__entry-breadcrumbs">
10099
${breadcrumbsHTML}
101100
</div>
101+
${headerHTML}
102102
${contentHTML}
103103
</a>`;
104104
},

0 commit comments

Comments
 (0)