Skip to content

Commit

Permalink
Merge pull request #3121 from SaptakS/feature/language-menu/globe-icon
Browse files Browse the repository at this point in the history
Add globe icon in the locale dropdown for better understanding
  • Loading branch information
redshiftzero authored Mar 12, 2018
2 parents 30cb748 + 37da339 commit fdfcb50
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 3 deletions.
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.

0 comments on commit fdfcb50

Please sign in to comment.