2024-04-23 14:58:44 -07:00
{% if current_user.is_authenticated %}
2025-06-02 13:10:00 -07:00
{% set navigation = [
2025-11-07 07:12:57 -05:00
{"href": url_for("main.show_accounts_or_dashboard"), "text": "Current service", "active": request.path.startswith('/accounts') or request.path.startswith('/services') or request.path.startswith('/activity/services') or request.path.startswith('/user-profile')},
2025-06-02 13:10:00 -07:00
{"href": url_for('main.get_started'), "text": "Using Notify", "active": request.path.startswith('/using-notify')},
{"href": url_for('main.support'), "text": "Contact us", "active": header_navigation.is_selected('support')}
] %}
2024-07-16 09:57:07 -07:00
2025-06-02 13:10:00 -07:00
{% if current_user.platform_admin %}
{% set navigation = navigation + [{"href": url_for('main.platform_admin_splash_page'), "text": "Platform admin", "active": header_navigation.is_selected('platform-admin')}] %}
{% else %}
{% set navigation = navigation + [{"href": url_for('main.user_profile'), "text": "User profile", "active": header_navigation.is_selected('user-profile')}] %}
{% endif %}
2024-12-19 12:44:58 -05:00
2025-06-02 13:10:00 -07:00
{% if current_service %}
2025-07-15 23:56:58 -07:00
{% if current_user.has_permissions(ServicePermission.MANAGE_SERVICE) %}
2025-06-02 13:10:00 -07:00
{% set secondaryNavigation = [
{"href": url_for('main.service_settings', service_id=current_service.id), "text": "Settings", "active": secondary_navigation.is_selected('settings')},
{"href": url_for('main.sign_out'), "text": "Sign out"}
] %}
{% else %}
{% set secondaryNavigation = [
{"href": url_for('main.sign_out'), "text": "Sign out"}
] %}
{% endif %}
{% else %}
{% set secondaryNavigation = [{"href": url_for('main.sign_out'), "text": "Sign out"}] %}
{% endif %}
2025-01-12 16:56:22 -05:00
2025-06-02 13:10:00 -07:00
{% endif %}
2024-03-21 21:03:32 -07:00
< header class = "usa-header usa-header--extended" >
< div class = "usa-nav-container" >
< div class = "usa-navbar" >
2025-01-06 12:49:39 -05:00
< div class = "display-flex flex-align-center flex-justify width-full" >
2024-11-19 09:41:08 -05:00
< div class = "usa-logo display-flex flex-align-center flex-justify" id = "-logo" >
< div class = "logo-img display-flex" >
< a href = "/" >
< span class = "usa-sr-only" > Notify.gov logo< / span >
< 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 >
2024-03-21 21:03:32 -07:00
< / div >
< / div >
< nav aria-label = "Primary navigation" class = "usa-nav" >
< div class = "usa-nav__inner" >
< button type = "button" class = "usa-nav__close" >
2024-08-20 12:01:06 -07:00
< img src = "{{ asset_url('img/usa-icons/close.svg') }}" role = "img" alt = "Close" / >
2024-03-21 21:03:32 -07:00
< / button >
< ul class = "usa-nav__primary usa-accordion margin-right-1" >
{% for item in navigation %}
2024-11-04 11:44:45 -05:00
{% if item.href and item.text %}
< li class = "usa-nav__primary-item{{ ' is-current' if item.active }}" >
< a class = "usa-nav__link {{ ' usa-current' if item.active }}" href = "{{ item.href }}" { % for attribute , value
in item.attributes %} {{attribute}}="{{value}}" {% endfor %}>
< span > {{ item.text }}< / span >
< / a >
< / li >
{% endif %}
2024-03-21 21:03:32 -07:00
{% endfor %}
< / ul >
2025-11-05 09:24:31 -05:00
< div class = "usa-nav__secondary" >
2024-03-21 21:03:32 -07:00
< ul class = "usa-nav__secondary-links" >
{% if secondaryNavigation %}
2024-11-04 11:44:45 -05:00
{% for item in secondaryNavigation %}
{% if item.href and item.text %}
< li class = "usa-nav__secondary-item{{ ' is-current' if item.active }}" >
< a class = "usa-nav__link {{ ' usa-current' if item.active }}" href = "{{ item.href }}" { % for attribute ,
value in item.attributes %} {{attribute}}="{{value}}" {% endfor %}>
< span > {{ item.text }}< / span >
< / a >
< / li >
{% endif %}
{% endfor %}
2024-03-21 21:03:32 -07:00
{% endif %}
< / ul >
< / div >
< / div >
< / nav >
< / div >
< / header >