This commit is contained in:
Dmytro Barylo
2017-03-04 21:06:01 +02:00
parent a1ed712780
commit ebb4d19d30
6 changed files with 24 additions and 10 deletions

View File

@@ -108,6 +108,10 @@ export default {
// Router After Leave
afterLeave(){
document.querySelector('body').scrollTop = 0;
},
// Detect if touch device
isTouchDevice() {
return 'ontouchstart' in document.documentElement;
}
},
created(){
@@ -117,6 +121,9 @@ export default {
eventHub.$on('setSearchQuery', this.setSearchQuery);
eventHub.$on('requestToken', this.requestToken);
eventHub.$on('setUserStatus', this.setUserStatus);
if (this.isTouchDevice()) {
document.querySelector('body').classList.add('touch');
}
}
}
</script>
@@ -206,7 +213,7 @@ img{
&-input{
display: block;
width: 100%;
padding: 15px 20px 15px 50px;
padding: 15px 20px 15px 45px;
outline: none;
border: 0;
background-color: transparent;
@@ -275,10 +282,15 @@ img{
color: $c-dark;
background: transparent;
outline: none;
transition: background 0.5s ease, color 0.5s ease;
@include tablet-min{
font-size: 12px;
padding: 6px 20px 5px 20px;
}
body:not(.touch) &:hover{
background: $c-dark;
color: $c-white;
}
}