LP2009865 Heading tags for catalog search results
authorStephanie Leary <stephanie.leary@equinoxoli.org>
Thu, 9 Mar 2023 16:08:40 +0000 (16:08 +0000)
committerStephanie Leary <stephanie.leary@equinoxoli.org>
Fri, 14 Apr 2023 20:47:16 +0000 (20:47 +0000)
Alters the markup of the search results list to use <h3> for the title
and <h4> for the author. To keep the heading outline in the correct
order, this also changes the "Search Results (N)" heading from <h3> to
<h2>.

In conjunction with the fix for Bug #1994711, this produces the
following page outline:

h1. Staff Catalog
h2. Search Results (N)
(repeat for each result:)
h3. [Title]
h4. [Author]
(repeat for each facet box:)
h4. [Facet title]

The facet headings should probably be adjusted separately.

Signed-off-by: Stephanie Leary <stephanie.leary@equinoxoli.org>
Open-ILS/src/eg2/src/app/staff/catalog/result/record.component.css
Open-ILS/src/eg2/src/app/staff/catalog/result/record.component.html
Open-ILS/src/eg2/src/app/staff/catalog/result/results.component.css [new file with mode: 0644]
Open-ILS/src/eg2/src/app/staff/catalog/result/results.component.html
Open-ILS/src/eg2/src/app/staff/catalog/result/results.component.ts

index 2930138..a52a391 100644 (file)
     max-height: 158px;
     max-width: 100px;
 }
+
+h3.bib-field-title {
+    font-size: .88rem;
+    font-weight: bold;
+    margin: 0;
+}
+
+h4.bib-field-author {
+    font-size: .88rem;
+    font-weight: normal;
+    margin: 0;
+}
index fa33c54..1ea6a97 100644 (file)
@@ -38,7 +38,8 @@
         </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"
                     [queryParams]="appendFromMrParam(summary)">
@@ -46,6 +47,7 @@
                       [usePlaceholder]="true"></eg-bib-display-field>
                   </a>
               </ng-container>
+              
               <ng-container *ngIf="!hasMrConstituentRecords(summary)">
                 <a routerLink="/staff/catalog/record/{{summary.id}}"
                   [queryParams]="currentParams()">
                     [usePlaceholder]="true"></eg-bib-display-field>
                 </a>
               </ng-container>
+              </h3>
             </div>
           </div>
           <div class="row pt-2">
             <div class="col-lg-12">
+              <h4 class="bib-field-author">
               <a routerLink="/staff/catalog/search"
                 [queryParams]="getAuthorSearchParams(summary)">
                 <eg-bib-display-field [summary]="summary" field="author"
                   [usePlaceholder]="true"></eg-bib-display-field>
               </a>
+              </h4>
             </div>
           </div>
           <div class="row pt-2">
diff --git a/Open-ILS/src/eg2/src/app/staff/catalog/result/results.component.css b/Open-ILS/src/eg2/src/app/staff/catalog/result/results.component.css
new file mode 100644 (file)
index 0000000..276fd94
--- /dev/null
@@ -0,0 +1,5 @@
+#staff-catalog-results-container h2 {
+    color: #212529;
+    font-size: 1.15rem;
+    font-weight: 500;
+}
\ No newline at end of file
index 5f584a5..58a6eeb 100644 (file)
@@ -38,7 +38,7 @@
   <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">
index f4e42c1..76711e1 100644 (file)
@@ -14,7 +14,8 @@ import {ServerStoreService} from '@eg/core/server-store.service';
 
 @Component({
   selector: 'eg-catalog-results',
-  templateUrl: 'results.component.html'
+  templateUrl: 'results.component.html',
+  styleUrls: ['results.component.css']
 })
 export class ResultsComponent implements OnInit, OnDestroy {