@@ -245,6 +245,9 @@ export class CollectionBrowser
245
245
/** Whether to replace the default sort options with a slot for customization (default: false) */
246
246
@property ( { type : Boolean } ) enableSortOptionsSlot = false ;
247
247
248
+ /** Whether to display a smart results carousel above the full results */
249
+ @property ( { type : Boolean , reflect : true } ) showSmartResults = false ;
250
+
248
251
/**
249
252
* The results per page so we can paginate.
250
253
*
@@ -652,18 +655,31 @@ export class CollectionBrowser
652
655
*/
653
656
private get rightColumnTemplate ( ) : TemplateResult {
654
657
return html `
655
- <div id= "right-column" class = "column">
656
- <div id= "cb-top-view" >
657
- <slot name= "cb-top-slot" > </ slot>
658
- </ div>
659
- ${ this . isManageView
660
- ? this . manageBarTemplate
661
- : this . sortFilterBarTemplate }
662
- <slot name= "cb-results" > </ slot>
663
- ${ this . displayMode === `list-compact` && this . totalResults
664
- ? this . listHeaderTemplate
658
+ <div
659
+ id= "right-column"
660
+ class = "column ${ this . showSmartResults ? 'smart-results-spacing' : '' } "
661
+ >
662
+ ${ this . showSmartResults
663
+ ? html `<slot name= "smart-results" > </ slot> `
665
664
: nothing }
666
- ${ this . suppressResultTiles ? nothing : this . infiniteScrollerTemplate }
665
+ <section id= "results" >
666
+ ${ this . showSmartResults
667
+ ? html `<h2 class= "results-section-heading" >
668
+ ${ msg ( 'All results' ) }
669
+ </ h2> `
670
+ : nothing }
671
+ <div id= "cb-top-view" >
672
+ <slot name= "cb-top-slot" > </ slot>
673
+ </ div>
674
+ ${ this . isManageView
675
+ ? this . manageBarTemplate
676
+ : this . sortFilterBarTemplate }
677
+ <slot name= "cb-results" > </ slot>
678
+ ${ this . displayMode === `list-compact` && this . totalResults
679
+ ? this . listHeaderTemplate
680
+ : nothing }
681
+ ${ this . suppressResultTiles ? nothing : this . infiniteScrollerTemplate }
682
+ </ section>
667
683
</ div>
668
684
` ;
669
685
}
@@ -2072,14 +2088,34 @@ export class CollectionBrowser
2072
2088
min-height : 90vh ;
2073
2089
border-left : 1px solid rgb (232 , 232 , 232 );
2074
2090
border-right : 1px solid rgb (232 , 232 , 232 );
2075
- padding-left : 1rem ;
2076
- padding-right : 1rem ;
2077
2091
margin-top : var (--rightColumnMarginTop , 0 );
2078
2092
background : # fff ;
2079
2093
}
2080
2094
2095
+ # right-column .smart-results-spacing {
2096
+ padding-top : 0.5rem ;
2097
+ border-right : none;
2098
+ background : transparent;
2099
+ min-width : 0 ;
2100
+ }
2101
+
2102
+ # results {
2103
+ background : # fff ;
2104
+ padding-left : 1rem ;
2105
+ padding-right : 1rem ;
2106
+ }
2107
+
2108
+ # right-column .smart-results-spacing # results {
2109
+ border-radius : 10px 10px 0px 0px ;
2110
+ padding-top : 0.5rem ;
2111
+ margin-top : 1rem ;
2112
+ }
2113
+
2081
2114
.mobile # right-column {
2082
2115
border-left : none;
2116
+ }
2117
+
2118
+ .mobile # results {
2083
2119
padding : 5px 5px 0 ;
2084
2120
}
2085
2121
@@ -2268,6 +2304,12 @@ export class CollectionBrowser
2268
2304
max-height : 2000px ;
2269
2305
}
2270
2306
2307
+ .results-section-heading {
2308
+ margin : 0.5rem 0.3rem ;
2309
+ font-size : 2rem ;
2310
+ line-height : 25px ;
2311
+ }
2312
+
2271
2313
# results-total {
2272
2314
display : flex;
2273
2315
align-items : baseline;
0 commit comments