Hide username and password in eg2 when screen is narrow
authorJason Boyer <JBoyer@equinoxOLI.org>
Wed, 2 Mar 2022 11:54:29 +0000 (06:54 -0500)
committerMike Rylander <mrylander@gmail.com>
Thu, 24 Mar 2022 17:08:15 +0000 (13:08 -0400)
The Angular staff client navbar doesn't collapse when the screen is narrow
but currently the username and password can wrap, pushing the navbar over
the content. This patch doesn't add a collapsing navbar but hiding the user
information does at least stop the navbar from growing.

Signed-off-by: Jason Boyer <JBoyer@equinoxOLI.org>
Signed-off-by: rfrasur <rfrasur@library.in.gov>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/eg2/src/app/staff/nav.component.css
Open-ILS/src/eg2/src/app/staff/nav.component.html

index cb779b0..2df005a 100644 (file)
     align-items: center;
 }
 
+/* Hide the username@workstation if the screen is too narrow.
+Based on the hidden-sm class selector in Bootstrap. */
+@media (max-width: 991px) {
+    .navbar-user {
+        display: none !important
+    }
+}
index 76f4e71..6440486 100644 (file)
 
 
     <div class="navbar-nav mr-auto"></div>
-    <div class="navbar-nav" *ngIf="user()">
+    <div class="navbar-nav navbar-user" *ngIf="user()">
       <span i18n>{{user()}} @ {{workstation()}}</span>
     </div>
     <div class="navbar-nav" *ngIf="locales.length > 1 && currentLocale">