-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove dropdown version of language selector (#339)
* Remove dropdown version of language selector as it failed DAC testing * Remove unused dependency
- Loading branch information
Showing
14 changed files
with
8 additions
and
704 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,11 @@ | ||
{% macro onsLanguageSelector(params) %} | ||
{% if params.languages | length <= 3 %} | ||
{% set alternativeLanguages = params.languages | rejectattr("current") %} | ||
{% set alternativeLanguages = params.languages | rejectattr("current") %} | ||
|
||
<ul class="language-links u-d-no@xs@m"> | ||
{% for language in alternativeLanguages %} | ||
<li class="language-links__item"> | ||
<a href="{{ language.url }}" lang="{{ language.ISOCode }}">{{ language.text }}</a> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
{% else %} | ||
{% set currentLanguage = params.languages | selectattr("current") | first %} | ||
|
||
<div class="language-switcher u-d-no@xs@m js-language-switcher" lang="{{ currentLanguage.ISOCode }}"> | ||
<a class="js-language-switcher-link" href="{{ params.allLanguagesUrl }}">{{ currentLanguage.chooseLanguage }}</a> | ||
<button type="button" class="u-d-no language-switcher__button js-language-switcher-button" aria-label="{{ currentLanguage.buttonAriaLabel }}">{{ currentLanguage.text }}</button> | ||
<ul id="language-switcher-items" class="u-d-no language-switcher__items js-language-switcher-items"> | ||
{% for language in params.languages %} | ||
{% if language.ISOCode != currentLanguage.ISOCode %} | ||
<li class="language-switcher__item"> | ||
<a href="{{ language.url }}" class="language-switcher__language js-language-switcher-item" lang="{{ language.ISOCode }}" tabindex="-1">{{ language.text }}</a> | ||
</li> | ||
{% endif %} | ||
{% endfor %} | ||
{% if currentLanguage.allLanguages and params.allLanguagesUrl %} | ||
<li class="language-switcher__item"> | ||
<a href="{{ params.allLanguagesUrl }}" class="language-switcher__language js-language-switcher-item" lang="{{ currentLanguage.ISOCode }}" tabindex="-1">{{ currentLanguage.allLanguages }}</a> | ||
</li> | ||
{% endif %} | ||
</ul> | ||
</div> | ||
{% endif %} | ||
<ul class="language-links u-d-no@xs@m"> | ||
{% for language in alternativeLanguages %} | ||
<li class="language-links__item"> | ||
<a href="{{ language.url }}" lang="{{ language.ISOCode }}">{{ language.text }}</a> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
{% endmacro %} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 0 additions & 69 deletions
69
src/patterns/language-selection/examples/many-languages/cy.njk
This file was deleted.
Oops, something went wrong.
69 changes: 0 additions & 69 deletions
69
src/patterns/language-selection/examples/many-languages/ga.njk
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.