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-2888: Configure in-page navigation #1026

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
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
*/
#}

{% block aside %}
{# keep empty for not needed #}
{% endblock %}

{% block content %}
{% if registration_not_needed is not empty %}
<h2>{{ registration_not_needed.heading }}</h2>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
node.isSticky() ? 'node--sticky',
not node.isPublished() ? 'node--unpublished',
view_mode ? 'node--view-mode-' ~ view_mode|clean_class,
'vote-state-territory-content'
'vote-main-content-row',
'vote-block-margin-y--narrow',
'usa-in-page-nav-container'
] %}

{# Links with fallbacks. #}
Expand Down Expand Up @@ -61,11 +63,24 @@
{# Hold these title_* placeholders for potential integration #}
{{ title_prefix }}
{{ title_suffix }}
<div class="vote-narrow-container-left-align">

{% if drupal_view('inline_alert', 'embed_1') | render | striptags | trim %}
{{ drupal_view('inline_alert', 'embed_1') }}
{{ drupal_view('inline_alert', 'embed_1') }}
{% 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>
{% endblock %}

<div class="vote-page-content vote-page-content--alt">
{% block content %}
{% if check_registration is not empty %}
{{ check_registration }}
Expand Down Expand Up @@ -124,3 +139,4 @@
{% endif %}
{% endblock %}
</div>
</div>