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

Fix toggle behaviour when JS disabled #551

Merged
merged 2 commits into from Oct 3, 2018
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -7,6 +7,10 @@
useful summary for people upgrading their application, not a replication
of the commit log.

## Unreleased

* Fix toggle behaviour in related navigation and taxonomy navigation when JS disabled (PR #551)

## 11.1.0

* Add Admin analytics script (#555)
Expand Down
Expand Up @@ -36,6 +36,14 @@
}
}

.gem-c-related-navigation__toggle {
display: none;

.js-enabled & {
display: block;
}
}

.gem-c-related-navigation__section-link {
@include bold-16;
}
Expand Down
Expand Up @@ -62,6 +62,14 @@
text-decoration: none;
}

.gem-c-taxonomy-navigation__toggle {
display: none;

.js-enabled & {
display: block;
}
}


.gem-c-taxonomy-navigation__section-heading {
border-top: 1px solid $border-colour;
Expand Down
Expand Up @@ -92,6 +92,7 @@
<% if hidden_links.any? %>
<li class="gem-c-taxonomy-navigation__link toggle-wrap">
<a href="#"
class="gem-c-taxonomy-navigation__toggle"
data-controls="toggle_<%= section_name %>"
data-expanded="false"
data-toggled-text="<%= t("govuk_component.metadata.toggle_less", default: "Show fewer") %>">
Expand Down
Expand Up @@ -44,6 +44,7 @@
<% if links.length > section_link_limit %>
<li class="gem-c-related-navigation__link toggle-wrap">
<a href="#"
class="gem-c-related-navigation__toggle"
data-controls="toggle_<%= section_title %>"
data-expanded="false"
data-toggled-text="<%= t("govuk_component.metadata.toggle_less", default: "Show fewer") %>">
Expand Down