diff --git a/src/registrar/assets/sass/_theme/_base.scss b/src/registrar/assets/sass/_theme/_base.scss index 2aa3da565..12d32d0fe 100644 --- a/src/registrar/assets/sass/_theme/_base.scss +++ b/src/registrar/assets/sass/_theme/_base.scss @@ -92,10 +92,6 @@ footer { color: color('primary'); } -.usa-identifier__logo { - height: units(7); -} - abbr[title] { // workaround for underlining abbr element border-bottom: none; @@ -135,36 +131,6 @@ abbr[title] { cursor: pointer; } -.input-with-edit-button { - svg.usa-icon { - width: 1.5em !important; - height: 1.5em !important; - color: #{$dhs-green}; - position: absolute; - } - &.input-with-edit-button__error { - svg.usa-icon { - color: #{$dhs-red}; - } - div.readonly-field { - color: #{$dhs-red}; - } - } -} - -// We need to deviate from some default USWDS styles here -// in this particular case, so we have to override this. -.usa-form .usa-button.readonly-edit-button { - margin-top: 0px !important; - padding-top: 0px !important; - svg { - width: 1.25em !important; - height: 1.25em !important; - } -} - - - .padding--8-8-9 { padding: 8px 8px 9px !important; } diff --git a/src/registrar/assets/sass/_theme/_buttons.scss b/src/registrar/assets/sass/_theme/_buttons.scss index 92556556b..8ec43705f 100644 --- a/src/registrar/assets/sass/_theme/_buttons.scss +++ b/src/registrar/assets/sass/_theme/_buttons.scss @@ -162,6 +162,34 @@ a.usa-button--unstyled:visited { } } +.input-with-edit-button { + svg.usa-icon { + width: 1.5em !important; + height: 1.5em !important; + color: #{$dhs-green}; + position: absolute; + } + &.input-with-edit-button__error { + svg.usa-icon { + color: #{$dhs-red}; + } + div.readonly-field { + color: #{$dhs-red}; + } + } +} + +// We need to deviate from some default USWDS styles here +// in this particular case, so we have to override this. +.usa-form .usa-button.readonly-edit-button { + margin-top: 0px !important; + padding-top: 0px !important; + svg { + width: 1.25em !important; + height: 1.25em !important; + } +} + .usa-button--filter { width: auto; // For mobile stacking diff --git a/src/registrar/assets/sass/_theme/_header.scss b/src/registrar/assets/sass/_theme/_header.scss index a8c642804..6e12bff9e 100644 --- a/src/registrar/assets/sass/_theme/_header.scss +++ b/src/registrar/assets/sass/_theme/_header.scss @@ -67,30 +67,16 @@ } .usa-header--extended { - .usa-nav__primary { - .usa-nav-link, - .usa-nav-link:hover, - .usa-nav-link:active { - color: color('primary'); - font-weight: font-weight('normal'); - font-size: 16px; - } - .usa-current, - .usa-current:hover, - .usa-current:active { - font-weight: font-weight('bold'); - } - } @include at-media(desktop) { background-color: color('primary-darker'); border-top: solid 1px color('base'); - border-bottom: solid 1px color('base-lighter'); + border-bottom: solid 1px color('base-light'); .usa-logo__text a { color: color('white'); } .usa-nav { - background-color: color('primary-lightest'); + background-color: color('primary-lighter'); } .usa-nav__primary-item:last-child { margin-left: auto; @@ -98,6 +84,20 @@ padding-right: 0; } } + .usa-nav__primary { + .usa-nav-link, + .usa-nav-link:hover, + .usa-nav-link:active { + color: color('primary'); + font-weight: font-weight('normal'); + font-size: 16px; + } + .usa-current, + .usa-current:hover, + .usa-current:active { + font-weight: font-weight('bold'); + } + } .usa-nav__secondary { // I don't know why USWDS has this at 2 rem, which puts it out of alignment right: 3rem; diff --git a/src/registrar/assets/sass/_theme/_identifier.scss b/src/registrar/assets/sass/_theme/_identifier.scss new file mode 100644 index 000000000..e56d887b9 --- /dev/null +++ b/src/registrar/assets/sass/_theme/_identifier.scss @@ -0,0 +1,10 @@ +@use "uswds-core" as *; + +.usa-banner { + background-color: color('primary-darker'); +} + +.usa-identifier__logo { + height: units(7); + } + \ No newline at end of file diff --git a/src/registrar/assets/sass/_theme/styles.scss b/src/registrar/assets/sass/_theme/styles.scss index 142664423..4775b60c9 100644 --- a/src/registrar/assets/sass/_theme/styles.scss +++ b/src/registrar/assets/sass/_theme/styles.scss @@ -21,6 +21,7 @@ @forward "alerts"; @forward "tables"; @forward "sidenav"; +@forward "identifier"; @forward "header"; @forward "register-form"; diff --git a/src/registrar/context_processors.py b/src/registrar/context_processors.py index 8072e85d4..acea72c4e 100644 --- a/src/registrar/context_processors.py +++ b/src/registrar/context_processors.py @@ -13,6 +13,7 @@ def language_code(request): """ return {"LANGUAGE_CODE": settings.LANGUAGE_CODE} + def canonical_path(request): """Add a canonical URL to the template context. @@ -22,6 +23,7 @@ def canonical_path(request): """ return {"CANONICAL_PATH": request.build_absolute_uri(request.path)} + def is_demo_site(request): """Add a boolean if this is a demo site. @@ -31,10 +33,12 @@ def is_demo_site(request): """ return {"IS_DEMO_SITE": settings.IS_DEMO_SITE} + def is_production(request): """Add a boolean if this is our production site.""" return {"IS_PRODUCTION": settings.IS_PRODUCTION} + def org_user_status(request): if request.user.is_authenticated: is_org_user = request.user.is_org_user(request) @@ -42,20 +46,17 @@ def org_user_status(request): is_org_user = False return { - 'is_org_user': is_org_user, + "is_org_user": is_org_user, } + def add_portfolio_to_context(request): - return { - 'portfolio': getattr(request, 'portfolio', None) - } + return {"portfolio": getattr(request, "portfolio", None)} + def add_path_to_context(request): - return { - 'path': getattr(request, 'path', None) - } + return {"path": getattr(request, "path", None)} + def add_has_profile_feature_flag_to_context(request): - return { - 'has_profile_feature_flag': flag_is_active(request, "profile_feature") - } + return {"has_profile_feature_flag": flag_is_active(request, "profile_feature")} diff --git a/src/registrar/registrar_middleware.py b/src/registrar/registrar_middleware.py index 5e534ea7e..80d1fe7a9 100644 --- a/src/registrar/registrar_middleware.py +++ b/src/registrar/registrar_middleware.py @@ -144,7 +144,7 @@ class CheckPortfolioMiddleware: if request.user.is_authenticated and request.user.is_org_user(request): user_portfolios = Portfolio.objects.filter(creator=request.user) first_portfolio = user_portfolios.first() - + if first_portfolio: # Add the portfolio to the request object request.portfolio = first_portfolio diff --git a/src/registrar/templates/includes/header_basic.html b/src/registrar/templates/includes/header_basic.html index 0fef664ac..692b2cb03 100644 --- a/src/registrar/templates/includes/header_basic.html +++ b/src/registrar/templates/includes/header_basic.html @@ -16,7 +16,7 @@