Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VOTE-2972 additional check reg box #1060

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions web/themes/custom/votegov/src/sass/components/call-out-box.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@
@include u-padding-x(3);
@include u-margin-x(-3);
}

.vote-side-nav__container > & {
@include u-padding(3);
@include u-margin-x(0);
@include u-margin-y(3);

h2 {
@include u-font('sans','sm');
}
}
}

.vote-call-out-box--offset {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,29 @@
@use "variables" as *;
@use "mixins" as *;

.usa-in-page-nav {
@include grid-offset(1);
margin-inline-start: calc(100% / 12);
padding-inline-start: 2rem;
.vote-side-nav__container {
@include u-padding-left(8);
@include u-margin-left(8);
@include u-width('full');
@include u-position('sticky');
@include u-order(2);
margin-top: units($theme-in-page-nav-margin-top);
max-width: 20rem;
top: units($theme-in-page-nav-top);

@include at-media-max('tablet-lg') {
@include u-display('none');
}
}

.usa-in-page-nav {
@include grid-offset(1);
@include u-margin-left(0);
@include u-padding(0);
max-width: inherit;
position: unset;
}

.usa-in-page-nav__list {
@include u-border(0);
border-inline-start: 1px solid $bg-light-medium;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

{# State content with fallbacks. #}
{# Get default state display content from the block type. #}
{% set state_display_content = drupal_entity('block_content', 22) | children %}
{% set state_display_content = drupal_entity('block_content', 23) | children %}
{% set registration_not_needed = state_display_content.field_registration_not_needed.0 | default([]) | merge(content.field_registration_not_needed.0 | default([])) %}
{% set online_registration = state_display_content.field_online_registration.0 | default([]) | merge(content.field_online_registration.0 | default([])) %}
{% set military_overseas_registration = state_display_content.field_military_and_overseas_regi.0 | default([]) | merge(content.field_military_and_overseas_regi.0 | default([])) %}
Expand Down Expand Up @@ -81,18 +81,29 @@
{% endif %}

{% block aside %}
<aside
class="usa-in-page-nav"
data-main-content-selector=".usa-in-page-nav-container"
data-title-text="{{ 'Jump to registration options' | 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="#main-content-state-page"
data-title-text="{{ 'Jump to registration options' | t }}"
data-title-heading-level="h2"
data-scroll-offset="-600"
data-root-margin="48px 0px -90% 0px"
data-threshold="1"
>
</div>
{% if check_registration is not empty %}
{% include '@votegov/component/call-out-box.html.twig' with {
'heading': check_registration.heading,
'text': check_registration.text | render | trim,
'link_text': check_registration.link_text | render | trim | t({'@state_name': title_english}),
'link_url': confirm_registration_link
} %}
{% endif %}
</aside>
{% endblock %}

<div class="vote-page-content vote-page-content--alt">
<div id="main-content-state-page" class="vote-page-content vote-page-content--alt">
{% block content %}
{% if check_registration is not empty %}
{% include '@votegov/component/call-out-box.html.twig' with {
Expand Down