Reworking checkboxes to adhere to USWDS styling

This commit is contained in:
Jonathan Bobel
2023-08-14 10:35:11 -04:00
parent fc9667d25b
commit 1be305d045
24 changed files with 295 additions and 87 deletions

View File

@@ -1,5 +1,5 @@
{% from "components/pill.html" import pill %}
<div class='bottom-gutter ajax-block-container'>
<div class='tabs ajax-block-container'>
{{ pill(
status_filters,
status

View File

@@ -8,7 +8,7 @@
<div class='template-statistics-table'>
{% call(item, row_number) list_table(
template_statistics,
caption="By template",
caption="Messages sent by template",
caption_visible=True,
empty_message='',
field_headings=[

View File

@@ -12,7 +12,7 @@
<h1 class="font-body-2xl margin-bottom-3">Get started</h1>
<ol class="usa-process-list">
<li class="usa-process-list__item padding-bottom-4 margin-top-3">
<li class="usa-process-list__item padding-bottom-4 margin-top-2">
<h2 class="usa-process-list__heading line-height-sans-3">Check if Notify.gov is right for you</h2>
<p>Read about our <a class="usa-link" href="{{ url_for('main.features') }}">features</a>, <a class="usa-link" href="{{ url_for('.pricing') }}">pricing</a> and <a class="usa-link" href="{{ url_for('main.roadmap') }}">roadmap</a>.</p>
</li>

View File

@@ -30,33 +30,33 @@
{% for item in template_list %}
{% set item_link_content %}
{% for ancestor in item.ancestors %}
<a href="{{ url_for('.choose_template', service_id=current_service.id, template_type=template_type, template_folder_id=ancestor.id) }}" class="usa-link template-list-folder">
{{- format_item_name(ancestor.name) -}}
</a> <span class="message-name-separator"></span>
{% endfor %}
{% if item.is_folder %}
<a href="{{ url_for('.choose_template', service_id=current_service.id, template_type=template_type, template_folder_id=item.id) }}" class="usa-link template-list-folder">
<span class="live-search-relevant">{{- format_item_name(item.name) -}}</span>
</a>
{% else %}
<a href="{{ url_for('.view_template', service_id=current_service.id, template_id=item.id) }}" class="usa-link font-body-lg usa-template-list-template">
<span class="live-search-relevant">
{%- if current_service.api_keys -%}
<span class="govuk-!-display-none">{{ item.id }} </span>
{%- endif -%}
{{- format_item_name(item.name) -}}
</span>
</a>
{% endif %}
{% endset %}
{% set label_content %}
<span class="usa-sr-only">
{%- for ancestor in item.ancestors %}{{ format_item_name(ancestor.name, separators=False) }} {% endfor -%}
{{ format_item_name(item.name, separators=False) -}}
</span>
{% for ancestor in item.ancestors %}
<a href="{{ url_for('.choose_template', service_id=current_service.id, template_type=template_type, template_folder_id=ancestor.id) }}"
class="usa-link template-list-folder">
{{- format_item_name(ancestor.name) -}}
</a> <span class="message-name-separator"></span>
{% endfor %}
{% if item.is_folder %}
<a href="{{ url_for('.choose_template', service_id=current_service.id, template_type=template_type, template_folder_id=item.id) }}"
class="usa-link template-list-folder">
<span class="live-search-relevant">{{- format_item_name(item.name) -}}</span>
</a>
{% else %}
<a href="{{ url_for('.view_template', service_id=current_service.id, template_id=item.id) }}"
class="usa-link usa-template-list-template">
<span class="live-search-relevant">
{%- if current_service.api_keys -%}
<span class="govuk-!-display-none">{{ item.id }} </span>
{%- endif -%}
{{- format_item_name(item.name) -}}
</span>
</a>
{% endif %}
{% endset %}
{% set item_meta %}
@@ -70,7 +70,7 @@
{% set checkbox_config = {
"html": label_content,
"label": {
"classes": "template-list-item-label margin-top-05",
"classes": "template-list-item-label",
},
"id": "templates-or-folder-" ~ item.id,
"classes": "template-list-item template-list-item-with-checkbox {}".format(