Revert "Replace govuk template with govuk frontend components - rewrite"

This commit is contained in:
Tom Byers
2019-11-26 12:14:09 +00:00
committed by GitHub
parent 653ab5e512
commit e09d510ab8
56 changed files with 358 additions and 1220 deletions

1
app/.gitignore vendored
View File

@@ -1,2 +1,3 @@
/version.py
/templates/govuk_template.html
/static

View File

@@ -720,7 +720,7 @@ def init_jinja(application):
repo_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
template_folders = [
os.path.join(repo_root, 'app/templates'),
os.path.join(repo_root, 'app/templates/vendor/govuk-frontend'),
os.path.join(repo_root, 'node_modules/govuk-frontend'),
]
jinja_loader = jinja2.FileSystemLoader(template_folders)
application.jinja_loader = jinja_loader

View File

@@ -53,7 +53,7 @@
}
Footer.prototype.buttonContent = {
change: (fieldLabel) => `Choose ${fieldLabel}s`,
done: (fieldLabel) => `Done<span class="govuk-visually-hidden"> choosing ${fieldLabel}s</span>`
done: (fieldLabel) => `Done<span class="visuallyhidden"> choosing ${fieldLabel}s</span>`
};
Footer.prototype.getEl = function (expanded) {
const buttonState = expanded ? 'done' : 'change';
@@ -118,7 +118,7 @@
this.$heading = $(`<h${headingLevel} class="heading-small">${this.legendText}</h${headingLevel}>`);
this.$fieldset.before(this.$heading);
this.$fieldset.find('legend').addClass('govuk-visually-hidden');
this.$fieldset.find('legend').addClass('visuallyhidden');
};
CollapsibleCheckboxes.prototype.expand = function(e) {
if (e !== undefined) { e.preventDefault(); }

View File

@@ -1,16 +0,0 @@
(function () {
"use strict";
var root = this;
if(typeof root.GOVUK === 'undefined') { root.GOVUK = {}; }
GOVUK.addCookieMessage = function () {
var message = document.getElementById('global-cookie-message'),
hasCookieMessage = (message && GOVUK.cookie('seen_cookie_message') === null);
if (hasCookieMessage) {
message.style.display = 'block';
GOVUK.cookie('seen_cookie_message', 'yes', { days: 28 });
}
};
}).call(this);

View File

@@ -1,62 +0,0 @@
(function () {
"use strict";
var root = this;
if(typeof root.GOVUK === 'undefined') { root.GOVUK = {}; }
/*
Cookie methods
==============
Usage:
Setting a cookie:
GOVUK.cookie('hobnob', 'tasty', { days: 30 });
Reading a cookie:
GOVUK.cookie('hobnob');
Deleting a cookie:
GOVUK.cookie('hobnob', null);
*/
GOVUK.cookie = function (name, value, options) {
if(typeof value !== 'undefined'){
if(value === false || value === null) {
return GOVUK.setCookie(name, '', { days: -1 });
} else {
return GOVUK.setCookie(name, value, options);
}
} else {
return GOVUK.getCookie(name);
}
};
GOVUK.setCookie = function (name, value, options) {
if(typeof options === 'undefined') {
options = {};
}
var cookieString = name + "=" + value + "; path=/";
if (options.days) {
var date = new Date();
date.setTime(date.getTime() + (options.days * 24 * 60 * 60 * 1000));
cookieString = cookieString + "; expires=" + date.toGMTString();
}
if (document.location.protocol == 'https:'){
cookieString = cookieString + "; Secure";
}
document.cookie = cookieString;
};
GOVUK.getCookie = function (name) {
var nameEQ = name + "=";
var cookies = document.cookie.split(';');
for(var i = 0, len = cookies.length; i < len; i++) {
var cookie = cookies[i];
while (cookie.charAt(0) == ' ') {
cookie = cookie.substring(1, cookie.length);
}
if (cookie.indexOf(nameEQ) === 0) {
return decodeURIComponent(cookie.substring(nameEQ.length));
}
}
return null;
};
}).call(this);

View File

@@ -28,7 +28,7 @@
ListEntry.prototype.entryTemplate = Hogan.compile(
'<div class="list-entry">' +
'<label for="{{{id}}}" class="text-box-number-label">' +
'<span class="govuk-visually-hidden">{{listItemName}} number </span>{{number}}.' +
'<span class="visuallyhidden">{{listItemName}} number </span>{{number}}.' +
'</label>' +
'<input' +
' name="{{name}}-{{index}}"' +
@@ -38,7 +38,7 @@
'/>' +
'{{#button}}' +
'<button type="button" class="button-secondary list-entry-remove">' +
'Remove<span class="govuk-visually-hidden"> {{listItemName}} number {{number}}</span>' +
'Remove<span class="visuallyhidden"> {{listItemName}} number {{number}}</span>' +
'</button>' +
'{{/button}}' +
'</div>'

View File

@@ -1,7 +1,3 @@
window.GOVUK.Frontend.initAll();
$(() => GOVUK.addCookieMessage());
$(() => $("time.timeago").timeago());
$(() => GOVUK.stickAtTopWhenScrolling.init());

View File

@@ -1,34 +0,0 @@
// JS Module used to combine all the JS modules used in the application into a single entry point,
// a bit like `app/__init__` in the Flask app.
//
// When processed by a bundler, this is turned into a Immediately Invoked Function Expression (IIFE)
// The IIFE format allows it to run in browsers that don't support JS Modules.
//
// Exported items will be added to the window.GOVUK namespace.
// For example, `export { Frontend }` will assign `Frontend` to `window.Frontend`
import Header from 'govuk-frontend/components/header/header';
// Copy of the initAll function from https://github.com/alphagov/govuk-frontend/blob/v2.13.0/src/all.js
// except it only includes, and initialises, the components used by this application.
function initAll (options) {
// Set the options to an empty object by default if no options are passed.
options = typeof options !== 'undefined' ? options : {}
// Allow the user to initialise GOV.UK Frontend in only certain sections of the page
// Defaults to the entire document if nothing is set.
var scope = typeof options.scope !== 'undefined' ? options.scope : document
// Find first header module to enhance.
var $toggleButton = scope.querySelector('[data-module="header"]')
new Header($toggleButton).init()
}
// Create separate namespace for GOVUK Frontend.
var Frontend = {
"Header": Header,
"initAll": initAll
}
export {
Frontend
}

View File

@@ -127,7 +127,7 @@
});
if (opts.hasOwnProperty('nonvisualText')) {
$btn.append(`<span class="govuk-visually-hidden"> ${opts.nonvisualText}</span>`);
$btn.append(`<span class="visuallyhidden"> ${opts.nonvisualText}</span>`);
}
return $btn;

View File

@@ -1,4 +1,62 @@
// Extra CSS overlaying elements
#global-header-bar {
background-color: $govuk-blue;
}
#global-header,
#global-header.with-proposition {
#logo {
white-space: nowrap;
#product-name {
font-size: 24px;
font-weight: 400;
padding-left: 5px;
}
}
.header-wrapper {
.header-global {
.header-logo {
@include media(desktop) {
width: auto;
}
&:after {
display: none;
}
}
}
}
.header-proposition {
#proposition-links {
li {
padding: 0 0 0 15px;
}
}
}
}
@include media(desktop) {
#proposition-menu {
float: right;
}
}
a {
&:visited {
color: $link-colour;
}
}
.form-control-1-1 {
width: 100%;
}

View File

@@ -1,8 +0,0 @@
.notify-cookie-message {
@include govuk-font($size: 16);
padding: govuk-spacing(3) 0;
.js-enabled & {
display: none;
}
}

View File

@@ -1,77 +0,0 @@
// needed for IE10 desktop snap mode: http://menacingcloud.com/?c=cssViewportOrMetaTag
@-ms-viewport {
width: device-width;
}
b,
strong {
font-weight: 600;
}
abbr[title] {
cursor: help;
}
.js-enabled .js-hidden {
display: none;
}
// To be removed when all search inputs use the GOV.UK Frontend text input component:
// https://design-system.service.gov.uk/components/text-input/
/*
* 1. Addresses `appearance` set to `searchfield` in Safari 5 and Chrome.
* 2. Addresses `box-sizing` set to `border-box` in Safari 5 and Chrome
* (include `-moz` to future-proof).
*/
input[type="search"] {
-webkit-appearance: textfield; /* 1 */
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box; /* 2 */
box-sizing: content-box;
}
input[type="search"]::-webkit-search-cancel-button {
-webkit-appearance: searchfield-cancel-button;
margin-right: 2px;
}
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
// To be removed when all links follow the GOV.UK Frontend conventions:
// https://design-system.service.gov.uk/styles/typography/#links
a {
&:link {
color: $link-colour;
}
&:visited {
color: $link-visited-colour;
}
&:hover {
color: $link-hover-colour;
}
&:active {
color: $link-active-colour;
}
}
// Each selector, and then the whole block when only one remains, to be removed when the
// element comes from the corresponding GOV.UK Frontend component:
// - https://design-system.service.gov.uk/components/text-input/
// - https://design-system.service.gov.uk/components/textarea/
// - https://design-system.service.gov.uk/components/select/
// - https://design-system.service.gov.uk/components/button/
// Global styles for form controls
input:focus,
textarea:focus,
select:focus,
button:focus {
outline: 3px solid $focus-colour;
outline-offset: 0;
}

View File

@@ -1,27 +0,0 @@
// Version of node_modules/govuk-frontend/components/all.scss specific to Notify
// Included to allow us to only include the components we need
// All imports come from node_modules/govuk-frontend
// set asset URL root to match that of application
$govuk-assets-path: "/static/";
@import "settings/all";
@import "tools/all";
@import "helpers/all";
@import "core/all";
@import "objects/all";
// section replacing @import 'components/all', specifying which components to include
@import 'components/skip-link/_skip-link';
@import 'components/header/_header';
@import 'components/footer/_footer';
@import "utilities/all";
@import "overrides/all";
// Styles extending those from GOV.UK Frontend
@import './extensions';
// Styles for GOV.UK Frontend components specific to this application
@import './overrides';

View File

@@ -1,9 +0,0 @@
// Extends footer column styles to allow 4 columns
@include mq ($from: desktop) {
.govuk-footer__list--columns-4 {
// TODO: Move support for legacy properties to something like Post-CSS's auto-prefixer
-webkit-column-count: 4;
-moz-column-count: 4;
column-count: 4;
}
}

View File

@@ -1,58 +0,0 @@
// Overrides for certain GOV.UK Frontend styles to make its components match this application's design
// Notify's header navigation aligns to the right
.govuk-header__navigation {
text-align: right;
// reset the alignment of each item to left-to-right
.govuk-header__navigation-item {
text-align: left;
}
}
// The GOV.UK Frontend header component wraps content that is `position: relative`
// This changes its z-index position, putting it above the `<main>` section
// We need the `<main>` section to be above it, like the default order, to hide the theme colour
// bar on full-width pages
.govuk-main-wrapper {
position: relative;
}
// Additional padding-bottom override, following the GOV.UK Frontend spacing scale:
// https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale
.govuk-\!-padding-bottom-12 {
padding-bottom: 70px;
@include govuk-media-query($from: tablet) {
padding-bottom: 90px;
}
}
.govuk-footer__navigation {
-webkit-flex-wrap: wrap;
-ms-flex-wrap: wrap;
flex-wrap: wrap
}
.govuk-footer__section {
-webkit-flex-basis: 200px;
-ms-flex-preferred-size: 200px;
flex-basis: 100%;
}
@include govuk-media-query($from: tablet) {
.govuk-footer__navigation {
-webkit-flex-wrap: nowrap;
-ms-flex-wrap: nowrap;
flex-wrap: nowrap
}
.govuk-footer__section {
-webkit-flex-basis: 200px;
-ms-flex-preferred-size: 200px;
flex-basis: 200px;
}
}

View File

@@ -16,9 +16,6 @@ $path: '/static/images/';
// Dependencies from GOVU.UK Frontend Toolkit, rewritten for this application
@import 'url-helpers';
// Specific to this application, needs to go at the top of the cascade
@import 'globals';
// Dependencies from GOV.UK Elements
// https://github.com/alphagov/govuk_elements
@import 'elements/helpers';
@@ -34,12 +31,9 @@ $path: '/static/images/';
@import 'elements/panels';
@import 'elements/tables';
// Dependencies from GOV.UK Frontend, packaged to be specific to this application
@import './govuk-frontend/all';
// Specific to this application
@import 'grids';
@import 'components/cookie-message';
@import 'components/site-footer';
@import 'components/placeholder';
@import 'components/sms-message';

View File

@@ -1,85 +0,0 @@
// sass-lint:disable no-important
// set asset URL root to match that of application
$govuk-assets-path: "/static/";
@import "settings/all";
@import "tools/all";
@import "helpers/all";
@import "core/all";
@import "objects/all";
* {
background: transparent;
color: black;
text-shadow: none;
filter: none;
-ms-filter: none;
}
body {
@include govuk-font($size: 14);
margin: 0;
padding: 0;
width: 100%;
}
a,
a:visited {
word-wrap: break-word;
}
a[href^="/"]:after,
a[href^="http://"]:after,
a[href^="https://"]:after {
content: " (" attr(href) ")";
font-size: 90%;
}
a[href^="javascript:"]:after,
a[href^="#"]:after {
content: "";
}
img {
max-width: 100% !important;
}
select {
background: white;
}
.govuk-header {
.govuk-header__logo {
@include govuk-font($size: 19);
text-rendering: optimizeLegibility;
a {
&,
&:visited {
text-decoration: none;
}
&:after {
content: "";
}
}
svg {
width: 45px;
height: 40px;
position: relative;
top: -3px;
vertical-align: bottom;
}
}
}
.govuk-visually-hidden,
.govuk-visually-hidden-focusable,
.notify-cookie-message,
.govuk-skip-link,
.govuk-footer {
display: none !important;
}

View File

@@ -328,10 +328,6 @@ class HeaderNavigation(Navigation):
'whitelist',
}
# header HTML now comes from GOVUK Frontend so requires a boolean, not an attribute
def is_selected(self, navigation_item):
return request.endpoint in self.mapping[navigation_item]
class MainNavigation(Navigation):

View File

@@ -1,236 +1,114 @@
{% extends "template.njk" %}
{% extends "govuk_template.html" %}
{% from "components/banner.html" import banner %}
{% from "components/notify-footer.html" import notify_footer %}
{% 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') }}" />
<link rel="stylesheet" media="print" href="{{ asset_url('stylesheets/print.css') }}" />
<style>
.govuk-header__container { border-color: {{header_colour}} }
#global-header-bar { background-color: {{header_colour}} }
</style>
<meta name="google-site-verification" content="niWnSqImOWz6mVQTYqNb5tFK8HaKSB4b3ED4Z9gtUQ0" />
{% block meta %}
{% endblock %}
{% endblock %}
{% block pageTitle %}
{% block page_title %}
{% block per_page_title %}{% endblock %} GOV.UK Notify
{% endblock %}
{% block bodyStart %}
{% block cookie_message %}
<div class="notify-cookie-message" id="global-cookie-message">
<p class="govuk-width-container">
GOV.UK Notify uses cookies to make the site simpler.
<a href="{{ url_for("main.cookies") }}">Find out more about cookies</a>
</p>
{% 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_class %}with-proposition{% endblock %}
{% block proposition_header %}
<div class="header-proposition">
<div class="content">
<a href="#proposition-links" class="js-header-toggle menu">Menu</a>
<nav id="proposition-menu">
<ul id="proposition-links">
<li><a href="{{ url_for('main.support') }}" {{ header_navigation.is_selected('support') }}>Support</a></li>
{% if current_user.is_authenticated %}
<li><a href="{{ url_for('main.documentation') }}" {{ header_navigation.is_selected('documentation') }}>Documentation</a></li>
<li><a href="{{ url_for('main.user_profile') }}" {{ header_navigation.is_selected('user-profile') }}>{{ current_user.name }}</a></li>
{% if current_user.platform_admin %}
<li><a href="{{ url_for('main.platform_admin') }}" {{ header_navigation.is_selected('platform-admin') }}>Platform admin</a></li>
{% endif %}
<li><a href="{{ url_for('main.sign_out')}}">Sign out</a></li>
{% else %}
<li><a href="{{ url_for('main.features') }}" {{ header_navigation.is_selected('features') }}>Features</a></li>
<li><a href="{{ url_for('main.pricing' )}}" {{ header_navigation.is_selected('pricing') }}>Pricing</a></li>
<li><a href="{{ url_for('main.documentation') }}" {{ header_navigation.is_selected('documentation') }}>Documentation</a></li>
<li><a href="{{ url_for('main.sign_in' )}}" {{ header_navigation.is_selected('sign-in') }}>Sign in</a></li>
{% endif %}
</ul>
</nav>
</div>
{% endblock %}
</div>
{% 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"
}
] %}
{% set global_header_text = "GOV.UK <span id='product-name'>Notify</span>"|safe %}
{% set homepage_url = url_for('main.show_accounts_or_dashboard') %}
{% 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 %}
{% 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
}) }}
</nav>
{% endblock %}
{% block footer %}
{% set meta_items = [
{
"href": url_for("main.privacy"),
"text": "Privacy"
},
{
"href": url_for("main.cookies"),
"text": "Cookies"
}
] %}
{% if current_service and current_service.research_mode %}
{% set meta_suffix = 'Built by the <a href="https://www.gov.uk/government/organisations/government-digital-service" class="govuk-footer__link">Government Digital Service</a><span id="research-mode" class="research-mode">research mode</span>' %}
{% else %}
{% set meta_suffix = 'Built by the <a href="https://www.gov.uk/government/organisations/government-digital-service" class="govuk-footer__link">Government Digital Service</a>' %}
{% endif %}
{{ notify_footer({
"navigation": [
{
"columns": 1,
"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"
}
]
},
{
"columns": 1,
"items": [
{
"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"
}
]
},
{
"columns": 1,
"items": [
{
"href": url_for("main.pricing"),
"text": "Pricing"
},
{
"href": url_for("main.how_to_pay"),
"text": "How to pay"
}
]
},
{
"columns": 1,
"items": [
{
"href": url_for("main.documentation"),
"text": "Documentation"
}
]
}
],
"meta": {
"items": meta_items,
"html": meta_suffix
}
}) }}
{% endblock %}
{% block bodyEnd %}
{% block body_end %}
<!--[if gt IE 8]><!-->
<script type="text/javascript" src="{{ asset_url('javascripts/all.js') }}"></script>
<!--<![endif]-->

View File

@@ -10,7 +10,7 @@
) %}
<form method="post" enctype="multipart/form-data" {% if action %}action="{{ action }}"{% endif %} class="{% if field.errors and show_errors %}form-group-error{% endif %}" data-module="file-upload">
<label class="file-upload-label" for="{{ field.name }}">
<span class="govuk-visually-hidden">{{ field.label.text }}</span>
<span class="visually-hidden">{{ field.label.text }}</span>
{% if hint %}
<span class="form-hint">
{{ hint }}

View File

@@ -28,7 +28,7 @@
{% for index in range(0, field.entries|length) %}
<div class="list-entry">
<label for="input-{{ field.name }}-{{ index }}" class="text-box-number-label">
<span class="govuk-visually-hidden">{{ item_name }} number </span>{{ index + 1 }}.
<span class="visuallyhidden">{{ item_name }} number </span>{{ index + 1 }}.
</label>
<input
type="text"

View File

@@ -1,90 +0,0 @@
{% macro notify_footer(params) %}
<footer class="govuk-footer {{ params.classes if params.classes }}" role="contentinfo" {%- for attribute, value in params.attributes %} {{attribute}}="{{value}}"{% endfor %}>
<div class="govuk-width-container {{ params.containerClasses if params.containerClasses }}">
{% if params.navigation %}
<div class="govuk-footer__navigation">
{% for nav in params.navigation %}
<div class="govuk-footer__section">
{# <h2 class="govuk-footer__heading govuk-heading-m">{{ nav.title }}</h2> removed #}
{% if nav['items'] %}
{% set listClasses %}
{% if nav.columns %}
govuk-footer__list--columns-{{ nav.columns }}
{% endif %}
{% endset %}
<ul class="govuk-footer__list {{ listClasses | trim }}">
{% for item in nav['items'] %}
{% if item.href and item.text %}
<li class="govuk-footer__list-item">
<a class="govuk-footer__link" href="{{ item.href }}"{% for attribute, value in item.attributes %} {{attribute}}="{{value}}"{% endfor %}>
{{ item.text }}
</a>
</li>
{% endif %}
{% endfor %}
</ul>
{% endif %}
</div>
{% endfor %}
</div>
<hr class="govuk-footer__section-break">
{% endif %}
<div class="govuk-footer__meta">
<div class="govuk-footer__meta-item govuk-footer__meta-item--grow">
{% if params.meta %}
<h2 class="govuk-visually-hidden">{{ params.meta.visuallyHiddenTitle | default("Support links") }}</h2>
{% if params.meta['items'] %}
<ul class="govuk-footer__inline-list">
{% for item in params.meta['items'] %}
<li class="govuk-footer__inline-list-item">
<a class="govuk-footer__link" href="{{ item.href }}"{% for attribute, value in item.attributes %} {{attribute}}="{{value}}"{% endfor %}>
{{ item.text }}
</a>
</li>
{% endfor %}
</ul>
{% endif %}
{% if params.meta.text or params.meta.html %}
<div class="govuk-footer__meta-custom">
{{ params.meta.html | safe if params.meta.html else params.meta.text }}
</div>
{% 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. #}
<svg
role="presentation"
focusable="false"
class="govuk-footer__licence-logo"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 483.2 195.7"
height="17"
width="41"
>
<path
fill="currentColor"
d="M421.5 142.8V.1l-50.7 32.3v161.1h112.4v-50.7zm-122.3-9.6A47.12 47.12 0 0 1 221 97.8c0-26 21.1-47.1 47.1-47.1 16.7 0 31.4 8.7 39.7 21.8l42.7-27.2A97.63 97.63 0 0 0 268.1 0c-36.5 0-68.3 20.1-85.1 49.7A98 98 0 0 0 97.8 0C43.9 0 0 43.9 0 97.8s43.9 97.8 97.8 97.8c36.5 0 68.3-20.1 85.1-49.7a97.76 97.76 0 0 0 149.6 25.4l19.4 22.2h3v-87.8h-80l24.3 27.5zM97.8 145c-26 0-47.1-21.1-47.1-47.1s21.1-47.1 47.1-47.1 47.2 21 47.2 47S123.8 145 97.8 145"
/>
</svg>
<span class="govuk-footer__licence-description">
All content is available under the
<a
class="govuk-footer__link"
href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/"
rel="license"
>Open Government Licence v3.0</a>, except where otherwise stated
</span>
</div>
<div class="govuk-footer__meta-item">
<a
class="govuk-footer__link govuk-footer__copyright-logo"
href="https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/"
>© Crown copyright</a>
</div>
</div>
</div>
</footer>
{% endmacro %}

View File

@@ -43,7 +43,7 @@
{% endif %}
<fieldset id="{{ field.id }}" {% if inline %}class="inline"{% endif %}>
<legend class="{{ 'form-label' if not hide_legend else '' }}{% if legend_style != 'text' %} {{ legend_style }}{% endif %}">
{% if hide_legend %}<span class="govuk-visually-hidden">{% endif %}
{% if hide_legend %}<span class="visually-hidden">{% endif %}
{{ field.label.text|safe }}
{% if hide_legend %}</span>{% endif %}
{% if hint %}

View File

@@ -2,7 +2,7 @@
{% macro mapping_table(caption='', field_headings=[], field_headings_visible=True, caption_visible=True, equal_length=False) -%}
<table class="table table-font-xsmall">
<caption class="heading-medium table-heading{{ ' govuk-visually-hidden' if not caption_visible}}">
<caption class="heading-medium table-heading{{ ' visuallyhidden' if not caption_visible}}">
{{ caption }}
</caption>
<thead class="table-field-headings{% if field_headings_visible %}-visible{% endif %}">
@@ -12,7 +12,7 @@
{% if field_headings_visible %}
{{ field_heading }}
{% else %}
<span class="govuk-visually-hidden">{{ field_heading }}</span>
<span class="visuallyhidden">{{ field_heading }}</span>
{% endif %}
</th>
{% endfor %}
@@ -138,7 +138,7 @@
{%- endmacro %}
{% macro hidden_field_heading(text) %}
<span class="govuk-visually-hidden">{{ text }}</span>
<span class="visuallyhidden">{{ text }}</span>
{%- endmacro %}

View File

@@ -2,12 +2,12 @@
<li>
{% if yes %}
<span class="tick-cross-tick">
<span class="govuk-visually-hidden">{{ truthy_hint }}</span>
<span class="visually-hidden">{{ truthy_hint }}</span>
{{ label}}
</span>
{% else %}
<span class="tick-cross-cross">
<span class="govuk-visually-hidden">{{ falsey_hint }}</span>
<span class="visually-hidden">{{ falsey_hint }}</span>
{{ label}}
</span>
{% endif %}

View File

@@ -1,10 +1,7 @@
{% extends "admin_template.html" %}
{% set mainClasses = "govuk-!-padding-top-0 govuk-!-padding-bottom-0" %}
{% block main %}
{% block beforeContent %}{% endblock %}
<main class="govuk-main-wrapper {{ mainClasses }}" id="main-content" role="main">
{% block content %}{% endblock %}
{% block fullwidth_content %}
<main role="main">
{% block maincolumn_content %}{% endblock %}
</main>
{% endblock %}

View File

@@ -4,8 +4,8 @@
{% block org_page_title %}{% endblock %} {{ current_org.name }}
{% endblock %}
{% block main %}
<div class="govuk-width-container">
{% block fullwidth_content %}
<div id="content">
<div class="navigation-service">
{% if current_user.platform_admin %}
<a href="{{ url_for('.organisations') }}" class="navigation-organisation-link">All organisations</a>
@@ -15,19 +15,14 @@
</div>
<a href="{{ url_for('main.choose_account') }}" class="navigation-service-switch">Switch service</a>
</div>
<div class="grid-row govuk-!-padding-bottom-12">
<div class="grid-row">
<div class="column-one-quarter">
{% include "org_nav.html" %}
</div>
<div class="column-three-quarters">
{% block beforeContent %}{% endblock %}
<main class="govuk-main-wrapper column-main govuk-!-padding-top-0 govuk-!-padding-bottom-0" id="main-content" role="main" >
{% block content %}
{% include 'flash_messages.html' %}
{% block maincolumn_content %}{% endblock %}
{% endblock %}
</main>
</div>
<main role="main" class="column-three-quarters column-main">
{% include 'flash_messages.html' %}
{% block maincolumn_content %}{% endblock %}
</main>
</div>
</div>
{% endblock %}

View File

@@ -1,3 +0,0 @@
{% macro govukFooter(params) %}
{%- include "./template.njk" -%}
{% endmacro %}

View File

@@ -1,87 +0,0 @@
<footer class="govuk-footer {{ params.classes if params.classes }}" role="contentinfo"
{%- for attribute, value in params.attributes %} {{attribute}}="{{value}}"{% endfor %}>
<div class="govuk-width-container {{ params.containerClasses if params.containerClasses }}">
{% if params.navigation %}
<div class="govuk-footer__navigation">
{% for nav in params.navigation %}
<div class="govuk-footer__section">
<h2 class="govuk-footer__heading govuk-heading-m">{{ nav.title }}</h2>
{% if nav.items %}
{% set listClasses %}
{% if nav.columns %}
govuk-footer__list--columns-{{ nav.columns }}
{% endif %}
{% endset %}
<ul class="govuk-footer__list {{ listClasses | trim }}">
{% for item in nav.items %}
{% if item.href and item.text %}
<li class="govuk-footer__list-item">
<a class="govuk-footer__link" href="{{ item.href }}"{% for attribute, value in item.attributes %} {{attribute}}="{{value}}"{% endfor %}>
{{ item.text }}
</a>
</li>
{% endif %}
{% endfor %}
</ul>
{% endif %}
</div>
{% endfor %}
</div>
<hr class="govuk-footer__section-break">
{% endif %}
<div class="govuk-footer__meta">
<div class="govuk-footer__meta-item govuk-footer__meta-item--grow">
{% if params.meta %}
<h2 class="govuk-visually-hidden">{{ params.meta.visuallyHiddenTitle | default("Support links") }}</h2>
{% if params.meta.items %}
<ul class="govuk-footer__inline-list">
{% for item in params.meta.items %}
<li class="govuk-footer__inline-list-item">
<a class="govuk-footer__link" href="{{ item.href }}"{% for attribute, value in item.attributes %} {{attribute}}="{{value}}"{% endfor %}>
{{ item.text }}
</a>
</li>
{% endfor %}
</ul>
{% endif %}
{% if params.meta.text or params.meta.html %}
<div class="govuk-footer__meta-custom">
{{ params.meta.html | safe if params.meta.html else params.meta.text }}
</div>
{% 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. #}
<svg
role="presentation"
focusable="false"
class="govuk-footer__licence-logo"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 483.2 195.7"
height="17"
width="41"
>
<path
fill="currentColor"
d="M421.5 142.8V.1l-50.7 32.3v161.1h112.4v-50.7zm-122.3-9.6A47.12 47.12 0 0 1 221 97.8c0-26 21.1-47.1 47.1-47.1 16.7 0 31.4 8.7 39.7 21.8l42.7-27.2A97.63 97.63 0 0 0 268.1 0c-36.5 0-68.3 20.1-85.1 49.7A98 98 0 0 0 97.8 0C43.9 0 0 43.9 0 97.8s43.9 97.8 97.8 97.8c36.5 0 68.3-20.1 85.1-49.7a97.76 97.76 0 0 0 149.6 25.4l19.4 22.2h3v-87.8h-80l24.3 27.5zM97.8 145c-26 0-47.1-21.1-47.1-47.1s21.1-47.1 47.1-47.1 47.2 21 47.2 47S123.8 145 97.8 145"
/>
</svg>
<span class="govuk-footer__licence-description">
All content is available under the
<a
class="govuk-footer__link"
href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/"
rel="license"
>Open Government Licence v3.0</a>, except where otherwise stated
</span>
</div>
<div class="govuk-footer__meta-item">
<a
class="govuk-footer__link govuk-footer__copyright-logo"
href="https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/"
>© Crown copyright</a>
</div>
</div>
</div>
</footer>

View File

@@ -1,3 +0,0 @@
{% macro govukHeader(params) %}
{%- include "./template.njk" -%}
{% endmacro %}

View File

@@ -1,84 +0,0 @@
<header class="govuk-header {{ params.classes if params.classes }}" role="banner" data-module="header"
{%- for attribute, value in params.attributes %} {{attribute}}="{{value}}"{% endfor %}>
<div class="govuk-header__container {{ params.containerClasses | default('govuk-width-container') }}">
<div class="govuk-header__logo">
<a href="{{ params.homepageUrl | default('/') }}" class="govuk-header__link govuk-header__link--homepage">
<span class="govuk-header__logotype">
{# We use an inline SVG for the crown so that we can cascade the
currentColor into the crown whilst continuing to support older browsers
which do not support external SVGs without a Javascript polyfill. This
adds approximately 1kb to every page load.
We use currentColour so that we can easily invert it when printing and
when the focus state is applied. This also benefits users who override
colours in their browser as they will still see the crown.
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. #}
<svg
role="presentation"
focusable="false"
class="govuk-header__logotype-crown"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 132 97"
height="32"
width="36"
>
<path
fill="currentColor" fill-rule="evenodd"
d="M25 30.2c3.5 1.5 7.7-.2 9.1-3.7 1.5-3.6-.2-7.8-3.9-9.2-3.6-1.4-7.6.3-9.1 3.9-1.4 3.5.3 7.5 3.9 9zM9 39.5c3.6 1.5 7.8-.2 9.2-3.7 1.5-3.6-.2-7.8-3.9-9.1-3.6-1.5-7.6.2-9.1 3.8-1.4 3.5.3 7.5 3.8 9zM4.4 57.2c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.5-1.5-7.6.3-9.1 3.8-1.4 3.5.3 7.6 3.9 9.1zm38.3-21.4c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.6-1.5-7.6.3-9.1 3.8-1.3 3.6.4 7.7 3.9 9.1zm64.4-5.6c-3.6 1.5-7.8-.2-9.1-3.7-1.5-3.6.2-7.8 3.8-9.2 3.6-1.4 7.7.3 9.2 3.9 1.3 3.5-.4 7.5-3.9 9zm15.9 9.3c-3.6 1.5-7.7-.2-9.1-3.7-1.5-3.6.2-7.8 3.7-9.1 3.6-1.5 7.7.2 9.2 3.8 1.5 3.5-.3 7.5-3.8 9zm4.7 17.7c-3.6 1.5-7.8-.2-9.2-3.8-1.5-3.6.2-7.7 3.9-9.1 3.6-1.5 7.7.3 9.2 3.8 1.3 3.5-.4 7.6-3.9 9.1zM89.3 35.8c-3.6 1.5-7.8-.2-9.2-3.8-1.4-3.6.2-7.7 3.9-9.1 3.6-1.5 7.7.3 9.2 3.8 1.4 3.6-.3 7.7-3.9 9.1zM69.7 17.7l8.9 4.7V9.3l-8.9 2.8c-.2-.3-.5-.6-.9-.9L72.4 0H59.6l3.5 11.2c-.3.3-.6.5-.9.9l-8.8-2.8v13.1l8.8-4.7c.3.3.6.7.9.9l-5 15.4v.1c-.2.8-.4 1.6-.4 2.4 0 4.1 3.1 7.5 7 8.1h.2c.3 0 .7.1 1 .1.4 0 .7 0 1-.1h.2c4-.6 7.1-4.1 7.1-8.1 0-.8-.1-1.7-.4-2.4V34l-5.1-15.4c.4-.2.7-.6 1-.9zM66 92.8c16.9 0 32.8 1.1 47.1 3.2 4-16.9 8.9-26.7 14-33.5l-9.6-3.4c1 4.9 1.1 7.2 0 10.2-1.5-1.4-3-4.3-4.2-8.7L108.6 76c2.8-2 5-3.2 7.5-3.3-4.4 9.4-10 11.9-13.6 11.2-4.3-.8-6.3-4.6-5.6-7.9 1-4.7 5.7-5.9 8-.5 4.3-8.7-3-11.4-7.6-8.8 7.1-7.2 7.9-13.5 2.1-21.1-8 6.1-8.1 12.3-4.5 20.8-4.7-5.4-12.1-2.5-9.5 6.2 3.4-5.2 7.9-2 7.2 3.1-.6 4.3-6.4 7.8-13.5 7.2-10.3-.9-10.9-8-11.2-13.8 2.5-.5 7.1 1.8 11 7.3L80.2 60c-4.1 4.4-8 5.3-12.3 5.4 1.4-4.4 8-11.6 8-11.6H55.5s6.4 7.2 7.9 11.6c-4.2-.1-8-1-12.3-5.4l1.4 16.4c3.9-5.5 8.5-7.7 10.9-7.3-.3 5.8-.9 12.8-11.1 13.8-7.2.6-12.9-2.9-13.5-7.2-.7-5 3.8-8.3 7.1-3.1 2.7-8.7-4.6-11.6-9.4-6.2 3.7-8.5 3.6-14.7-4.6-20.8-5.8 7.6-5 13.9 2.2 21.1-4.7-2.6-11.9.1-7.7 8.8 2.3-5.5 7.1-4.2 8.1.5.7 3.3-1.3 7.1-5.7 7.9-3.5.7-9-1.8-13.5-11.2 2.5.1 4.7 1.3 7.5 3.3l-4.7-15.4c-1.2 4.4-2.7 7.2-4.3 8.7-1.1-3-.9-5.3 0-10.2l-9.5 3.4c5 6.9 9.9 16.7 14 33.5 14.8-2.1 30.8-3.2 47.7-3.2z"
></path>
{# Fallback PNG image for older browsers.
The <image> element is a valid SVG element. In SVG, you would specify
the URL of the image file with the xlink:href as we don't reference an
image it has no effect. It's important to include the empty xlink:href
attribute as this prevents versions of IE which support SVG from
downloading the fallback image when they don't need to.
In other browsers <image> is synonymous for the <img> tag and will be
interpreted as such, displaying the fallback image. #}
<image src="{{ params.assetsPath | default('/assets/images') }}/govuk-logotype-crown.png" xlink:href="" class="govuk-header__logotype-crown-fallback-image" width="36" height="32"></image>
</svg>
<span class="govuk-header__logotype-text">
GOV.UK
</span>
</span>
{% if (params.productName) %}
<span class="govuk-header__product-name">
{{ params.productName }}
</span>
{% endif %}
</a>
</div>
{% if params.serviceName or params.navigation %}
<div class="govuk-header__content">
{% if params.serviceName %}
<a href="{{ params.serviceUrl }}" class="govuk-header__link govuk-header__link--service-name">
{{ params.serviceName }}
</a>
{% endif %}
{% if params.navigation %}
<button type="button" role="button" class="govuk-header__menu-button js-header-toggle" aria-controls="navigation" aria-label="Show or hide Top Level Navigation">Menu</button>
<nav>
<ul id="navigation" class="govuk-header__navigation {{ params.navigationClasses if params.navigationClasses }}" aria-label="Top Level Navigation">
{% for item in params.navigation %}
{% if item.href and item.text %}
<li class="govuk-header__navigation-item{{ ' govuk-header__navigation-item--active' if item.active }}">
<a class="govuk-header__link" href="{{ item.href }}"{% for attribute, value in item.attributes %} {{attribute}}="{{value}}"{% endfor %}>
{{ item.text }}
</a>
</li>
{% endif %}
{% endfor %}
</ul>
</nav>
{% endif %}
</div>
{% endif %}
</div>
</header>

View File

@@ -1,3 +0,0 @@
{% macro govukSkipLink(params) %}
{%- include "./template.njk" -%}
{% endmacro %}

View File

@@ -1,3 +0,0 @@
<a href="{{ params.href | default('#content') }}" class="govuk-skip-link{%- if params.classes %} {{ params.classes }}{% endif -%}"{%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
{{- params.html | safe if params.html else params.text -}}
</a>

View File

@@ -1,60 +0,0 @@
{% from "./components/skip-link/macro.njk" import govukSkipLink -%}
{% from "./components/header/macro.njk" import govukHeader -%}
{% from "./components/footer/macro.njk" import govukFooter -%}
{# specify absolute url for the static assets folder e.g. http://wwww.domain.com/assets #}
{%- set assetUrl = assetUrl | default(assetPath) -%}
<!DOCTYPE html>
<html lang="{{ htmlLang | default('en') }}" class="govuk-template {{ htmlClasses }}">
<head>
<meta charset="utf-8" />
<title>{% block pageTitle %}GOV.UK - The best place to find government services and information{% endblock %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<meta name="theme-color" content="{{ themeColor | default('#0b0c0c') }}" /> {# Hardcoded value of $govuk-black #}
{# Ensure that older IE versions always render with the correct rendering engine #}
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
{% block headIcons %}
<link rel="shortcut icon" sizes="16x16 32x32 48x48" href="{{ assetPath | default('/assets') }}/images/favicon.ico" type="image/x-icon" />
<link rel="mask-icon" href="{{ assetPath | default('/assets') }}/images/govuk-mask-icon.svg" color="{{ themeColor | default('#0b0c0c') }}"> {# Hardcoded value of $govuk-black #}
<link rel="apple-touch-icon" sizes="180x180" href="{{ assetPath | default('/assets') }}/images/govuk-apple-touch-icon-180x180.png">
<link rel="apple-touch-icon" sizes="167x167" href="{{ assetPath | default('/assets') }}/images/govuk-apple-touch-icon-167x167.png">
<link rel="apple-touch-icon" sizes="152x152" href="{{ assetPath | default('/assets') }}/images/govuk-apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" href="{{ assetPath | default('/assets') }}/images/govuk-apple-touch-icon.png">
{% endblock %}
{% block head %}{% endblock %}
{# The default og:image is added below head so that scrapers see any custom metatags first, and this is just a fallback #}
{# image url needs to be absolute e.g. http://wwww.domain.com/.../govuk-opengraph-image.png #}
<meta property="og:image" content="{{ assetUrl | default('/assets') }}/images/govuk-opengraph-image.png">
</head>
<body class="govuk-template__body {{ bodyClasses }}">
<script>document.body.className = ((document.body.className) ? document.body.className + ' js-enabled' : 'js-enabled');</script>
{% block bodyStart %}{% endblock %}
{% block skipLink %}
{{ govukSkipLink({
href: '#main-content',
text: 'Skip to main content'
}) }}
{% endblock %}
{% block header %}
{{ govukHeader({}) }}
{% endblock %}
{% block main %}
<div class="govuk-width-container">
{% block beforeContent %}{% endblock %}
<main class="govuk-main-wrapper {{ mainClasses }}" id="main-content" role="main">
{% block content %}{% endblock %}
</main>
</div>
{% endblock %}
{% block footer %}
{{ govukFooter({}) }}
{% endblock %}
{% block bodyEnd %}{% endblock %}
</body>
</html>

View File

@@ -8,7 +8,7 @@
{% set file_contents_header_id = 'file-preview' %}
{% macro skip_to_file_contents() %}
<p class="govuk-visually-hidden">
<p class="visually-hidden">
<a href="#{{ file_contents_header_id }}">Skip to file contents</a>
</p>
{% endmacro %}
@@ -165,7 +165,7 @@
caption=original_file_name,
caption_visible=False,
field_headings=[
'<span class="govuk-visually-hidden">Row in file</span><span aria-hidden="true">1</span>'|safe
'<span class="visually-hidden">Row in file</span><span aria-hidden="true">1</span>'|safe
] + column_headers
) %}
{% call index_field() %}

View File

@@ -9,7 +9,7 @@
{% set file_contents_header_id = 'file-preview' %}
{% macro skip_to_file_contents() %}
<p class="govuk-visually-hidden">
<p class="visually-hidden">
<a href="#{{ file_contents_header_id }}">Skip to file contents</a>
</p>
{% endmacro %}
@@ -62,7 +62,7 @@
caption=original_file_name,
caption_visible=False,
field_headings=[
'<span class="govuk-visually-hidden">Row in file</span><span aria-hidden="true">1</span>'|safe
'<span class="visually-hidden">Row in file</span><span aria-hidden="true">1</span>'|safe
] + recipients.column_headers
) %}
{% call index_field() %}

View File

@@ -8,7 +8,7 @@
{% set file_contents_header_id = 'file-preview' %}
{% macro skip_to_file_contents() %}
<p class="govuk-visually-hidden">
<p class="visually-hidden">
<a href="#{{ file_contents_header_id }}">Skip to file contents</a>
</p>
{% endmacro %}
@@ -64,7 +64,7 @@
caption=original_file_name,
caption_visible=False,
field_headings=[
'<span class="govuk-visually-hidden">Row in file</span><span aria-hidden="true" class="table-field-invisible-error">1</span>'|safe
'<span class="visually-hidden">Row in file</span><span aria-hidden="true" class="table-field-invisible-error">1</span>'|safe
] + recipients.column_headers
) %}
{% call index_field() %}

View File

@@ -53,7 +53,7 @@
{% block maincolumn_content %}
<h1 class="heading-large {% if current_user.has_access_to_live_and_trial_mode_services %}govuk-visually-hidden{% endif %}">
<h1 class="heading-large {% if current_user.has_access_to_live_and_trial_mode_services %}visually-hidden{% endif %}">
Choose service
</h1>

View File

@@ -14,7 +14,7 @@
<div class="dashboard">
<h1 class="govuk-visually-hidden">Dashboard</h1>
<h1 class="visuallyhidden">Dashboard</h1>
{% if current_user.has_permissions('manage_templates') and not current_service.all_templates %}
{% include 'views/dashboard/write-first-messages.html' %}
{% endif %}

View File

@@ -9,32 +9,29 @@
New organisation
{% endblock %}
{% block main %}
<div class="govuk-width-container">
{% block fullwidth_content %}
<div id="content">
<div class="navigation-service">
<a href="{{ url_for('.organisations') }}" class="navigation-service-back-to">All organisations</a>
<a href="{{ url_for('main.choose_account') }}" class="navigation-service-switch">Switch service</a>
</div>
<div class="grid-row">
<div class="column-one-quarter">
&nbsp;
<main role="main">
<div class="grid-row">
<div class="column-one-quarter">
&nbsp;
</div>
<div class="column-three-quarters">
{{ page_header('New organisation') }}
{% call form_wrapper() %}
{{textbox(form.name)}}
{{radios(form.organisation_type)}}
{{radios(form.crown_status)}}
{{ page_footer('Save') }}
{% endcall %}
</div>
</div>
<div class="column-three-quarters">
<main class="govuk-main-wrapper column-main govuk-!-padding-top-0 govuk-!-padding-bottom-0" id="main-content" role="main" >
{% block beforeContent %}{% endblock %}
{% block content %}
{{ page_header('New organisation') }}
{% call form_wrapper() %}
{{textbox(form.name)}}
{{radios(form.organisation_type)}}
{{radios(form.crown_status)}}
{{ page_footer('Save') }}
{% endcall %}
{% endblock %}
</main>
</div>
</div>
</main>
</div>
{% endblock %}

View File

@@ -7,10 +7,9 @@
All organisations
{% endblock %}
{% block beforeContent %}{% endblock %}
{% block maincolumn_content %}
{% block fullwidth_content %}
<div id="content">
<div class="navigation-service">
<div class="navigation-service-name">
&nbsp;
@@ -18,45 +17,47 @@
<a href="{{ url_for('main.choose_account') }}" class="navigation-service-switch">Switch service</a>
</div>
<div class="grid-row top-gutter-2-3">
<div class="column-one-quarter">
<h1>
All organisations
</h1>
</div>
<div class="column-three-quarters">
{{ live_search(target_selector='.browse-list-item', show=True, form=search_form, label='Search by name') }}
<nav class="browse-list">
<ul>
{% for org in organisations %}
<li class="browse-list-item">
<a href="{{ url_for('main.organisation_dashboard', org_id=org.id) }}" class="browse-list-link">{{ org.name }}</a>
<p class="browse-list-hint">
{{ org.count_of_live_services }}
live service{% if org.count_of_live_services != 1 %}s{% endif %}
</p>
{% if not org.active %}
<span class="table-field-status-default heading-medium">- archived</span>
{% endif %}
</li>
{% endfor %}
</ul>
</nav>
</div>
</div>
<div class="js-stick-at-bottom-when-scrolling">
<div class="grid-row">
<main role="main">
<div class="grid-row top-gutter-2-3">
<div class="column-one-quarter">
&nbsp;
<h1>
All organisations
</h1>
</div>
<div class="column-three-quarters">
<a href="{{ url_for('main.add_organisation') }}" class="button-secondary">New organisation</a>
{{ live_search(target_selector='.browse-list-item', show=True, form=search_form, label='Search by name') }}
<nav class="browse-list">
<ul>
{% for org in organisations %}
<li class="browse-list-item">
<a href="{{ url_for('main.organisation_dashboard', org_id=org.id) }}" class="browse-list-link">{{ org.name }}</a>
<p class="browse-list-hint">
{{ org.count_of_live_services }}
live service{% if org.count_of_live_services != 1 %}s{% endif %}
</p>
{% if not org.active %}
<span class="table-field-status-default heading-medium">- archived</span>
{% endif %}
</li>
{% endfor %}
</ul>
</nav>
</div>
</div>
</div>
<div class="js-stick-at-bottom-when-scrolling">
<div class="grid-row">
<div class="column-one-quarter">
&nbsp;
</div>
<div class="column-three-quarters">
<a href="{{ url_for('main.add_organisation') }}" class="button-secondary">New organisation</a>
</div>
</div>
</div>
</main>
</div>
{% endblock %}

View File

@@ -18,7 +18,7 @@ Create an account
<div class="extra-tracking">
{{ textbox(form.mobile_number, width='3-4', hint='Well send you a security code by text message') }}
</div>
<input class="govuk-visually-hidden" aria-hidden="true" tabindex="-1" id="defeat-chrome-autocomplete">
<input class="visually-hidden" aria-hidden="true" tabindex="-1" id="defeat-chrome-autocomplete">
{{ textbox(form.password, hint="At least 8 characters", width='3-4', autocomplete='new-password') }}
{{form.auth_type}}
{{ page_footer("Continue") }}

View File

@@ -4,11 +4,11 @@
<meta name="description" content="GOV.UK Notify lets you send emails, text messages and letters to your users. Try it now if you work in central government, a local authority, or the NHS.">
{% endblock %}
{% block pageTitle %}
{% block page_title %}
GOV.UK Notify
{% endblock %}
{% block content %}
{% block maincolumn_content %}
<div class="product-page-intro">
<div class="product-page-intro-wrapper override-elements-content" id="content">
@@ -119,12 +119,12 @@
<h2>Whos using GOV.UK Notify</h2>
<div class="grid-row bottom-gutter">
<div class="column-half">
<h3 class="govuk-visually-hidden">Services</h3>
<h3 class="visually-hidden">Services</h3>
<div class="product-page-big-number">{{ counts.services|format_thousands }}</div>
services
</div>
<div class="column-half">
<h3 class="govuk-visually-hidden">Organisations</h3>
<h3 class="visually-hidden">Organisations</h3>
<div class="product-page-big-number">{{ counts.organisations|format_thousands }}</div>
organisations
</div>
@@ -140,18 +140,18 @@
<h2>Pricing</h2>
<div class="grid-row bottom-gutter">
<div class="column-half">
<h3 class="govuk-visually-hidden">Emails</h3>
<h3 class="visually-hidden">Emails</h3>
<div class="product-page-big-number">Unlimited</div>
free emails
</div>
<div class="column-half">
<h3 class="govuk-visually-hidden">Text messages</h3>
<h3 class="visually-hidden">Text messages</h3>
<div class="product-page-big-number">Up to 250,000</div>
free text messages a year,<br>
then 1.58 pence per message
</div>
<div class="column-half">
<h3 class="govuk-visually-hidden">Letters</h3>
<h3 class="visually-hidden">Letters</h3>
<div class="product-page-big-number">35 pence</div>
to print and post a one page letter
</div>

View File

@@ -15,7 +15,7 @@
</div>
<div id="move_to_new_folder_form">
<fieldset class="js-will-stick-at-bottom-when-scrolling">
<legend class="govuk-visually-hidden">Add to new folder</legend>
<legend class="visuallyhidden">Add to new folder</legend>
{{ textbox(templates_and_folders_form.move_to_new_folder_name, width='1-1') }}
{{ page_footer('Add to new folder', button_name='operation', button_value='move-to-new-folder') }}
</fieldset>
@@ -23,7 +23,7 @@
{% endif %}
<div id="add_new_folder_form">
<fieldset class="js-will-stick-at-bottom-when-scrolling">
<legend class="govuk-visually-hidden">Add new folder</legend>
<legend class="visuallyhidden">Add new folder</legend>
{{ textbox(templates_and_folders_form.add_new_folder_name, width='1-1') }}
{{ page_footer('Add new folder', button_name='operation', button_value='add-new-folder') }}
</fieldset>
@@ -36,7 +36,7 @@
{{ page_footer('Continue', button_name='operation', button_value='add-new-template') }}
</div>
</div>
<div class="selection-counter govuk-visually-hidden" role="status" aria-live="polite">
<div class="selection-counter visuallyhidden" role="status" aria-live="polite">
Nothing selected
</div>
</div>

View File

@@ -1,13 +1,11 @@
{% extends "admin_template.html" %}
{% set mainClasses = "govuk-!-padding-top-0 govuk-!-padding-bottom-0" %}
{% block per_page_title %}
{% block service_page_title %}{% endblock %} {{ current_service.name }}
{% endblock %}
{% block main %}
<div class="govuk-width-container">
{% block fullwidth_content %}
<div id="content">
<div class="navigation-service">
{% if current_service.organisation_id %}
{% if current_user.platform_admin or
@@ -20,27 +18,22 @@
</div>
<a href="{{ url_for('main.choose_account') }}" class="navigation-service-switch">Switch service</a>
</div>
<div class="grid-row govuk-!-padding-bottom-12">
<div class="grid-row">
{% if help %}
<div class="column-one-third">
{% else %}
<div class="column-one-quarter">
{% endif %}
{% include "main_nav.html" %}
</div>
{% if help %}
<div class="column-two-thirds">
{% else %}
<div class="column-three-quarters">
{% endif %}
{% block beforeContent %}{% endblock %}
<main class="govuk-main-wrapper column-main {{ mainClasses }}" id="main-content" role="main">
{% block content %}
{% include 'flash_messages.html' %}
{% block maincolumn_content %}{% endblock %}
{% endblock %}
</main>
{% include "main_nav.html" %}
</div>
{% if help %}
<main role="main" class="column-two-thirds column-main">
{% else %}
<main role="main" class="column-three-quarters column-main">
{% endif %}
{% include 'flash_messages.html' %}
{% block maincolumn_content %}{% endblock %}
</main>
</div>
</div>
{% endblock %}

View File

@@ -1,16 +1,15 @@
{% extends "admin_template.html" %}
{% set mainClasses = "govuk-!-padding-top-0 govuk-!-padding-bottom-12" %}
{% block beforeContent %}
{% block fullwidth_content %}
<div id="content">
{% if current_service and current_service.active and current_user.is_authenticated and current_user.belongs_to_service(current_service.id) %}
<div class="navigation-service">
<a href="{{ url_for('main.show_accounts_or_dashboard') }}" class="navigation-service-back-to">Back to {{ current_service.name }}</a>
</div>
{% endif %}
{% endblock %}
{% block content %}
{% include 'flash_messages.html' %}
{% block maincolumn_content %}{% endblock %}
<main role="main">
{% include 'flash_messages.html' %}
{% block maincolumn_content %}{% endblock %}
</main>
</div>
{% endblock %}