NCEAS / metacatui-themes

Themes for MetacatUI repositories
1 stars 0 forks source link

Make portal top bar legible #11

Closed iannesbitt closed 7 months ago

iannesbitt commented 7 months ago

Currently, the top bar in portals is a light grey that does not fit with the theme and makes the top bar text nearly impossible to read. The theme colors should be set in config.js but this particular color is set in the theme's metacatui.css.

How it currently looks: image

How it should look: image

iannesbitt commented 7 months ago

Theme colors are set in config.js, stored as CSS variables in portal.html and then applied in the CSS documents:

  <style type="text/css">
    :root {
      --portal-primary-color: <%=primaryColor%>;
      --portal-secondary-color: <%=secondaryColor%>;
      --portal-accent-color: <%=accentColor%>;
      --portal-primary-color-transparent: <%=primaryColorTransparent%>;
      --portal-secondary-color-transparent: <%=secondaryColorTransparent%>;
      --portal-accent-color-transparent: <%=accentColorTransparent%>;

    }
  </style>

So I changed the portal background color to follow the theme in metacatui.css:

.Portal.Editor #Navbar, .PortalView #Navbar, .Portal.Editor .navbar-inner, .PortalView .navbar-inner {
    /* ... */
    background-color: var(--portal-primary-color);
}