mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-09 10:54:11 -04:00
Replaces the following blocks/variables with the `header` block filled by the `header` component: - header_class - proposition_header - global_header_text - homepage_url Also rewrites code that selects header nav items The original code inserts a class name to mark the nav item as selected. The GOVUK Frontend header just needs a boolean to be passed to indicate an item is selected. This uses the `header_navigation.is_selected` method, as before, but changes its return value to a boolean.
197 lines
7.0 KiB
HTML
197 lines
7.0 KiB
HTML
{% extends "template.njk" %}
|
||
{% from "components/banner.html" import banner %}
|
||
|
||
{% block headIcons %}
|
||
<link rel="shortcut icon" sizes="16x16 32x32 48x48" href="{{ asset_url('images/favicon.ico') }}" type="image/x-icon" />
|
||
<link rel="mask-icon" href="{{ asset_url('images/govuk-mask-icon.svg') }}" color="{{ themeColor | default('#0b0c0c') }}"> {# Hardcoded value of $govuk-black #}
|
||
<link rel="apple-touch-icon" sizes="180x180" href="{{ asset_url('images/govuk-apple-touch-icon-180x180.png') }}">
|
||
<link rel="apple-touch-icon" sizes="167x167" href="{{ asset_url('images/govuk-apple-touch-icon-167x167.png') }}">
|
||
<link rel="apple-touch-icon" sizes="152x152" href="{{ asset_url('images/govuk-apple-touch-icon-152x152.png') }}">
|
||
<link rel="apple-touch-icon" href="{{ asset_url('images/govuk-apple-touch-icon.png') }}">
|
||
{% endblock %}
|
||
|
||
{% block head %}
|
||
<link rel="stylesheet" media="screen" href="{{ asset_url('stylesheets/main.css') }}" />
|
||
<style>
|
||
#global-header-bar { background-color: {{header_colour}} }
|
||
</style>
|
||
<meta name="google-site-verification" content="niWnSqImOWz6mVQTYqNb5tFK8HaKSB4b3ED4Z9gtUQ0" />
|
||
{% block meta %}
|
||
{% endblock %}
|
||
{% endblock %}
|
||
|
||
{% block pageTitle %}
|
||
{% block per_page_title %}{% endblock %} – GOV.UK Notify
|
||
{% endblock %}
|
||
|
||
{% block cookie_message %}
|
||
<p>
|
||
GOV.UK Notify uses cookies to make the site simpler.
|
||
<a href="{{ url_for("main.cookies") }}">Find out more about cookies</a>
|
||
</p>
|
||
{% 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'),
|
||
"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
|
||
}) }}
|
||
{% endblock %}
|
||
|
||
{% block content %}
|
||
{% block fullwidth_content %}{% endblock %}
|
||
{% endblock %}
|
||
|
||
{% block footer_top %}
|
||
<div class="footer-categories">
|
||
<div class="footer-categories-wrapper">
|
||
<div class="grid-row">
|
||
<div class="column-one-quarter">
|
||
<ul>
|
||
<li><a href="{{ url_for('main.support') }}">Support</a></li>
|
||
<li><a href="https://status.notifications.service.gov.uk">System status</a></li>
|
||
<li><a href="https://www.gov.uk/performance/govuk-notify">Performance</a></li>
|
||
<li><a href="https://ukgovernmentdigital.slack.com/messages/C0E1ADVPC">Slack channel</a></li>
|
||
<li><a href="https://gds.blog.gov.uk/category/notify/">Blog</a></li>
|
||
</ul>
|
||
</div>
|
||
<div class="column-one-quarter">
|
||
<ul>
|
||
<li><a href="{{ url_for("main.features") }}">Features</a></li>
|
||
<li><a href="{{ url_for("main.roadmap") }}">Roadmap</a></li>
|
||
<li><a href="{{ url_for("main.trial_mode_new") }}">Trial mode</a></li>
|
||
<li><a href="{{ url_for("main.message_status") }}">Message status</a></li>
|
||
<li><a href="{{ url_for("main.security") }}">Security</a></li>
|
||
<li><a href="{{ url_for("main.terms") }}">Terms of use</a></li>
|
||
</ul>
|
||
</div>
|
||
<div class="column-one-quarter">
|
||
<ul>
|
||
<li><a href="{{ url_for("main.pricing") }}">Pricing</a></li>
|
||
<li><a href="{{ url_for("main.how_to_pay") }}">How to pay</a></li>
|
||
</ul>
|
||
</div>
|
||
<div class="column-one-quarter">
|
||
<ul>
|
||
<li><a href="{{ url_for("main.documentation") }}">Documentation</a></li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
{% endblock %}
|
||
|
||
{% block footer_support_links %}
|
||
<nav class="footer-nav">
|
||
Built by the <a href="https://www.gov.uk/government/organisations/government-digital-service">Government Digital Service</a>
|
||
<a href="{{ url_for("main.privacy") }}">Privacy</a>
|
||
<a href="{{ url_for("main.cookies") }}">Cookies</a>
|
||
{% if current_service and current_service.research_mode %}
|
||
<span id="research-mode" class="research-mode">research mode</span>
|
||
{% endif %}
|
||
</nav>
|
||
{% endblock %}
|
||
|
||
{% block bodyEnd %}
|
||
<!--[if gt IE 8]><!-->
|
||
<script type="text/javascript" src="{{ asset_url('javascripts/all.js') }}"></script>
|
||
<!--<![endif]-->
|
||
<script>
|
||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||
ga('create', 'UA-75215134-1', 'auto');
|
||
ga('set', 'anonymizeIp', true);
|
||
ga('set', 'displayFeaturesTask', null);
|
||
ga('set', 'transport', 'beacon');
|
||
// strip UUIDs
|
||
page = (window.location.pathname + window.location.search).replace(
|
||
/[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}/g, '…'
|
||
)
|
||
ga('send', 'pageview', page);
|
||
</script>
|
||
{% endblock %}
|