LP1994711 Semantic H1 headings for page titles
authorStephanie Leary <stephanie.leary@equinoxoli.org>
Fri, 14 Apr 2023 19:27:26 +0000 (19:27 +0000)
committerGalen Charlton <gmc@equinoxOLI.org>
Wed, 19 Apr 2023 13:12:48 +0000 (09:12 -0400)
Patch alters the markup within <eg-staff-banner> to include H1 headings
for page titles.

The patch also includes a new CSS file for the course page component,
which appears to be the only component taking advantage of the custom
classes and icons for page titles. I've made archived course titles gray
and italicized.

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>

Open-ILS/src/eg2/src/app/staff/admin/local/course-reserves/course-list.component.ts
Open-ILS/src/eg2/src/app/staff/admin/local/course-reserves/course-page.component.css [new file with mode: 0644]
Open-ILS/src/eg2/src/app/staff/admin/local/course-reserves/course-page.component.html
Open-ILS/src/eg2/src/app/staff/share/staff-banner.component.ts
Open-ILS/src/eg2/src/styles.css

index cc1f75b..a5b4f0d 100644 (file)
@@ -21,7 +21,8 @@ import {CourseAssociateUsersComponent
     } from './course-associate-users.component';
 
 @Component({
-    templateUrl: './course-list.component.html'
+    templateUrl: './course-list.component.html',
+    styleUrls: ['./course-page.component.css']
 })
 
 export class CourseListComponent implements OnInit, AfterViewInit {
diff --git a/Open-ILS/src/eg2/src/app/staff/admin/local/course-reserves/course-page.component.css b/Open-ILS/src/eg2/src/app/staff/admin/local/course-reserves/course-page.component.css
new file mode 100644 (file)
index 0000000..0beaeb7
--- /dev/null
@@ -0,0 +1,4 @@
+.course-archived {
+  color: #666;
+  font-style: italic;
+}
\ No newline at end of file
index 0310f2c..24fc1ae 100644 (file)
@@ -1,7 +1,7 @@
 <eg-staff-banner
   bannerText=" {{currentCourse.course_number()}}: {{currentCourse.name()}}"
   i18n-bannerText class="mb-3" *ngIf="currentCourse"
-  [bannerStyle]="(courseIsArchived || currentCourse.is_archived()) === 't' ? 'alert-secondary' : null"
+  [bannerStyle]="(courseIsArchived || currentCourse.is_archived()) === 't' ? 'course-archived' : null"
   [bannerIcon]="(courseIsArchived || currentCourse.is_archived()) === 't' ? 'lock' : null">
 </eg-staff-banner>
 
index c49c495..6055fbc 100644 (file)
@@ -5,9 +5,10 @@ import {Component, OnInit, Input} from '@angular/core';
   template: `
     <div class="lead alert alert-primary text-center pt-1 pb-1"
       [ngClass]="bannerStyle ? bannerStyle : 'alert-primary'">
-      <eg-title i18n-prefix [prefix]="bannerText"></eg-title>
-      <i class="material-icons align-middle text-left" *ngIf="bannerIcon">{{bannerIcon}}</i>
-       <span class="align-middle">{{bannerText}}</span>
+      <h1>
+        <i class="material-icons align-middle text-left" *ngIf="bannerIcon">{{bannerIcon}}</i>
+        <span i18n>{{bannerText}}</span>
+      </h1>
     </div>
     `
 })
index e1d8e74..7297759 100644 (file)
@@ -23,6 +23,11 @@ body, .form-control, .btn, .input-group-text {
    */
   font-size: .88rem;
 }
+h1 {
+  font-size: 1.25rem;
+  font-weight: normal;
+  margin: 0
+}
 h2 {
   font-size: 1.25rem;
   font-weight: 550;