diff --git a/web/themes/custom/votegov/src/sass/components/call-out-box.scss b/web/themes/custom/votegov/src/sass/components/call-out-box.scss index 5a5a6164c..048bce2fe 100644 --- a/web/themes/custom/votegov/src/sass/components/call-out-box.scss +++ b/web/themes/custom/votegov/src/sass/components/call-out-box.scss @@ -4,7 +4,7 @@ .vote-call-out-box { @include u-padding(4); - @include u-margin-bottom(6); + @include u-margin-bottom(5); background-color: $bg-light-cool; @include at-media('tablet') { diff --git a/web/themes/custom/votegov/src/sass/components/date.scss b/web/themes/custom/votegov/src/sass/components/date.scss index 78ce7bcfe..06df4cf44 100644 --- a/web/themes/custom/votegov/src/sass/components/date.scss +++ b/web/themes/custom/votegov/src/sass/components/date.scss @@ -7,3 +7,7 @@ @include u-margin-top(4); } } + +.vote-date--election { + @include u-font('sans', 'md'); +} diff --git a/web/themes/custom/votegov/src/sass/components/info-card.scss b/web/themes/custom/votegov/src/sass/components/info-card.scss index 7d5ac5adf..7826de447 100644 --- a/web/themes/custom/votegov/src/sass/components/info-card.scss +++ b/web/themes/custom/votegov/src/sass/components/info-card.scss @@ -6,13 +6,10 @@ @include u-border(1px, 'gray-cool-20', 'solid'); @include u-radius('lg'); @include u-padding(4); + @include u-margin-top(4); - .vote-info-card + & { - @include u-margin-top(4); - - @include at-media('tablet') { - @include u-margin-top(6); - } + @include at-media('tablet') { + @include u-margin-top(5); } > * + * { diff --git a/web/themes/custom/votegov/templates/layout/page--node--voter-guide.html.twig b/web/themes/custom/votegov/templates/layout/page--node--voter-guide.html.twig index 0564121e0..83fdf45b5 100644 --- a/web/themes/custom/votegov/templates/layout/page--node--voter-guide.html.twig +++ b/web/themes/custom/votegov/templates/layout/page--node--voter-guide.html.twig @@ -10,15 +10,17 @@ 'variant': 'dark' } %}
- +
{{ page.content }}
diff --git a/web/themes/custom/votegov/templates/node/node--state-territory--not-needed.html.twig b/web/themes/custom/votegov/templates/node/node--state-territory--not-needed.html.twig index 4129ce295..abcaff16f 100644 --- a/web/themes/custom/votegov/templates/node/node--state-territory--not-needed.html.twig +++ b/web/themes/custom/votegov/templates/node/node--state-territory--not-needed.html.twig @@ -7,48 +7,31 @@ #} {% block aside %} -{# keep empty for not needed #} + {# keep empty for not needed #} {% endblock %} {% block content %} - {% if registration_not_needed is not empty %} -

{{ registration_not_needed.heading }}

+ {% if registration_not_needed is not empty %} + {# setting link text to be in inline hyper link #} + {% if registration_not_needed.link_text %} + {% set link_markup %} + {{ registration_not_needed.link_text | render | trim | t({'@state_name': title_english}) }} + {% endset %} + {% endif %} + {# setting body text to have palceholder for both state name and link #} + {% set body = registration_not_needed.text['#markup']| t({'@state_name': title_english, '@link': {'#markup': link_markup } | render}) %} - {{ registration_not_needed.text }} + {% include '@votegov/component/info-card.html.twig' with { + 'heading': registration_not_needed.heading, + 'body': body, + } %} - {% if more_info_link and registration_not_needed.link_text %} -

- {% include '@votegov/component/button.html.twig' with { - 'label': registration_not_needed.link_text, - 'href': more_info_link - } %} -

- {% endif %} + {% endif %} + {% if military_overseas_registration is not empty %} + {% include '@votegov/component/info-card.html.twig' with { + 'heading': military_overseas_registration.heading, + 'body': military_overseas_registration.text, + } %} + {% endif %} - {% if military_overseas_registration is not empty %} - {{ military_overseas_registration }} - {% endif %} - {% endif %} - - {# JSON Schema #} - {# Commenting this out until we have a chance to review and improve #} -{# #} {% endblock %} diff --git a/web/themes/custom/votegov/templates/node/node--state-territory.html.twig b/web/themes/custom/votegov/templates/node/node--state-territory.html.twig index d026fb7a7..c8d91d8c0 100644 --- a/web/themes/custom/votegov/templates/node/node--state-territory.html.twig +++ b/web/themes/custom/votegov/templates/node/node--state-territory.html.twig @@ -117,7 +117,7 @@ {# Election Date #} {% if (election_date is not empty) and (election_text is not empty) %} {% set election_date_text = election_text['#text'] | t({'@date': election_date | render }) %} - {{ election_date_text }} +
{{ election_date_text }}
{% endif %} {# setting online registration variables #} @@ -126,7 +126,9 @@ {% if online_registration_vars is not empty %} {% set body = online_registration_vars.text['#markup'] | t(body_vars) %} - {% set link_title = online_registration_vars.link_text['#markup'] | t({'@state_name': title_english}) %} + {% if online_registration_vars.link_text %} + {% set link_title = online_registration_vars.link_text['#markup'] | t({'@state_name': title_english}) %} + {% endif %} {% include '@votegov/component/info-card.html.twig' with { 'heading': online_registration_vars.heading, 'body': body, @@ -145,7 +147,7 @@

{{ nvrf_details.heading }}

{% endif %} - {{ nvrf_details.text }} + {{ nvrf_details.text['#markup'] | t({'@state_name': title_english}) }} {% if nvrf_details.link_text %} {# Set path to form dynamically using page route. #} @@ -167,7 +169,7 @@ {% set mail_body %} {{ mail_registration.text }} - {% if state_mail_pdf_link %} + {% if state_mail_pdf_link and mail_registration.link_text %}

{{ link(mail_registration.link_text, state_mail_pdf_link) }}

{% endif %} {% endset %} @@ -177,11 +179,13 @@ 'body': mail_body | render | trim | t({'@state_mail_deadline': bymail_deadline ,'@state_name': title_english}), 'footer': mail_footer } %} - {# No mail registration content #} +{# No mail registration content #} {% else %} {% if not has_mail and (no_mail_registration is not empty) %} {% set no_mail_body = no_mail_registration.text['#markup'] | t({'@state_name': title_english}) %} - {% set no_mail_link_title = no_mail_registration.link_text['#markup'] | t({'@state_name': title_english }) %} + {% if no_mail_registration.link_text %} + {% set no_mail_link_title = no_mail_registration.link_text['#markup'] | t({'@state_name': title_english }) %} + {% endif %} {% include '@votegov/component/info-card.html.twig' with { 'heading': no_mail_registration.heading, @@ -197,7 +201,9 @@ {% if has_in_person and (inperson_registration is not empty) %} {% set body = inperson_registration.text['#markup'] | t({'@state_in-person_deadline': inperson_deadline | render }) %} - {% set link_title = inperson_registration.link_text['#markup'] | t({'@state_name': title_english }) %} + {% if inperson_registration.link_text %} + {% set link_title = inperson_registration.link_text['#markup'] | t({'@state_name': title_english }) %} + {% endif %} {% include '@votegov/component/info-card.html.twig' with { 'heading': inperson_registration.heading, 'body': body, @@ -215,5 +221,13 @@ } %} {% endif %} {% endblock %} + + {# Checking if updated date is set and then render the field #} + {% if content.field_updated_date | field_value is not empty %} +

+ {# Striptags and raw filters were added to accomodate Navajo date formats. #} + {{'Last updated:' | t }} {{ content.field_updated_date | render | replace(t_numbers[language].numbers | default([])) | striptags('') | raw }} +

+ {% endif %}