mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 16:24:08 -04:00
Update all links to use GOVUK Frontend style
Includes: - turning off :visited styles to match existing design - swapping heading classes used to make links bold for the GOVUK Frontend bold override class - adding visually hidden text to some links to make them work when isolated from their context We may need to revisit whether some links, such as those for documentation and features, may benefit from having some indication that their target has been visited.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{% macro big_number(number, label, link=None, currency='', smaller=False, smallest=False) %}
|
||||
{% if link %}
|
||||
<a class="big-number-link" href="{{ link }}">
|
||||
<a class="govuk-link govuk-link--no-visited-state big-number-link" href="{{ link }}">
|
||||
{% endif %}
|
||||
<div class="big-number{% if smaller %}-smaller{% endif %}{% if smallest %}-smallest{% endif %}">
|
||||
<div class="big-number-number">
|
||||
@@ -42,7 +42,7 @@
|
||||
<div class="big-number-status{% if danger_zone %}-failing{% endif %}">
|
||||
{% if failures %}
|
||||
{% if failure_link %}
|
||||
<a href="{{ failure_link }}">
|
||||
<a class="govuk-link govuk-link--no-visited-state" href="{{ failure_link }}">
|
||||
{{ "{:,}".format(failures) }}
|
||||
failed – {{ failure_percentage }}%
|
||||
</a>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
{% for item in items %}
|
||||
{% if item.title and item.link %}
|
||||
<li class="browse-list-item">
|
||||
<a href="{{ item.link }}" class="browse-list-link{% if item.destructive %}-destructive{% endif %}">{{ item.title }}</a>
|
||||
<a href="{{ item.link }}" class="govuk-link govuk-link--no-visited-state browse-list-link{% if item.destructive %}-destructive{% endif %}">{{ item.title }}</a>
|
||||
{% if item.hint %}
|
||||
<div class="browse-list-hint">
|
||||
{{ item.hint }}
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</label>
|
||||
{% if alternate_link and alternate_link_text %}
|
||||
<span class="file-upload-alternate-link">
|
||||
or <a href="{{ alternate_link }}">{{ alternate_link_text }}</a>
|
||||
or <a class="govuk-link govuk-link--no-visited-state" href="{{ alternate_link }}">{{ alternate_link_text }}</a>
|
||||
</span>
|
||||
{% endif %}
|
||||
<label class="file-upload-filename" for="{{ field.name }}"></label>
|
||||
|
||||
@@ -17,12 +17,12 @@
|
||||
{% else %}
|
||||
{% if folder.id %}
|
||||
{% if current_user.has_template_folder_permission(folder) %}
|
||||
<a href="{{ url_for('.choose_template', service_id=service_id, template_type=template_type, template_folder_id=folder.id) }}" class="folder-heading-folder {% if loop.index < (loop.length - 1) %}folder-heading-folder-truncated{% endif %}" title="{{ folder.name }}">{{ folder.name }}</a>
|
||||
<a href="{{ url_for('.choose_template', service_id=service_id, template_type=template_type, template_folder_id=folder.id) }}" class="govuk-link govuk-link--no-visited-state folder-heading-folder {% if loop.index < (loop.length - 1) %}folder-heading-folder-truncated{% endif %}" title="{{ folder.name }}">{{ folder.name }}</a>
|
||||
{% else %}
|
||||
<span class="folder-heading-folder">{{ folder.name }}</span>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<a href="{{ url_for('.choose_template', service_id=service_id, template_type=template_type) }}" title="Templates" class="{% if loop.length > 2 %}folder-heading-folder-root-truncated{% endif %}">Templates</a>
|
||||
<a href="{{ url_for('.choose_template', service_id=service_id, template_type=template_type) }}" title="Templates" class="govuk-link govuk-link--no-visited-state {% if loop.length > 2 %}folder-heading-folder-root-truncated{% endif %}">Templates</a>
|
||||
{% endif %}
|
||||
{% if not loop.last %}{{ folder_path_separator() }}{% endif %}
|
||||
{% endif %}
|
||||
@@ -40,7 +40,7 @@
|
||||
{% if folder_path %}
|
||||
<h2 class="heading-medium folder-heading">
|
||||
{% if folder_path|length == 1 %}
|
||||
<a href="{{ url_for('.choose_template_to_copy', service_id=current_service_id) }}">Services</a>
|
||||
<a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.choose_template_to_copy', service_id=current_service_id) }}">Services</a>
|
||||
{{ folder_path_separator() }}
|
||||
{% endif %}
|
||||
{% for folder in folder_path %}
|
||||
@@ -51,15 +51,15 @@
|
||||
{% else %}
|
||||
{% if folder.id %}
|
||||
{% if current_user.has_template_folder_permission(folder) %}
|
||||
<a href="{{ url_for('.choose_template_to_copy', service_id=current_service_id, from_service=from_service.id, from_folder=folder.id) }}" class="folder-heading-folder">{{ folder.name }}</a>
|
||||
<a href="{{ url_for('.choose_template_to_copy', service_id=current_service_id, from_service=from_service.id, from_folder=folder.id) }}" class="govuk-link govuk-link--no-visited-state folder-heading-folder">{{ folder.name }}</a>
|
||||
{% else %}
|
||||
<span class="folder-heading-folder">{{ folder.name }}</span>
|
||||
{% endif %}
|
||||
{% if not loop.last %}{{ folder_path_separator() }}{% endif %}
|
||||
{% elif folder.parent_id == None %}
|
||||
<a href="{{ url_for('.choose_template_to_copy', service_id=current_service_id, from_service=from_service.id, from_folder=folder.id) }}" class="folder-heading-folder">{{ from_service.name }}</a> {% if not loop.last %}{{ folder_path_separator() }}{% endif %}
|
||||
<a href="{{ url_for('.choose_template_to_copy', service_id=current_service_id, from_service=from_service.id, from_folder=folder.id) }}" class="govuk-link govuk-link--no-visited-state folder-heading-folder">{{ from_service.name }}</a> {% if not loop.last %}{{ folder_path_separator() }}{% endif %}
|
||||
{% else %}
|
||||
<a href="{{ url_for('.choose_template_to_copy', service_id=current_service_id, from_service=from_service.id) }}">{{ from_service.name }}</a> {% if not loop.last %}{{ folder_path_separator() }}{% endif %}
|
||||
<a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.choose_template_to_copy', service_id=current_service_id, from_service=from_service.id) }}">{{ from_service.name }}</a> {% if not loop.last %}{{ folder_path_separator() }}{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
@@ -26,11 +26,11 @@
|
||||
{% endif %}
|
||||
{% if delete_link %}
|
||||
<span class="page-footer-delete-link {% if not button_text %}page-footer-delete-link-without-button{% endif %}">
|
||||
<a href="{{ delete_link }}">{{ delete_link_text }}</a>
|
||||
<a class="govuk-link govuk-link--no-visited-state" href="{{ delete_link }}">{{ delete_link_text }}</a>
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if secondary_link and secondary_link_text %}
|
||||
<a class="page-footer-secondary-link" href="{{ secondary_link }}">{{ secondary_link_text }}</a>
|
||||
<a class="govuk-link govuk-link--no-visited-state page-footer-secondary-link" href="{{ secondary_link }}">{{ secondary_link_text }}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<div class='pill-selected-item{% if not show_count %} pill-centered-item{% endif %}' tabindex='0'>
|
||||
{% else %}
|
||||
<li aria-selected='false' role='tab'>
|
||||
<a href="{{ link }}">
|
||||
<a class="govuk-link govuk-link--no-visited-state" href="{{ link }}">
|
||||
{% endif %}
|
||||
{% if show_count %}
|
||||
{{ big_number(count, **big_number_args) }}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<ul class="group">
|
||||
{% if previous_page %}
|
||||
<li class="previous-page">
|
||||
<a href="{{previous_page['url']}}" rel="previous" >
|
||||
<a class="govuk-link govuk-link--no-visited-state" href="{{previous_page['url']}}" rel="previous" >
|
||||
<span class="pagination-part-title">
|
||||
<svg class="pagination-icon" xmlns="http://www.w3.org/2000/svg" height="13" width="17" viewBox="0 0 17 13">
|
||||
<path fill="currentColor" d="m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z"/>
|
||||
@@ -17,7 +17,7 @@
|
||||
{% endif %}
|
||||
{% if next_page %}
|
||||
<li class="next-page">
|
||||
<a href="{{next_page['url']}}" rel="next">
|
||||
<a class="govuk-link govuk-link--no-visited-state" href="{{next_page['url']}}" rel="next">
|
||||
<span class="pagination-part-title">
|
||||
{{next_page['title']}}
|
||||
<svg class="pagination-icon" xmlns="http://www.w3.org/2000/svg" height="13" width="17" viewBox="0 0 17 13">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% macro show_more(url, label, with_border=True) %}
|
||||
<a
|
||||
href="{{ url }}"
|
||||
class="show-more{% if not with_border %}-no-border{% endif %}"
|
||||
class="govuk-link govuk-link--no-visited-state show-more{% if not with_border %}-no-border{% endif %}"
|
||||
><span>{{ label }}</span></a>
|
||||
{% endmacro %}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="big-number-with-status">
|
||||
<div class="big-number-status{% if failing %}-failing{% endif %}">
|
||||
{% if url %}
|
||||
<a href="{{ url }}">{{ number }} {{ label }}</a>
|
||||
<a class="govuk-link govuk-link--no-visited-state" href="{{ url }}">{{ number }} {{ label }}</a>
|
||||
{% else %}
|
||||
{{ number }} {{ label }}
|
||||
{% endif %}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
itemscope
|
||||
itemtype="http://schema.org/ListItem"
|
||||
>
|
||||
<a href="{{ url_for(item['link']) }}" itemprop="item">
|
||||
<a class="govuk-link govuk-link--no-visited-state" href="{{ url_for(item['link']) }}" itemprop="item">
|
||||
<span itemprop="name">{{item['name']}}</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -117,14 +117,14 @@
|
||||
|
||||
{% macro link_field(text, link) -%}
|
||||
{% call field() %}
|
||||
<a href="{{ link }}">{{ text }}</a>
|
||||
<a class="govuk-link govuk-link--no-visited-state" href="{{ link }}">{{ text }}</a>
|
||||
{% endcall %}
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro edit_field(text, link, permissions=[]) -%}
|
||||
{% call field(align='right') %}
|
||||
{% if not permissions or current_user.has_permissions(*permissions) %}
|
||||
<a href="{{ link }}">{{ text }}</a>
|
||||
<a class="govuk-link govuk-link--no-visited-state" href="{{ link }}">{{ text }}</a>
|
||||
{% endif %}
|
||||
{% endcall %}
|
||||
{%- endmacro %}
|
||||
@@ -155,7 +155,7 @@
|
||||
) %}
|
||||
{% if displayed_on_single_line %}<span class="align-with-message-body">{% endif %}
|
||||
{% if notification.status|format_notification_status_as_url(notification.notification_type) %}
|
||||
<a href="{{ notification.status|format_notification_status_as_url(notification.notification_type) }}">
|
||||
<a class="govuk-link govuk-link--no-visited-state" href="{{ notification.status|format_notification_status_as_url(notification.notification_type) }}">
|
||||
{% endif %}
|
||||
{{ notification.status|format_notification_status(notification.template.template_type) }}
|
||||
{% if notification.status|format_notification_status_as_url(notification.notification_type) %}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% macro task_list_item(completed, label, link) %}
|
||||
<li class="task-list-item">
|
||||
<span aria-describedby="{{ label|id_safe }}"><a href="{{ link }}">{{ label }}</a></span>
|
||||
<span aria-describedby="{{ label|id_safe }}"><a class="govuk-link govuk-link--no-visited-state" href="{{ link }}">{{ label }}</a></span>
|
||||
{% if completed %}
|
||||
<strong class="task-list-indicator-completed" id="{{ label|id_safe }}">Completed</strong>
|
||||
{% else %}
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
{% endif %}
|
||||
{% if help_link and help_link_text %}
|
||||
<p class="textbox-help-link">
|
||||
<a href='{{ help_link }}'>{{ help_link_text }}</a>
|
||||
<a class="govuk-link govuk-link--no-visited-state" href='{{ help_link }}'>{{ help_link_text }}</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user