Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* 'master' of https://github.com/usefathom/fathom:
  fix navigation with arrow keys (#160)
  fix URL encoding of site switcher arrows (#159)
  • Loading branch information
dannyvankooten committed Oct 16, 2018
2 parents 4189fc5 + 43160ea commit 04c5a8c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions assets/src/js/components/DatePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ class DatePicker extends Component {
@bind
handleKeyPress(evt) {
// Don't handle input when the user is in a text field or text area.
let tag = event.target.tagName;
let tag = evt.target.tagName;
if(tag === "INPUT" || tag === "TEXTAREA") {
return;
}
Expand All @@ -178,7 +178,7 @@ class DatePicker extends Component {
let diff = this.state.endDate - this.state.startDate + 1000;
let newStartDate, newEndDate;

switch(evt.keyCode) {
switch(evt.which) {
// left-arrow
case 37:
newStartDate = new Date(+this.state.startDate - diff)
Expand Down
2 changes: 1 addition & 1 deletion assets/src/js/components/SiteSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class SiteSettings extends Component {
@bind
handleKeydownEvent(evt) {
// close modal when pressing ESC
if(evt.keyCode == 27) {
if(evt.which == 27) {
this.props.onClose()
}
}
Expand Down
4 changes: 2 additions & 2 deletions assets/src/sass/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ body { font: 400 16px "overpass", sans-serif; color: #222; text-align: center; p
nav li.logo a { color: #533feb; font-size: 16px; }
nav li.logo a:hover { color: #222; }

nav li.sites { background: #fff url("data:image/svg+xml;charset=utf8,%3Csvg aria-hidden='true' role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 512'%3E%3Cpath fill='#533feb' d='M151.5 347.8L3.5 201c-4.7-4.7-4.7-12.3 0-17l19.8-19.8c4.7-4.7 12.3-4.7 17 0L160 282.7l119.7-118.5c4.7-4.7 12.3-4.7 17 0l19.8 19.8c4.7 4.7 4.7 12.3 0 17l-148 146.8c-4.7 4.7-12.3 4.7-17 0z'%3E%3C/path%3E%3C/svg%3E") 97% 8px no-repeat; border-radius: 4px; padding: 8px; background-size: 10px auto; }
nav li.sites:hover { background: #533feb url("data:image/svg+xml;charset=utf8,%3Csvg aria-hidden='true' role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 512'%3E%3Cpath fill='#fff' d='M168.5 164.2l148 146.8c4.7 4.7 4.7 12.3 0 17l-19.8 19.8c-4.7 4.7-12.3 4.7-17 0L160 229.3 40.3 347.8c-4.7 4.7-12.3 4.7-17 0L3.5 328c-4.7-4.7-4.7-12.3 0-17l148-146.8c4.7-4.7 12.3-4.7 17 0z'%3E%3C/path%3E%3C/svg%3E") 97% 8px no-repeat; background-size: 10px auto; }
nav li.sites { background: #fff url("data:image/svg+xml;charset=utf8,%3Csvg aria-hidden='true' role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 512'%3E%3Cpath fill='%23533feb' d='M151.5 347.8L3.5 201c-4.7-4.7-4.7-12.3 0-17l19.8-19.8c4.7-4.7 12.3-4.7 17 0L160 282.7l119.7-118.5c4.7-4.7 12.3-4.7 17 0l19.8 19.8c4.7 4.7 4.7 12.3 0 17l-148 146.8c-4.7 4.7-12.3 4.7-17 0z'%3E%3C/path%3E%3C/svg%3E") 97% 8px no-repeat; border-radius: 4px; padding: 8px; background-size: 10px auto; }
nav li.sites:hover { background: #533feb url("data:image/svg+xml;charset=utf8,%3Csvg aria-hidden='true' role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 512'%3E%3Cpath fill='%23fff' d='M168.5 164.2l148 146.8c4.7 4.7 4.7 12.3 0 17l-19.8 19.8c-4.7 4.7-12.3 4.7-17 0L160 229.3 40.3 347.8c-4.7 4.7-12.3 4.7-17 0L3.5 328c-4.7-4.7-4.7-12.3 0-17l148-146.8c4.7-4.7 12.3-4.7 17 0z'%3E%3C/path%3E%3C/svg%3E") 97% 8px no-repeat; background-size: 10px auto; }
nav li ul { display: none; position: absolute; z-index: 1001; width: 100%; background: #533feb; border-radius: 4px; padding: 8px 0; margin: 0 0 0 -8px; }
nav li:hover ul { display: block; box-shadow: 0 2px 8px 0 rgba(34,34,34,.10); }
nav li.sites:hover a { color: #fff; }
Expand Down

0 comments on commit 04c5a8c

Please sign in to comment.