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

Add globe icon in the locale dropdown for better understanding #3121

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
3 changes: 2 additions & 1 deletion securedrop/journalist_templates/locales.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
<div class="menu">
<input id="menu-1-checkbox" class="menu__checkbox visually-hidden" type="checkbox" >
<label for="menu-1-checkbox" class="menu__trigger">
<span class="menu__trigger-arrow">▼</span>
<img class="icon menu__trigger-icon" src="/static/i/font-awesome/fa-globe-black.png" width="18px" height="16px">
<span class="menu__trigger-text">{{ g.locales[g.locale] }}</span>
<span class="menu__trigger-arrow">▼</span>
</label>

<ul class="menu__items">
Expand Down
5 changes: 4 additions & 1 deletion securedrop/sass/modules/_menu.sass
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
display: inline-block
text-transform: capitalize

.menu__trigger-icon
padding-right: 0.15em

.menu__items
display: none
position: absolute
Expand Down Expand Up @@ -57,7 +60,7 @@
width: 100vw
height: 100vh
background-color: transparent
& .menu__trigger-text, & .menu__trigger-arrow
& .menu__trigger-text, & .menu__trigger-arrow, & .menu__trigger-icon
display: none

.menu__checkbox:focus ~ .menu__trigger
Expand Down
3 changes: 2 additions & 1 deletion securedrop/source_templates/locales.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
<div class="menu">
<input id="menu-1-checkbox" class="menu__checkbox visually-hidden" type="checkbox" >
<label for="menu-1-checkbox" class="menu__trigger">
<span class="menu__trigger-arrow">▼</span>
<img class="icon menu__trigger-icon" src="/static/i/font-awesome/fa-globe-black.png" width="18px" height="16px">
<span class="menu__trigger-text">{{ g.locales[g.locale] }}</span>
<span class="menu__trigger-arrow">▼</span>
</label>

<ul class="menu__items">
Expand Down
1 change: 1 addition & 0 deletions securedrop/static/i/font-awesome/black/globe.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.