mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-09 05:33:11 -04:00
Added new header button that is displayed in header
This commit is contained in:
@@ -173,6 +173,18 @@ def create_app(application):
|
|||||||
]
|
]
|
||||||
return dict(FEATURE_BEST_PRACTICES_ENABLED=feature_best_practices_enabled)
|
return dict(FEATURE_BEST_PRACTICES_ENABLED=feature_best_practices_enabled)
|
||||||
|
|
||||||
|
@application.context_processor
|
||||||
|
def inject_feature_flags():
|
||||||
|
feature_best_practices_enabled = application.config[
|
||||||
|
"FEATURE_ABOUT_PAGE_ENABLED"
|
||||||
|
]
|
||||||
|
return dict(FEATURE_ABOUT_PAGE_ENABLED=feature_best_practices_enabled)
|
||||||
|
|
||||||
|
@application.context_processor
|
||||||
|
def inject_initial_signin_url():
|
||||||
|
url = os.getenv("LOGIN_DOT_GOV_INITIAL_SIGNIN_URL")
|
||||||
|
return {'initial_signin_url': url}
|
||||||
|
|
||||||
notify_environment = os.environ["NOTIFY_ENVIRONMENT"]
|
notify_environment = os.environ["NOTIFY_ENVIRONMENT"]
|
||||||
|
|
||||||
application.config.from_object(configs[notify_environment])
|
application.config.from_object(configs[notify_environment])
|
||||||
|
|||||||
@@ -43,18 +43,29 @@ secondary_navigation.is_selected('settings')},
|
|||||||
<header class="usa-header usa-header--extended">
|
<header class="usa-header usa-header--extended">
|
||||||
<div class="usa-nav-container">
|
<div class="usa-nav-container">
|
||||||
<div class="usa-navbar">
|
<div class="usa-navbar">
|
||||||
<div class="usa-logo display-flex flex-align-center flex-justify" id="-logo">
|
<div class="display-flex flex-align-center flex-justify">
|
||||||
<div class="logo-img display-flex">
|
<div class="usa-logo display-flex flex-align-center flex-justify" id="-logo">
|
||||||
<a href="/">
|
<div class="logo-img display-flex">
|
||||||
<span class="usa-sr-only">Notify.gov logo</span>
|
<a href="/">
|
||||||
<img src="{{ (asset_path | default('/static')) + 'images/notify-logo.svg' }}" alt="Notify.gov logo"
|
<span class="usa-sr-only">Notify.gov logo</span>
|
||||||
class="usa-flag-logo margin-right-1">
|
<img src="{{ (asset_path | default('/static')) + 'images/notify-logo.svg' }}" alt="Notify.gov logo"
|
||||||
|
class="usa-flag-logo margin-right-1">
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
{% if navigation %}
|
||||||
|
<button type="button" class="usa-menu-btn">Menu</button>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% if not current_user.is_authenticated and FEATURE_ABOUT_PAGE_ENABLED %}
|
||||||
|
<div class="usa-nav__login">
|
||||||
|
<a class="usa-button usa-button login-button login-button--primary margin-right-2"
|
||||||
|
href="{{ initial_signin_url }}">Sign
|
||||||
|
in with <img src="{{ asset_url('images/logo-login.svg') }}" alt="Login.gov logo">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{% if navigation %}
|
|
||||||
<button type="button" class="usa-menu-btn">Menu</button>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<nav aria-label="Primary navigation" class="usa-nav">
|
<nav aria-label="Primary navigation" class="usa-nav">
|
||||||
<div class="usa-nav__inner">
|
<div class="usa-nav__inner">
|
||||||
@@ -89,6 +100,7 @@ secondary_navigation.is_selected('settings')},
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user