From 5ce63851e635de7fc99ecb7fbb3487f9f8438ba1 Mon Sep 17 00:00:00 2001 From: Tom Byers Date: Wed, 9 Oct 2019 17:49:29 +0100 Subject: [PATCH] Add GOVUK Frontend footer component Replaces the following blocks/variables with the `footer` block filled by the `notify_footer` macro: - footer_top - footer_support_links Our current footer has a few differences with the GOVUK Frontend one: 1. the columns of links and the meta links have no headings, visible or structural 2. the line of text saying GDS built this prefixes the meta links whereas theirs sits on a new link, after them --- app/templates/admin_template.html | 134 +++++++++++++------- app/templates/components/notify-footer.html | 90 +++++++++++++ 2 files changed, 177 insertions(+), 47 deletions(-) create mode 100644 app/templates/components/notify-footer.html diff --git a/app/templates/admin_template.html b/app/templates/admin_template.html index 24e99e2eb..33d9392ea 100644 --- a/app/templates/admin_template.html +++ b/app/templates/admin_template.html @@ -1,5 +1,6 @@ {% extends "template.njk" %} {% from "components/banner.html" import banner %} +{% from "components/notify-footer.html" import notify_footer %} {% block headIcons %} @@ -124,54 +125,93 @@ {% block fullwidth_content %}{% endblock %} {% endblock %} -{% block footer_top %} - -{% endblock %} +{% block footer %} + {% set meta_items = [ + { + "href": url_for("main.privacy"), + "text": "Privacy" + }, + { + "href": url_for("main.cookies"), + "text": "Cookies" + } + ] %} -{% block footer_support_links %} - + {% if current_service and current_service.research_mode %} + {% set meta_suffix = 'Built by the Government Digital Serviceresearch mode' %} + {% else %} + {% set meta_suffix = 'Built by the Government Digital Service' %} + {% endif %} + + {{ notify_footer({ + "navigation": [ + { + "columns": 4, + "items": [ + { + "href": url_for('main.support'), + "text": "Support" + }, + { + "href": "https://status.notifications.service.gov.uk", + "text": "System status" + }, + { + "href": "https://www.gov.uk/performance/govuk-notify", + "text": "Performance" + }, + { + "href": "https://ukgovernmentdigital.slack.com/messages/C0E1ADVPC", + "text": "Slack channel" + }, + { + "href": "https://gds.blog.gov.uk/category/notify/", + "text": "Blog" + }, + { + "href": url_for("main.features"), + "text": "Features" + }, + { + "href": url_for("main.roadmap"), + "text": "Roadmap" + }, + { + "href": url_for("main.trial_mode_new"), + "text": "Trial mode" + }, + { + "href": url_for("main.message_status"), + "text": "Message status" + }, + { + "href": url_for("main.security"), + "text": "Security" + }, + { + "href": url_for("main.terms"), + "text": "Terms of use" + }, + { + "href": url_for("main.pricing"), + "text": "Pricing" + }, + { + "href": url_for("main.how_to_pay"), + "text": "How to pay" + }, + { + "href": url_for("main.documentation"), + "text": "Documentation" + } + ] + } + ], + "meta": { + "items": meta_items, + "html": meta_suffix + } + }) }} {% endblock %} {% block bodyEnd %} diff --git a/app/templates/components/notify-footer.html b/app/templates/components/notify-footer.html new file mode 100644 index 000000000..ccb8f2301 --- /dev/null +++ b/app/templates/components/notify-footer.html @@ -0,0 +1,90 @@ +{% macro notify_footer(params) %} + + + +{% endmacro %}