Fixed missing login button on sublinks

This commit is contained in:
alexjanousekGSA
2025-01-12 16:56:22 -05:00
parent 817477bd72
commit 6441ae8ca7

View File

@@ -1,3 +1,9 @@
{% set is_information_section = FEATURE_ABOUT_PAGE_ENABLED and (
request.path.startswith('/about') or
request.path.startswith('/join-notify') or
request.path.startswith('/contact')
) %}
{% if current_user.is_authenticated %}
{% set navigation = [
{"href": url_for("main.show_accounts_or_dashboard"), "text": "Current service", "active": header_navigation.is_selected('accounts-or-dashboard')},
@@ -39,14 +45,16 @@
{% if FEATURE_ABOUT_PAGE_ENABLED %}
{% set navigation = navigation + [
{"href": url_for('main.about_notify'), "text": "About Notify", "active": request.path.startswith('/about')},
{"href": url_for('main.join_notify'), "text": "Join Notify", "active": request.path == '/join-notify'},
{"href": url_for('main.contact'), "text": "Contact us", "active": request.path == '/contact'}
{"href": url_for('main.about_notify'), "text": "About Notify", "active": is_information_section},
{"href": url_for('main.join_notify'), "text": "Join Notify", "active": request.path.startswith('/join-notify')},
{"href": url_for('main.contact'), "text": "Contact us", "active": request.path.startswith('/contact')}
] %}
{% endif %}
{% endif %}
<header class="usa-header usa-header--extended">
<div class="usa-nav-container">
<div class="usa-navbar">
@@ -63,7 +71,7 @@
<button type="button" class="usa-menu-btn">Menu</button>
{% endif %}
</div>
{% if not current_user.is_authenticated and FEATURE_ABOUT_PAGE_ENABLED and request.path == '/about'%}
{% if not current_user.is_authenticated and is_information_section%}
<div class="usa-nav__login">
<a class="usa-button usa-button login-button login-button--primary margin-right-2"
href="{{ initial_signin_url }}">Sign