diff --git a/app/templates/admin_template.html b/app/templates/admin_template.html index ce3b976eb..09e4c9262 100644 --- a/app/templates/admin_template.html +++ b/app/templates/admin_template.html @@ -1,4 +1,4 @@ -{% extends "template.njk" %} +{% extends "main_template.html" %} {% from "components/banner.html" import banner %} {% from "components/cookie-banner.html" import cookie_banner %} @@ -47,94 +47,6 @@ {% 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/main_template.html b/app/templates/main_template.html new file mode 100644 index 000000000..ca8ac9a8c --- /dev/null +++ b/app/templates/main_template.html @@ -0,0 +1,278 @@ +{% from "./components/skip-link/macro.njk" import govukSkipLink -%} +{# specify absolute url for the static assets folder e.g. http://wwww.domain.com/assets #} +{%- set assetUrl = assetUrl | default(assetPath) -%} + + +
+ +