+ added mobileHandler.js and mobile.css prototype to handle mobile devices

This commit is contained in:
koenigmarcel 2021-06-10 20:32:16 +02:00
parent 3773fb427b
commit e5d1fc77d1
2 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,11 @@
function isMobile() {
var mobileDeviceIndicator = 0;
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
mobileDeviceIndicator = 1;
}
/*
var hasTouchscreen = 'ontouchstart' in window;
alert(hasTouchscreen ? 'has touchscreen' : 'doesn\'t have touchscreen');*/
}

35
public/css/mobile.css Normal file
View File

@ -0,0 +1,35 @@
html {
width: 100%;
height: 100%;
font-family: Arial, sans-serif
}
body {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
overflow: hidden;
}
main {
display: grid;
grid-template-rows: 80% 20%;
height: calc(100% - 3em - 10px);
}
.material-icon {
font-family: Material Icons, sans-serif !important;
font-weight: 400;
font-style: normal;
font-size: 24px;
line-height: 1;
letter-spacing: normal;
text-transform: none;
display: inline-block;
white-space: nowrap;
word-wrap: normal;
direction: ltr;
-webkit-font-feature-settings: "liga";
-webkit-font-smoothing: antialiased;
}