Skip to content

Commit

Permalink
Squashed commit of the following: state-enhancement
Browse files Browse the repository at this point in the history
commit cfadc1a
Author: Christian Medders - Bixal <[email protected]>
Date:   Tue Oct 29 16:19:44 2024 -0400

    Vote-3051: not needed template update (#1081)

    * Vote-3051: update to not needed template

    * Vote-3051: adding update date to tempalte

commit 0332132
Author: SamiraMSadat <[email protected]>
Date:   Tue Oct 29 09:09:20 2024 -0600

    VOTE- 3024 fix election date styling (#1067)

commit 52b41ba
Author: SamiraMSadat <[email protected]>
Date:   Tue Oct 29 08:52:33 2024 -0600

    VOTE-3036 Replicate markup changes for in page nav to voter guide page (#1070)

commit 40daefa
Author: SamiraMSadat <[email protected]>
Date:   Tue Oct 29 07:38:01 2024 -0600

    VOTE-3006 empty link text bug (#1066)

commit 330cd03
Author: SamiraMSadat <[email protected]>
Date:   Wed Oct 23 10:25:18 2024 -0600

    VOTE-2972 additional check reg box (#1060)

commit 88cf019
Author: SamiraMSadat <[email protected]>
Date:   Wed Oct 23 07:11:09 2024 -0600

    VOTE-3020 Reenable the NVRF details field in the state override content (#1065)

commit f83098b
Author: Christian Medders - Bixal <[email protected]>
Date:   Tue Oct 22 11:31:43 2024 -0400

    Vote-2958: No mail registration block (#1058)

    * update to twig template

    * Update to config

    * updated no mail to have nvrf render if checked

    * VOTE-2958 Fix the mail deadline replacement

    * VOTE-2958 Use state name var with capital letter

    ---------

    Co-authored-by: SamiraMSadat <[email protected]>

commit a110d94
Author: Mandy Lloyd <[email protected]>
Date:   Fri Oct 18 20:18:59 2024 -0400

    VOTE-2880/2881: Configure and style call out box (#1047)

commit f1a9963
Merge: 284b521 fbc4145
Author: Ray Estrada <[email protected]>
Date:   Fri Oct 18 17:16:15 2024 -0700

    Merge remote-tracking branch 'origin/dev' into state-enhancement

commit fbc4145
Merge: 218a142 bb38a76
Author: Ray Estrada <[email protected]>
Date:   Fri Oct 18 11:29:46 2024 -0700

    Merge pull request #1052 from usagov/stage

    VOTE-2993 HOTFIX release merge to DEV

commit 284b521
Author: Christian Medders - Bixal <[email protected]>
Date:   Fri Oct 18 10:41:03 2024 -0400

    Vote-2959: Deprecate Registration Intro Field (#1056)

    * Update to twig templete

    * Update to config

    ---------

    Co-authored-by: SamiraMSadat <[email protected]>

commit 939de51
Author: SamiraMSadat <[email protected]>
Date:   Fri Oct 18 08:39:20 2024 -0600

    HOTFIX - Restore registration type variables

commit b3a5941
Author: Christian Medders - Bixal <[email protected]>
Date:   Thu Oct 17 15:36:31 2024 -0400

    Vote-2957: No Online Registration (#1054)

    * add placeholder for no online reg

    * Updating twig template

    * Update to config for  new field

commit 218a142
Author: Christian Medders - Bixal <[email protected]>
Date:   Thu Oct 17 12:36:54 2024 -0400

    Vote-2979: Chinese Simplified String Updates (#1053)

    * zh-hans string updates

    * VOTE-2979 Fix titles

    ---------

    Co-authored-by: SamiraMSadat <[email protected]>

commit bb38a76
Author: Ray Estrada <[email protected]>
Date:   Wed Oct 16 07:10:40 2024 -0700

    VOTE-2993 update nvrf data asset directory location
    Update NVRF to v0.18.2

commit 8b38dcc
Author: Christian Medders - Bixal <[email protected]>
Date:   Tue Oct 15 16:02:50 2024 -0400

    Vote-2990: Link Style Update to Emergency Banner (#1046)

commit 68f40b9
Author: Christian Medders - Bixal <[email protected]>
Date:   Tue Oct 15 13:41:56 2024 -0400

    Vote-2978: Config for Override NVRF field (#1045)

    * Updating twing file for some clean up

    * Update to config for new NVRF override field

commit 78826db
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Oct 14 09:32:49 2024 -0400

    Vote-2977: Bump @uswds/uswds from 3.8.2 to 3.9.0

commit 4975b65
Merge: e40282c 3a41fba
Author: Ray Estrada <[email protected]>
Date:   Thu Oct 10 16:10:13 2024 -0700

    Merge pull request #1043 from usagov/dev

    Sprint 69 HOTFIX Release to Stage

commit 3a41fba
Author: Christian Medders - Bixal <[email protected]>
Date:   Thu Oct 10 17:33:28 2024 -0400

    Vote-2826: Migrate Cypress Backend Test to Page Objects (#1041)

    * init work

    * saving work - footer menu

    * adding data-test attribute to twig file

    * update to cypress tests

commit af7a011
Author: Mandy Lloyd <[email protected]>
Date:   Thu Oct 10 16:56:24 2024 -0400

    VOTE-2965: Fix body text wrap (#1038)

commit d0016aa
Author: SamiraMSadat <[email protected]>
Date:   Thu Oct 10 14:24:16 2024 -0600

    Update NVRF to v0.18.1 (#1042)

commit 9a3d932
Author: Christian Medders - Bixal <[email protected]>
Date:   Thu Oct 10 15:39:15 2024 -0400

    Vote-2887: Config for Outside US Info Card (#1040)

commit 2acf5df
Author: Daniel Crowder <[email protected]>
Date:   Wed Oct 9 17:51:24 2024 -0400

    VOTE-2462 & VOTE-2460: Document steps for drupal core and module updates. Update list of custom m… (#1031)

commit 570529c
Author: Ray Estrada <[email protected]>
Date:   Wed Oct 9 06:17:48 2024 -0700

    VOTE-2885 configure state mail registration section (#1039)

commit 926fd75
Author: Mandy Lloyd <[email protected]>
Date:   Tue Oct 8 13:49:08 2024 -0400

    VOTE-2888: Configure in-page navigation (#1026)

    * VOTE-2888: Configure in-page nav on stage page

    * make aside block empty on not needed template

commit 5a0150f
Merge: 87873bb 18ab113
Author: Ray Estrada <[email protected]>
Date:   Tue Oct 8 10:26:17 2024 -0700

    Merge remote-tracking branch 'origin/dev' into state-enhancement

commit 87873bb
Author: SamiraMSadat <[email protected]>
Date:   Mon Oct 7 14:09:23 2024 -0600

    VOTE-2884 Configure the display of online reg card (#1035)

commit b103f80
Author: SamiraMSadat <[email protected]>
Date:   Fri Oct 4 12:55:36 2024 -0600

    VOTE-2883 Election date display (#1025)

commit d821f0a
Author: SamiraMSadat <[email protected]>
Date:   Fri Oct 4 09:54:31 2024 -0600

    VOTE-2886 state enhancement in person (#1028)

commit f9e5279
Author: Ray Estrada <[email protected]>
Date:   Wed Oct 2 12:50:18 2024 -0700

    VOTE-2882 refine fallbacks for the state display content (#1024)

commit 9d9b28b
Author: Ray Estrada <[email protected]>
Date:   Wed Oct 2 10:46:49 2024 -0700

    VOTE-2882 display intro or not needed state content (#1023)

commit bdeba7f
Author: Christian Medders - Bixal <[email protected]>
Date:   Tue Oct 1 11:18:27 2024 -0400

    Vote-2878: add new Info Card Component (#1014)
  • Loading branch information
rayestrada committed Oct 29, 2024
1 parent 1b4ccf5 commit b701b09
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 61 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down
4 changes: 4 additions & 0 deletions web/themes/custom/votegov/src/sass/components/date.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@
@include u-margin-top(4);
}
}

.vote-date--election {
@include u-font('sans', 'md');
}
9 changes: 3 additions & 6 deletions web/themes/custom/votegov/src/sass/components/info-card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

> * + * {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@
'variant': 'dark'
} %}
<div class="vote-main-content-row vote-block-margin-y--narrow grid-container usa-in-page-nav-container">
<aside
class="usa-in-page-nav"
data-main-content-selector=".usa-in-page-nav-container"
data-title-text="{{ 'On this page' | t }}"
data-title-heading-level="h2"
data-scroll-offset="-600"
data-root-margin="48px 0px -90% 0px"
data-threshold="1"
></aside>
<aside class="vote-side-nav__container">
<div
class="usa-in-page-nav"
data-main-content-selector=".usa-in-page-nav-container"
data-title-text="{{ 'On this page' | t }}"
data-title-heading-level="h2"
data-scroll-offset="-600"
data-root-margin="48px 0px -90% 0px"
data-threshold="1"
></div>
</aside>
<div class="vote-page-content vote-page-content--alt">
{{ page.content }}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
<h2>{{ registration_not_needed.heading }}</h2>
{% 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 %}
<a href="{{ more_info_link }}">{{ registration_not_needed.link_text | render | trim | t({'@state_name': title_english}) }}</a>
{% 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 %}
<p>
{% include '@votegov/component/button.html.twig' with {
'label': registration_not_needed.link_text,
'href': more_info_link
} %}
</p>
{% 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 #}
{# <script type="application/ld+json">#}
{# {#}
{# "@context": "https://schema.org",#}
{# "@type": "FAQPage",#}
{# "mainEntity": [{#}
{# "@type": "Question",#}
{# "name": "{{ 'How to register to vote' | t({ '@state_name': state_name }) }}",#}
{# "acceptedAnswer": {#}
{# "@type": "Answer",#}
{# "text": "{{ 'Voter registration is not required in @state_name. @link on @state_name’s election website.' | t({#}
{# '@link': { "#markup": "<a href=\"#{more_info_link}\">#{more_info_link_text}</a>"} | render | replace({'"': "\""}),#}
{# '@state_name': state_name,#}
{# '@of_state_name': of_state_name,#}
{# '@in_state_name': in_state_name#}
{# }) }}"#}
{# }#}
{# }{{ end }}]#}
{# }#}
{#</script>#}
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
<div class="vote-date--election">{{ election_date_text }}</div>
{% endif %}

{# setting online registration variables #}
Expand All @@ -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,
Expand All @@ -145,7 +147,7 @@
<h3>{{ nvrf_details.heading }}</h3>
{% 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. #}
Expand All @@ -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 %}
<p>{{ link(mail_registration.link_text, state_mail_pdf_link) }}</p>
{% endif %}
{% endset %}
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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 %}
<p class="vote-date--updated">
{# 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('<span>') | raw }}
</p>
{% endif %}
</div>
</div>

0 comments on commit b701b09

Please sign in to comment.