diff --git a/lib/app-components/addon/components/branded-navbar/component.ts b/lib/app-components/addon/components/branded-navbar/component.ts index e2e2ac3711..bde81474d2 100644 --- a/lib/app-components/addon/components/branded-navbar/component.ts +++ b/lib/app-components/addon/components/branded-navbar/component.ts @@ -11,6 +11,7 @@ import { tracked } from 'tracked-built-ins'; import { serviceLinks } from 'ember-osf-web/const/service-links'; import { layout, requiredAction } from 'ember-osf-web/decorators/component'; +import BrandModel from 'ember-osf-web/models/brand'; import PreprintProviderModel from 'ember-osf-web/models/preprint-provider'; import ProviderModel from 'ember-osf-web/models/provider'; import Analytics from 'ember-osf-web/services/analytics'; @@ -53,6 +54,7 @@ export default class BrandedNavbar extends Component { @alias('theme.provider') provider!: ProviderModel; @alias('theme.provider.id') providerId!: string; + @alias('theme.provider.brand.primaryColor') brandPrimaryColor!: BrandModel; @computed('intl.locale', 'theme.{providerType,provider.providerTitle}', 'translateKey') get brandTitle(): string { @@ -68,7 +70,7 @@ export default class BrandedNavbar extends Component { @action toggleSecondaryNavigation() { - this.toggleProperty('showNavLinks'); + this.showNavLinks = !this.showNavLinks; } get isMobileOrTablet() { diff --git a/lib/app-components/addon/components/branded-navbar/styles.scss b/lib/app-components/addon/components/branded-navbar/styles.scss index 8171c679b0..baf3ec9847 100644 --- a/lib/app-components/addon/components/branded-navbar/styles.scss +++ b/lib/app-components/addon/components/branded-navbar/styles.scss @@ -2,7 +2,6 @@ .branded-nav-wrapper { .branded-nav { - background-color: var(--primary-color); z-index: 999; } @@ -93,3 +92,25 @@ } } + +// preprint-branded navbar uses brand relationship and not custom CSS +// !importants needed to override the default styles set in app/styles/_components.scss +// branded-navbar dark/light text only used for preprint providers, as collection providers currently use custom CSS +.preprint-branded-navbar { + background-color: var(--primary-color) !important; + background-image: none !important; + + &.light-text { + a, + :global(.secondary-nav-dropdown) { + color: $color-text-white !important; + } + } + + &.dark-text { + a, + :global(.secondary-nav-dropdown) { + color: $color-text-black !important; + } + } +} diff --git a/lib/app-components/addon/components/branded-navbar/template.hbs b/lib/app-components/addon/components/branded-navbar/template.hbs index 47023f0647..e8d7c28ac4 100644 --- a/lib/app-components/addon/components/branded-navbar/template.hbs +++ b/lib/app-components/addon/components/branded-navbar/template.hbs @@ -1,6 +1,8 @@