From dee6ef1c16441c96bc1ad680720da9cedb30a858 Mon Sep 17 00:00:00 2001 From: stvnrlly Date: Wed, 14 Dec 2022 13:14:35 -0500 Subject: [PATCH] put some things back for simplicity --- app/templates/admin_template.html | 96 ++++++++ .../uk_components/footer/template.njk | 32 +-- .../uk_components/header/template.njk | 40 +--- app/templates/main_template.html | 211 +++--------------- .../views/agreement/service-agreement.html | 2 +- app/templates/views/jobs/jobs.html | 2 +- .../manage-users/confirm-edit-user-email.html | 6 +- .../confirm-edit-user-mobile-number.html | 2 +- .../settings/preview-email-branding.html | 2 +- .../views/user-profile/security-keys.html | 2 +- gulpfile.js | 2 +- 11 files changed, 133 insertions(+), 264 deletions(-) diff --git a/app/templates/admin_template.html b/app/templates/admin_template.html index 9ad821632..df66b7ba2 100644 --- a/app/templates/admin_template.html +++ b/app/templates/admin_template.html @@ -2,6 +2,15 @@ {% from "components/banner.html" import banner %} {% from "components/cookie-banner.html" import cookie_banner %} +{% block headIcons %} + + {# Hardcoded value of $govuk-black #} + + + + +{% endblock %} + {% block head %} {%- for font in font_paths %} @@ -38,7 +47,94 @@ {% endblock %} {% block header %} + {% if current_user.is_authenticated %} + {% if current_user.platform_admin %} + {% set navigation = [ + { + "href": url_for('main.support'), + "text": "Support", + "active": header_navigation.is_selected('support') + }, + { + "href": url_for('main.documentation'), + "text": "Documentation", + "active": header_navigation.is_selected('documentation') + }, + { + "href": url_for('main.user_profile'), + "text": current_user.name, + "active": header_navigation.is_selected('user-profile') + }, + { + "href": url_for('main.platform_admin_splash_page'), + "text": "Platform admin", + "active": header_navigation.is_selected('platform-admin') + }, + { + "href": url_for('main.sign_out'), + "text": "Sign out" + } + ] %} + {% else %} + {% set navigation = [ + { + "href": url_for('main.support'), + "text": "Support", + "active": header_navigation.is_selected('support') + }, + { + "href": url_for('main.documentation'), + "text": "Documentation", + "active": header_navigation.is_selected('documentation') + }, + { + "href": url_for('main.user_profile'), + "text": current_user.name, + "active": header_navigation.is_selected('user-profile') + }, + { + "href": url_for('main.sign_out'), + "text": "Sign out" + } + ] %} + {% endif %} + {% else %} + {% set navigation = [ + { + "href": url_for('main.support'), + "text": "Support", + "active": header_navigation.is_selected('support') + }, + { + "href": url_for('main.features'), + "text": "Features", + "active": header_navigation.is_selected('features') + }, + { + "href": url_for('main.pricing'), + "text": "Pricing", + "active": header_navigation.is_selected('pricing') + }, + { + "href": url_for('main.documentation'), + "text": "Documentation", + "active": header_navigation.is_selected('documentation') + }, + { + "href": url_for('main.sign_in'), + "text": "Sign in", + "active": header_navigation.is_selected('sign-in') + } + ] %} + {% endif %} + {{ govukHeader({ + "homepageUrl": url_for('main.show_accounts_or_dashboard'), + "productName": "Notify", + "navigation": navigation, + "navigationClasses": "govuk-header__navigation--end", + "assetsPath": asset_path + "images" + }) }} {% endblock %} {% block footer %} diff --git a/app/templates/components/uk_components/footer/template.njk b/app/templates/components/uk_components/footer/template.njk index 1e797312a..a24929812 100644 --- a/app/templates/components/uk_components/footer/template.njk +++ b/app/templates/components/uk_components/footer/template.njk @@ -50,37 +50,7 @@ {% endif %} {% endif %} - {#- The SVG needs `focusable="false"` so that Internet Explorer does not - treat it as an interactive element - without this it will be - 'focusable' when using the keyboard to navigate. #} - - - All content is available under the - Open Government Licence v3.0, except where otherwise stated - - - diff --git a/app/templates/components/uk_components/header/template.njk b/app/templates/components/uk_components/header/template.njk index b7f27efa7..b94e9293f 100644 --- a/app/templates/components/uk_components/header/template.njk +++ b/app/templates/components/uk_components/header/template.njk @@ -5,45 +5,9 @@