Revises the hierarchy of headings in the search results. In combination
with the H1 provided in in bug #
1994711, the result is now:
h1. Staff Catalog
h2. Search Results (N)
(repeat for each result:)
h3. [Title] [Author]
h2. Facets
(repeat for each facet box:)
h3. [Facet title]
The source order of the results list and facet sidebar have been
swapped. The facets still appear on the left visually, but now fall
after the results in the document.
Signed-off-by: Stephanie Leary <stephanie.leary@equinoxoli.org>
Signed-off-by: Jane Sandberg <js7389@princeton.edu>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
--- /dev/null
+.facet-selected {
+ background-color: #DDD;
+}
+
+.card {
+ width: 100%;
+}
+
+.list-group-item {
+ padding: .5rem .75rem .5rem .75rem
+}
\ No newline at end of file
-<style>
- .facet-selected {
- background-color: #DDD;
- }
- .card {
- width: 100%;
- }
- .list-group-item {padding: .5rem .75rem .5rem .75rem}
-</style>
<div *ngIf="searchContext.result.facetData">
+ <h2 class="sr-only" i18n>Facets</h2>
<div *ngFor="let facetConf of facetConfig.display">
<div *ngIf="searchContext.result.facetData[facetConf.facetClass]">
<div *ngFor="let name of facetConf.facetOrder">
<div class="row"
*ngIf="searchContext.result.facetData[facetConf.facetClass][name]">
<div class="card mb-2">
- <h4 class="card-header">
+ <h3 class="card-header">
{{searchContext.result.facetData[facetConf.facetClass][name].cmfLabel}}
- </h4>
+ </h3>
<ul class="list-group list-group-flush">
<li class="list-group-item"
[ngClass]="{'facet-selected' :
@Component({
selector: 'eg-catalog-result-facets',
- templateUrl: 'facets.component.html'
+ templateUrl: 'facets.component.html',
+ styleUrls: ['./facets.component.css']
})
export class ResultFacetsComponent implements OnInit {
max-height: 158px;
max-width: 100px;
}
+
+.bib-field-title {
+ font-size: .88rem;
+ font-weight: inherit;
+ margin: 0;
+}
+
+.bib-title-link {
+ font-weight: bold;
+}
+
+.bib-author-link {
+ font-weight: normal;
+ display: block;
+}
\ No newline at end of file
</ng-container>
<div class="flex-1 pl-2">
<div class="row">
- <div class="col-lg-12 font-weight-bold">
+ <div class="col-lg-12">
+ <h3 class="bib-field-title">
<ng-container *ngIf="hasMrConstituentRecords(summary)">
- <a routerLink="/staff/catalog/search"
+ <a routerLink="/staff/catalog/search" class="bib-title-link"
[queryParams]="appendFromMrParam(summary)">
<eg-bib-display-field [summary]="summary" field="title"
[usePlaceholder]="true"></eg-bib-display-field>
</a>
</ng-container>
+
<ng-container *ngIf="!hasMrConstituentRecords(summary)">
<a routerLink="/staff/catalog/record/{{summary.id}}"
- [queryParams]="currentParams()">
+ [queryParams]="currentParams()" class="bib-title-link">
<eg-bib-display-field [summary]="summary" field="title"
[usePlaceholder]="true"></eg-bib-display-field>
</a>
</ng-container>
- </div>
- </div>
- <div class="row pt-2">
- <div class="col-lg-12">
- <a routerLink="/staff/catalog/search"
- [queryParams]="getAuthorSearchParams(summary)">
- <eg-bib-display-field [summary]="summary" field="author"
- [usePlaceholder]="true"></eg-bib-display-field>
+
+ <a routerLink="/staff/catalog/search" class="bib-author-link pt-2" [queryParams]="getAuthorSearchParams(summary)">
+ <eg-bib-display-field [summary]="summary" field="author" [usePlaceholder]="true"></eg-bib-display-field>
</a>
+ </h3>
</div>
</div>
<div class="row pt-2">
--- /dev/null
+#staff-catalog-results-container h2 {
+ color: #212529;
+ font-size: 1.15rem;
+ font-weight: 500;
+}
+
+/* put the facets first visually */
+
+#eg-catalog-result-facets {
+ order: 1;
+}
+
+#eg-catalog-result-records {
+ order: 2;
+}
\ No newline at end of file
<div class="row">
<div class="col-lg-2" *ngIf="!searchContext.basket">
<ng-container *ngIf="!searchContext.termSearch.browseEntry">
- <h3 i18n>Search Results ({{searchContext.result.count}})</h3>
+ <h2 i18n>Search Results ({{searchContext.result.count}})</h2>
</ng-container>
</div>
<div class="col-lg-2" *ngIf="searchContext.basket">
</div>
<div>
<div class="row mt-2">
- <div class="col-lg-2" *ngIf="!searchContext.basket">
- <eg-catalog-result-facets></eg-catalog-result-facets>
- </div>
- <div
+ <div id="eg-catalog-result-records"
[ngClass]="{'col-lg-10': !searchContext.basket, 'col-lg-12': searchContext.basket}">
<div *ngFor="let summary of searchContext.result.records; let idx = index">
<div *ngIf="summary">
<div class="float-right">
<eg-catalog-result-pagination></eg-catalog-result-pagination>
</div>
+ </div>
+ <div class="col-lg-2" id="eg-catalog-result-facets" *ngIf="!searchContext.basket">
+ <eg-catalog-result-facets></eg-catalog-result-facets>
</div>
</div>
</div>
@Component({
selector: 'eg-catalog-results',
- templateUrl: 'results.component.html'
+ templateUrl: 'results.component.html',
+ styleUrls: ['results.component.css']
})
export class ResultsComponent implements OnInit, OnDestroy {